Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/19/00 17:56
Read: times


 
#1885 - RE: synchronization
Eric,

You have to know that the parity flag in PSW (PSW.0) set/cleared by hardware each instruction cycle to indicate an odd/even number of bits in the accumulator respectively.

So to transmit parity bit you have to do

1) set the mode 3 (or mode 2, it's up to you) for the serial interface
2) put a transmit character to accumulator
3) put P into the TB8 bit (SCON.3) of the SCON by pair of instructions
MOV C,PSW.0
MOV SCON.3,C
4) put the transmit character from accumulator to SBUF as usual (using or not interrupt)

Remember, that number of 1s in the Accumulator plus P is always even. To send odd parity use MOV SCON,/C.

That's all

Good luck,


List of 11 messages in thread
TopicAuthorDate
synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      
RE: synchronization            01/01/70 00:00      

Back to Subject List