??? 06/16/04 09:57 Read: times |
#72573 - RE: Serial mess Responding to: ???'s previous message |
Main acall Init ; initialise
run jnb RI, run ; Wait for RI flag mov A, SBUF ; Read character mov P1, A ; move acc to P1 clr RI sjmp run .end Init MOV IE, #00000000B MOV PCON,#00000000B mov SCON, #10011100b ; MOV TMOD,#00100000B ;mov TH1, #254;???????Boud Rate MOV TCON,#01000000B ret ; return That Boud Rate do you want? ;Start of BAUD RATE WIZARD code MOV TMOD,#20h ;Timer 1 in Auto-reload mode MOV TH1,#0FDh ;Reload value for 19200 baud @ 11,000 Mhz SETB TR1 ;Turn on timer 1 MOV A,PCON ;Get current value of PCON SFR SETB ACC.7 ;Set the SMOD bit MOV PCON,A ;Update the value of the PCON SFR ;End of BAUD RATE WIZARD code ;Start of BAUD RATE WIZARD code MOV TMOD,#20h ;Timer 1 in Auto-reload mode MOV TH1,#0FFh ;Reload value for 28800 baud @ 11,000 Mhz SETB TR1 ;Turn on timer 1 ;End of BAUD RATE WIZARD code ;Start of BAUD RATE WIZARD code MOV TMOD,#20h ;Timer 1 in Auto-reload mode MOV TH1,#0FFh ;Reload value for 57600 baud @ 11,000 Mhz SETB TR1 ;Turn on timer 1 MOV A,PCON ;Get current value of PCON SFR SETB ACC.7 ;Set the SMOD bit MOV PCON,A ;Update the value of the PCON SFR ;End of BAUD RATE WIZARD code ;Start of BAUD RATE WIZARD code MOV TMOD,#20h ;Timer 1 in Auto-reload mode MOV TH1,#0FDh ;Reload value for 9600 baud @ 11,000 Mhz SETB TR1 ;Turn on timer 1 ;End of BAUD RATE WIZARD code |
Topic | Author | Date |
Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess | 01/01/70 00:00 | |
RE: Serial mess![]() | 01/01/70 00:00 |