View previous topic :: View next topic |
Author |
Message |
Claudio Dias
Joined: 25 Nov 2008 Posts: 2 Location: Brazil
|
Serial Timeout |
Posted: Wed Nov 26, 2008 7:36 am |
|
|
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
|
|
Posted: Wed Nov 26, 2008 8:55 am |
|
|
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
|
|
Posted: Wed Nov 26, 2008 12:04 pm |
|
|
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.
Do you have some tip in this case ?
I set the clock by 0x8E register, bit 3.
Thanks, _________________ --
Claudio Dias
www.mdias.com.br |
|
|
|