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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
04/25/00 09:36
Read: times


 
#2327 - serial port initialization
i would like to use mode3 -> 1 satart ,1 stop and parity bit together with 8 data-bits.
is the code below ok?:
; SET UP SERIAL PORT WITH A 11.0592 MHZ CRYSTAL
; USE TIMER 1 FOR 9600 BAUD RATE SERIAL COMMUNICATIONS

MOV TMOD,#20H ; SET TIMER 1 FOR AUTO RELOAD, MODE 2
MOV TCON,#41H ; RUN COUNTER 1 AND SET EDGE TRIG INTS
MOV TH1,#0FDH ; SET 9600 BAUD RATE (XTAL= 11.0592 MHZ)
MOV SCON,#0D0H ; SET SERIAL CONTROL REGISTER FOR 9 BIT DATA AND MODE 3
RET
is the configuration of tcon ok?
thanks for your comments,
eric



List of 4 messages in thread
TopicAuthorDate
serial port initialization            01/01/70 00:00      
RE: serial port initialization            01/01/70 00:00      
RE: serial port 8052ah-basic version 1.1            01/01/70 00:00      
RE: serial port 8052ah-basic version 1.1            01/01/70 00:00      

Back to Subject List