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 CCS Technical Support

Serial Timeout

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



Joined: 25 Nov 2008
Posts: 2
Location: Brazil

View user's profile Send private message Visit poster's website MSN Messenger

Serial Timeout
PostPosted: Wed Nov 26, 2008 7:36 am     Reply with quote

Hi guys,

I'm starting now with PIC and need to implement a protocol client through UART, but I have to continue if the package do not arrive in 150 ms.
Reading the ccs manual (http://www.ccsinfo.com/downloads/ccs_c_manual.pdf) I found that #use rs232 has a parameter called timeout. But my compiler (version 3.6.0.93) is returning an error: "USE parameter value is out of range "TIMEOUT"".
Does any body knows how can I implement this timeout on version 3.6.0.93?

Thanks
_________________
--
Claudio Dias
www.mdias.com.br
Ttelmah
Guest







PostPosted: Wed Nov 26, 2008 8:55 am     Reply with quote

That is _not_ the compiler version.
Look at the top of the .lst file The version, will be in the form X.XXX only.
However the '3' at the start of the number you have (which is the 'version' number you get by right clicking on the file), says that this is a V3 compiler. The timeout function, is a V4 feature.
However, look in your 'examples' directory. EX_TGETC.C

Best Wishes
Claudio Dias



Joined: 25 Nov 2008
Posts: 2
Location: Brazil

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Wed Nov 26, 2008 12:04 pm     Reply with quote

Thanks Ttelmah!

I saw the LST and the right version is 3.200.
I'm trying to implement with timed_getc() but facing a new problem.
As I have very slow baud rate (110 bps), I change the 16f628 internal clock to 48KHz. Now I'm not achieving a good timeout to read the protocol package or ignore the incomplete ones. Confused
Do you have some tip in this case ?

I set the clock by 0x8E register, bit 3.

Thanks,
_________________
--
Claudio Dias
www.mdias.com.br
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