PDA

View Full Version : SERIN basics



Michael
- 14th August 2006, 14:23
I have circuits that I've set up using SERIN and SEROUT and they work fine but to be honest, I'm not sure I really understand how they coordinate with each other.

Pardon the ultra simple question....

When SERIN is used, does the specified pin STAY on the SERIN line UNTIL it receives an RS232 stream?

Or does it set the pin up to receive, store the info in a register when it gets it, WHILE the pic is busy with other things?

And with timeout, it will allow a jump (after a period of time) to another routine if it hasn't been satisfied?

Thanks.

mister_e
- 14th August 2006, 16:26
When SERIN is used, does the specified pin STAY on the SERIN line UNTIL it receives an RS232 stream?
Correct!


Or does it set the pin up to receive, store the info in a register when it gets it, WHILE the pic is busy with other things?
Only the PIC USART can do this. SERIN is a software solution wich allow PIC without USART(16F54,16F84,12F629,12Fs in general) to work with serial comms.


And with timeout, it will allow a jump (after a period of time) to another routine if it hasn't been satisfied?
Correct!

Michael
- 14th August 2006, 17:40
Thanks Steve.

I had a reason for asking but now that I have a definitive answer, I can figure out a bit of a sequence problem I was having with a xmtr and rcvr.

Appreciate it.

Michael
- 14th August 2006, 17:53
I meant to ask also....

In a hardwired situation (no wireless) isn't the SEROUT to SERIN connection totally immune from noise or anything to cause the PIC to jump out of the SERIN line and go elsewhere?

I mean if you're looking for an RS232 stream with a couple of qualifiers it should be totally reliable, right?

mister_e
- 14th August 2006, 18:37
right! Hardware must also be done with care if you're using Timeout or WAIT stuff.