PDA

View Full Version : 2 Serial inputs at the same time?



a_critchlow
- 28th January 2006, 23:10
Does anyone know the best way to have a serial controlled PIC via to inputs? I have a PIC that needs to be controlled via remote control and from a wired serial input. The only way i think of doing this is to cross the to wire inputs, and feed into one port on the PIC, is there anyway of doing this via software?





thanks to all who can help

mister_e
- 29th January 2006, 01:10
there's some PIC with 2 USART built-in. This could be handy to avoid missing incomming data.

Have a look on the Microchips Website.

You can even use some Timeout with SERIN2 but... i couldn't vouch on that method.

a_critchlow
- 29th January 2006, 13:41
thanks for that info. I am a little down on USART? Do all PIC's that are capable of serial transfer have USART?




many thanks again






andrew

mister_e
- 29th January 2006, 15:07
Let's say that it's not all PIC that have at least 1 USART. But it doesn't mean that we are not able to do serial transfer. SERIN/SEROUT/.../DEBUG are a software solution. A USART is a hardware solution. AND it also provide a cute 2 Bytes buffer in.

with 2 USART, the first that spring to mine is this huge 18F8720... probably too big for what you want to do.

There's still some way to do it cheaper by using 2 PIC, and probably only one PIC with or without USART. But in this case, i couldn't figure it will be really reliable if there's no FlowPin control or an intelligent interrupt + SerialHeader combination... if possible.

Maybe the 2PIC solution is safer.