PDA

View Full Version : Debugin timeout



Alexey
- 9th May 2012, 18:24
Hi Folks,

Maybe someone already had this experience and know a solution:
I use DEBUGIN {Timeout, Label,}[wait(...]
in my code and learnt that the Timeout works only if the input stays high. If input signal is low, then the program may wait forever and does not go any further until the input level comes to 1.

Is there a solution for a case when input signal grops to 0 when another device becomes inactive, not connected or it's voltage drops on some reason?

Thank you

Alexey

Ioannis
- 9th May 2012, 20:10
You cann't have it all. Both software serial port and timeout. It is the way serial port works and software waits for the correct edge to come.

If you have hardware usart, then go for it.

Ioannis

Alexey
- 10th May 2012, 01:06
Hi Ioannis,

Thank you. this is pitty, but still good to know - I probably can not go with HSERIN anyway because of negative signal levels in my application

Best regards,
Alexey

mister_e
- 10th May 2012, 02:32
Some PIC have polarity option for their Built-in USART. From there you can detect Framing Error... problem solved.

Alexey
- 10th May 2012, 23:03
Thank you Mister_e :) It looks like my micro has that feature. It always worth reading manual before doing something... but it is 500+ pages long...

Thanks again!

Alexey