Hi,
I'm new to using usb and I must write a C code that read data from the usb port of PICDEM Full Speed demo board (PIC18f4550).
What software can I use? I need to write a little driver for exchange data with the board?
thanks![]()
Hi,
I'm new to using usb and I must write a C code that read data from the usb port of PICDEM Full Speed demo board (PIC18f4550).
What software can I use? I need to write a little driver for exchange data with the board?
thanks![]()
Do you need to write "C" code for the PIC or the USB host application?
I have PBP & Visual Basic code for the following if you're interested
http://www.rentron.com/images/USB_MAIN.gif
Last edited by Bruce; - 20th September 2006 at 00:34.
Hi Bruce,Originally Posted by Bruce
Did you used the HIDFS Maker by trace system in this application of yours for the PIC USB firmware program side?
Thanks
This looks like a good example to put in your example projects page.... I know I would certainly like to see it. By the way, I don't know if you hear it enough, but those examples are excellent and really help beginners understand how to get started..... so in other words.... THANK YOU!Originally Posted by Bruce
Wisdom is knowing what path to take next... Integrity is taking it.
Ryan Miller
Hi Bruce,
I must write the USB host application...only read and display bulk data from the pic in CDC class.
If I use a generic class i must write a driver, it's correct?
Can I go with the CDC class or an HID class to 1,5 Mbit/s ?
thanks![]()
Last edited by Gab25; - 21st September 2006 at 09:33.
I don't see why you would need to write your own driver. CDC class can use the Windows generic driver already available with Windows.
Microchip & PBP both offer example programs for CDC class USB communications.
As for data rates, download & review the USB 2.0 & CDC class documents from http://www.usb.org These explain in detail what data rates you can expect depending on the USB transfer type you're using.
You might also want to take a peek at Microchips' AN956; Migrating Applications to USB from RS-232 UART with Minimal Impact on PC Software.
Any route you take is going to involve some serious study time. USB is pretty complex.
I tried to use the microchip example "Run time linking" but I can't see the correct value of the potentiometer.
If I try to read the Firmware Version it works great. Any Idea?Code:#define RD_POT 0x37 send_buf[0] = RD_POT; send_buf[1] = 0x02; SendReceivePacket(send_buf,2,receive_buf,&RecvLength,1000,1000); printf("\n%x %x %x\r\n",receive_buf[0],receive_buf[2],receive_buf[1]);
Another part of the example:
switch(dataPacket.CMD)
{
case READ_VERSION:
dataPacket._byte[2] = MINOR_VERSION;
dataPacket._byte[3] = MAJOR_VERSION;
dataPacket._byte[4] = MINOR_VERSION;
dataPacket._byte[5] = MAJOR_VERSION;
counter=0x06;
Why I can't send 6 byte or more...but only 4?
Thanks and sorry for my english![]()
Last edited by Gab25; - 16th October 2006 at 17:28.
Bookmarks