USB communication from PIC 16F877

Status
Not open for further replies.

quaternion

Full Member level 4
Joined
Nov 12, 2006
Messages
212
Helped
17
Reputation
34
Reaction score
7
Trophy points
1,298
Location
Cairo , Egypt
Visit site
Activity points
2,828
USB related question

is it possible for a µcontroller such as PIC 16F877 to communicate directly with a USB port without an intermediate stage??

If not why ?
 

USB related question

I think no because USB needs a stack and specific control algorithm all this defined in a hardware module called Serial Interface Engine or SIE, similar to UART but for USB which is not available in the 16F877, beside line coding of the USB needs a special transceiver.
my advice is to immigrate from 16f877 to 18F4550, nearly the same pin outs but with additional USB interface available.
good luck
 

USB related question

No, it is not possible. For AVR that is available, but not for pic
 

Re: USB related question

PIC can be used for USB communication, as e;rayes mentioned PIC18F4550 will work or any other PIC with USB port.
 

it's not possible until and unless u use intermediate chips.
instead u can use pic with usb support like 18f2550,18f4550
 


Thanks nandhu015

But I decided to use 18f4550 insted, & it is the first time I am dealing with the usb communcation, so i want to know what r the points i should concern with?
knowing that this communcation is used to deliver realtime data that are measured using a sensor [sampled & digitized & serialized] that are someway lengthy and should be delivered correctly(no ignored data) and is time ensured :|
 

You can use HID communication or virtual serial port. You can use softwares such as VC++,VB.net,C# etc. From PC side virtual serial port commn. is same as normal Serial Port.But in the case of HID you can't receive data directly in VB or C# (possible in VC++) so you need a Hid library (easy to get).
 

get "Microchip USB framework" from microchip website, it is ready made USB projects for many types of PIC's, just choose projects related to PIC18F4550 or PICDEM (both are the same), i would recommend you to use CDC -basic demo project cause it will make your PIC appear like a virtual COM port, then you will be easily able to communicate with it using C++ or VB and even in matlab and hyperterminal.
good luck and ask for any help.
 


It appears good idea , but if I emulate a virtual com port can i make the usb work at full speed (or there is no relation between this & that)
 

Virtual serial port is much faster than serial ports but i don't know the correct maximum speed (but above 1 Mbps). The reason is that in virtual serial port there is no hardware limitations.
 

actually for microchip viryual COM port project it was mentioned in an application note its maximum speed 80 KBps, what do you think?
 

it depends on your application, do want just a data logging device for a temperature or light sensor or do you need a streaming for audio or video applications.
for data data logging 80 KBps will be so good.
 

the problem is that the data are sampled very fast in order to get accurate measurment in addition to changing from parallel to serial make the speed 8 times faster!
 

how fast they are sampled, PIC18F4550 has an internal A/D of 102 KSps, would need higher sampling rate then use external A/D or what, i can't get where is the problem.
 

ok an external ADC to be used.
well the sampling rate is quite higer than this and so i want to use the full speed i am not sure i can buffer the data without the use of external memory [which i dont want to use]!
 

you have projects other than CDC basic demo, you have custom class and mass storage class projects for the same microcontroller, you can use any of them but remember you will have to deal from the PC side in a more difficult way than CDC, I think you will need some knowledge in C# or Java to deal with them, there is a demo project you will find with these projects in C#, you can modify in it and use it, also I think you can find ready made sources on the internet, USB isn't easy and I think you will spend some time searching for some tools to help you.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…