|
|
View previous topic :: View next topic |
Author |
Message |
sarodrig
Joined: 14 Aug 2009 Posts: 6 Location: Seattle, WA, USA
|
Problem with usb_cdc_getc() [Solved] |
Posted: Mon Aug 17, 2009 3:45 am |
|
|
I'm pulling my hair out over this one. I've got the USB code mostly working. It enumerates fine and shows up as a COM port on my PC.
Using two hyperterminals, I'm able to send characters from my serial port to USB. However, when I send a character from USB to RS232, I always receive the same character, regardless of what I type. Each character generates an interrupt, as it should, but it receives the same char each time.
One thing that's interesting is the character that gets received sometimes changes with a power cycle on the board, but otherwise, it's the same for any given session.
I'm able to manually putc() to RS232 and usb_cdc_putc() to USB any text that I choose, and it works fine. I can do this repeatedly and it never hangs, so I think the hardware is fine. The only thing not working properly is usb_cdc_getc().
I'm using a PIC18F2550, CCS 4.094 with an ICD2.
Anyone else had as similar problem? I've searched the forums and found nothing like this. |
|
|
sarodrig
Joined: 14 Aug 2009 Posts: 6 Location: Seattle, WA, USA
|
Fixed |
Posted: Mon Aug 17, 2009 4:26 am |
|
|
Somehow, I managed to corrupt my usb_cdc.h file, breaking it only enough to cause this problem. I recopied the file from the original PICC\drivers directory and the problem went away. I only wish I tried that earlier! |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|