Re: Parity & Stop Bits settings and results
to use even parity
Code:
DEFINE HSER_BAUD2 9600
DEFINE HSER2_CLROERR 1
DEFINE HSER2_TXSTA 60h
DEFINE HSER2_BITS 9
DEFINE HSER2_EVEN 1
I do want to also ask how does the compiler set the values for baud and parity?
baud rate is a calculation based on the osc
parity is done by counting the ones in the data and adding another one if required to make the
count even or odd as required
the method can be studied by examining the "prgname".LST file
I believe you have to set for 9 bits and the 9th bit is the parity, but does the compiler create all the needed code to calculate the parity and then set the 9th bit accordingly?
yes
Warning I'm not a teacher
Bookmarks