PDA

View Full Version : Serin timeout in PB not PB Pro...



jesterhoz
- 18th November 2004, 20:38
Hello All,

We are trying to control six servos using the Pic16F84 microcontroller. In PB Pro, within the serin command we can set a timout value and a place to go after. Does anyone know how to accomplish this in PB?

What we want to happen is this. If new serial data is received, process the serial data. If no new data is received, continue processing previous data while continuing to look for new data.

Any ideas?

Thanks,

Trevor

mister_e
- 19th November 2004, 01:18
i have no idea how PB work, just a thought here before i look in PB manual.

When sending data to PIC why not begin with an NUL character and after send what you want.

The receiver will poll the SERIN pin, when she's low, process SERIN command. BUT depending what you do while there's no new data, it can be good or bad. Maybe using interrupt will be better in some case.

OR the best solution is use an PIC who have an built-in USART and use interrupt from USART.

regards