CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

USB issue with 18F4550

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cupidstunt



Joined: 19 Mar 2007
Posts: 2

View user's profile Send private message

USB issue with 18F4550
PostPosted: Mon Mar 19, 2007 2:34 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 19, 2007 3:40 am     Reply with quote

Doh! Local echo .... what an idiot!
strasserh



Joined: 21 Jan 2007
Posts: 5

View user's profile Send private message

PostPosted: Tue Mar 20, 2007 6:36 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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