Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

HOW TO MAKE AN USB COMS BETWEEN A PIC AND A PC

Status
Not open for further replies.

MJVM

Newbie level 3
Joined
Feb 9, 2006
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,300
at90s2323-10

Here is my question:
Anybody knows HOW TO MAKE AN USB COMS BETWEEN A PIC AND A PC?
 

silvio

Advanced Member level 3
Joined
Dec 31, 2001
Messages
716
Helped
105
Reputation
210
Reaction score
16
Trophy points
1,298
Location
Romania
Activity points
11,470
pic usb clock

For a newbie the best solution is DM163010 development kit from Microchip that shows the capabilities of the PIC16C745 and PIC16C765 USB microcontrollers.($125).
You can even try building yourself according to https://ww1.microchip.com/downloads/en/AppNotes/91095a.pdf

Later you can try modifying the PICDEM USB Board for PIC18 Full-Speed USB https://ww1.microchip.com/downloads/en/AppNotes/91095a.pdf
or even better use PICDEM Full Speed USB board https://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en021940

If you have a PC application that uses RS232 communication and no changes to the existing software has to be made in order to control now your device through USB bus, then the simplest method is to emulate RS-232 over the USB bus and utilizes Windows driver included in Microsoft OS making driver development unnecessary.
More about this at : https://ww1.microchip.com/downloads/en/appnotes/00956b.pdf

But first of all you better get familiar with USB bus reading USB specification at : https://www.usb.org/developers/docs/
or if you preffer another approach read this book:
USB Complete : Everything You Need to Develop Custom USB Peripherals
5459438 Bytes at https://rapidshare.de/files/9997829/sdf.rar.html
password for rar file: www.elektrotekno.com

Emulation of USB interface in microcontrollers, which not have USB support and implementing USB interface on firmware level is still possible as Igor Cesko already prooved :
h**p://www.cesko.host.sk/IgorPlugUSB/IgorPlug-USB%20(AVR)_eng.htm
But as Igor said :
Firstly I choose PIC16F84-20, with which I have experiences. To ensure synchronizing with USB clock and speed increasing was used microcontroller clock 24MHz = 6MIPS (PIC was slightly overclocked). For one bit from USB processing were 4 instructions (4=6MIPS/1.5Mbit for LowSpeed USB). I reject this solution (after some time) - PIC is too slow (and in addition the no so good instruction set ...) .
Third try was successful: AT90S2313-10 (or AT90S2323-10, AT90S2343-10). This are RISC microcontrollers from Atmel production - AVR family. With comparison with PIC are slow crystal clock, but have 1 instruction per crystal clock (PIC16F84 has to 1 instruction per 4 crystal clock). In addition their instruction set and architecture is nearly to RISC. Again because of synchronization with USB clock I used overclocking to12MHz (AT90S23x3-10 are initially to10MHz only). In this manner I obtained more performance and 12MHz crystals are "easy to obtain" (with comparison to e.g. 10.5MHz - which is the multiple of LowSpeed USB clock 1.5Mbit/s too).

Well, now is available ATTINY2313 at 20MIPS.

You can read about implementing USB 1.1 in firmware for Atmel AVR microcontrollers:
https://www.obdev.at/developers/articles/00003.html
and claimed advantages over Igor's firmware-only implementations at bottom of this page:
https://www.obdev.at/products/avrusb/benefits.html

Are you still eager to play with USB bus ?
 

eltonjohn

Advanced Member level 4
Joined
Feb 22, 2002
Messages
1,435
Helped
64
Reputation
126
Reaction score
28
Trophy points
1,328
Activity points
16,326
igorplugusb registered rapidshare

use a microchip CPU with a USB core built in ,there are several to choose from
 

philba

Full Member level 2
Joined
Jan 26, 2006
Messages
132
Helped
13
Reputation
26
Reaction score
1
Trophy points
1,298
Activity points
3,102
how to make a usb microcontroller

those are all good approaches. On the subject of USB to serial Serial I/O, I would look at the FT232R - minimal components and a fairly friendly ssop package. https://www.ftdichip.com/Products/FT232R.htm If you already have a design that needs to add communications, this is a great way to go.

there are lots of design docs to help you and free drivers for the PC side. I believe they have also released Linux drivers.

Phil
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top