Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSEG AT 0000H
- LJMP 0030H
- CSEG AT 000BH
- LJMP ISR_TIMER0_OVF
- CSEG AT 0030H
- MOV P1, #0
- MOV SP,#2FH
- MOV R6,#215
- LCALL TIM_INIT
- END_OF_PROGRAM:
- LJMP END_OF_PROGRAM
- TIM_INIT:
- ANL TMOD ,#0F0H
- ORL TMOD ,#02H
- MOV TH0 ,#106
- SETB TR0
- SETB ET0
- SETB EA
- RET
- ISR_TIMER0_OVF:
- DJNZ R6,ISREND
- MOV R6,#215
- PUSH ACC
- MOV A,P1
- INC A
- MOV P1,A
- POP ACC
- ISREND:
- RETI
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement