View previous topic :: View next topic |
Author |
Message |
cupidstunt
Joined: 19 Mar 2007 Posts: 2
|
USB issue with 18F4550 |
Posted: Mon Mar 19, 2007 2:34 am |
|
|
Hi All,
I have a small USB project I'm having some difficulties with. I'm using the PIC18F4550. I can communicate with this device over the USB bus and and standard serial port using HyperTerminal, this stuff works great.
My problem is that when I send a character over the USB bus (from HyperTerminal) my PIC code recognises it and is supposed to send back a response like so,
if (usb_cdc_kbhit()) {
c = usb_cdc_getc();
if (c == '+')
printf(usb_cdc_putc, "some response = %c\r\n", c);
}
Now Id expect HyperTerminal to display,
some response = +
but it actually displays,
+some response = +
Notice the leading '+'
Does anyone know what is happening? |
|
|
cupidstunt
Joined: 19 Mar 2007 Posts: 2
|
|
Posted: Mon Mar 19, 2007 3:40 am |
|
|
Doh! Local echo .... what an idiot! |
|
|
strasserh
Joined: 21 Jan 2007 Posts: 5
|
|
Posted: Tue Mar 20, 2007 6:36 am |
|
|
Hi1
I try to get an connection with Hyperterminal to the pic. It doesn't work. Could you send me your code?
thx for help |
|
|
|