|
|
View previous topic :: View next topic |
Author |
Message |
jjw Guest
|
USB using PIC18F4550 and Hyperterminal |
Posted: Fri Aug 10, 2007 12:03 pm |
|
|
I currently have a PIC18F4550 based system wired up.
The CDC driver appears to have installed correctly on my XP system as it shows up as another COM port.
I modified the ex_usb_serial.c code to skip the if(kbhit()) code and just run the USB code. I compiled and burned into the PIC. When I launch Hyperterminal and configure it to use the new COM port, I get the initial "CCS CDC (Virtual RS232) Example" message but do not get any other keystrokes that I type.
Since the message is coming from the usb_debug_task() function, it appears everything is functioning up to were it begins blocking on the usb_cdc_kbhit() function.
Has anyone had a similar problem. Any suggestions as to what may be happening? |
|
|
Ttelmah Guest
|
|
Posted: Sun Aug 12, 2007 2:53 am |
|
|
The problem is that by getting rid of kbhit, you are not looping through the 'usb_task' call.
There are a lot of stages to USB starting up. This call _needs to be called, until 'usb_state == USB_STATE_ATTACHED' is true, and will need to be called again, if the connection is broken_. This is why CCS have their code looping through this, while waiting for characters. Without this, the device cannot 'attach' to the USB. As it stands, if you only call this once, it'll only work, if the timing at both ends just happens to owrk out...
Best Wishes |
|
|
|
|
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
|