??? 03/07/04 14:36 Read: times |
#66183 - Is this okay Responding to: ???'s previous message |
I am tired after 12hrs on the job please confirm if what I have written is okay atlast, I do get the result but I still need your opinion
ORG 0000H ;Origin address LJMP MAIN ; Jump to intialisation ORG 000BH reti ORG 0023H ;Serial interupt LJMP SERIAL ORG 30H MAIN: MOV SP,#60H MOV P1,#0FFH ;Make P1 input port MOV TMOD,#21H ; Timer1 8 bit auto reload Timer0 16 bit timer mode MOV TH1,#0FDH ;Set TH1 for 9600 bps@11.0592MHz MOV SCON,#50H ;8 bit data mode with 1 start and stop bit and receive enable MOV IE,#92H ;Global interrupt, serial interrupt enable,TIMER OVERFLOW ET0 INTERRUPT MOV R0,#0FFH ;Counter MOV TH0,#46H ;Timer 0 MOV TL0,#0FDH ;Values correspond to 50ms delay CLR P1.0 ; LED at p1.0 switched on SETB TR1 ; Start timer for serial transmission SETB TR0 ; Start flash control timer mov 40h,#'R' mov 41h,#0DH mov 42h,#0AH mov r0,#40h mov sbuf,@r0 LOOP:SJMP LOOP ;-----------------END OF MAIN------------------------ ORG 200H SERIAL: JB TI,CLEAR CLEAR: CLR TI inc r0 cjne r0,#43h,next sjmp out next:mov sbuf,@r0 out:RETI END |