Hserin/Hserout - Serin/Serout compatibility: Invert/No invert?

kranenborg

Senior Member
Hello,

I am still somewhat puzzled by the invert/no invert options when comparing the hserin/hserout with the standard serin/serout options.

Am I right in that the following instructions are compatible (regarding the use of T vs. N versions)?

Given: hsersetup B2400, %10
Then:
Code:
- hserout 0,(b1) = serout 0, T2400, (b0) ' never N2400, because of 28X1 USART setting
- hserin 0,(b1) = serin 0, N2400, (b0)  'would be T2400 with hsersetup B2400, %00)
Do i interpret the invert/no invert options right in these examples?

Thanks,
Jurjen
 

Technical

Technical Support
Staff member
hserin is always T polarity, it is not possible to change to N. This is a limitation of the internal PIC module, not the PICAXE firmware.

hserout is T polarity when the hsersetup flag is 0, N polarity when the flag is 1

So if the flag is set hserin is T and hserout is N. Otherwise they are both T.
 
Top