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

Bug EX_STR.C

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



Joined: 23 Feb 2008
Posts: 29

View user's profile Send private message

Bug EX_STR.C
PostPosted: Sun Apr 12, 2009 2:46 pm     Reply with quote

Hi!

I'm using the development board CCS with 16f877A i uploaded example EX_STR.C

working normally, but when i pressed the enter key on the keyboard without releasing, the program on the PIC (EX_STR.C) is blocked.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 12, 2009 2:57 pm     Reply with quote

This example does not use #int_rda with a receive buffer, so it can only
receive characters when it's executing the get_string() function. If the
program is sending out text with a printf() statement and you send it
characters from the keyboard at the same time, the UART will lock up.
To fix the lock-up problem, add ERRORS to the #use rs232() statement
as shown below:
Quote:
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7, ERRORS)

CCS should do this in most of their examples. For some reason, they
don't do it.
volcane



Joined: 23 Feb 2008
Posts: 29

View user's profile Send private message

PostPosted: Sun Apr 12, 2009 3:22 pm     Reply with quote

Hi!

Working!!!

I wanted to add: the compiler shows a message Warning: variable never used: rs232_errors

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Apr 12, 2009 4:20 pm     Reply with quote

Quote:
I wanted to add: the compiler shows a message Warning: variable never used: rs232_errors

See this explanation by Ttelmah:
http://www.ccsinfo.com/forum/viewtopic.php?t=30917&highlight=rs232_errors&start=8
volcane



Joined: 23 Feb 2008
Posts: 29

View user's profile Send private message

PostPosted: Sun Apr 12, 2009 4:44 pm     Reply with quote

Hi!

Thanks for the information, I believe that in the future I will use the ISR.
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