Serin/Serout 'N' and 'T'

Jeremy Leach

Senior Member
I'm sure this has been answered before, but couldn't find it. I just want to be sure I fully understand:

I've just been recoding a PICAXE to PICAXE interface. I'm using the lines between the PICAXEs to flag when they are ready (Ready To Send, Ready To Receive) by going High when ready. I've found that the subsequent serin/serout code then only works with the 'T' argument, not the 'N'.

My understanding is that this is because by using my flags I've made the comms lines 'idle high' prior to comms. If I had reset the lines to 'low' prior to comms I'd need to use 'N' because the lines would be 'idling low'.

If I use 'N' in my current code it won't work because the Serin command will be looking for a low-to-high transition for the start bit, and because the line's high already this will screw up Serin.

Is this explanation right? Just want to make sure !


Edited by - jeremy leach on 03/05/2006 20:50:45
 

hippy

Technical Support
Staff member
That's correct 'N' idles low while 'T' idles high, the start bits being a transition to the inverse of idle.
 

Jeremy Leach

Senior Member
Thanks Hippy. It's better to understand this than to try all options until it works !

Would be helpful if the manual had a sentence in to explain this.
 
Top