Advertisement
sskss73

F1

May 13th, 2021
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. CSEG AT 0000H
  2. LJMP 0030H
  3.  
  4. CSEG AT 000BH
  5. LJMP ISR_TIMER0_OVF
  6.  
  7. CSEG AT 0030H
  8. MOV P1, #0
  9. MOV SP,#2FH
  10. MOV R6,#215
  11. LCALL TIM_INIT
  12.  
  13. END_OF_PROGRAM:
  14. LJMP END_OF_PROGRAM
  15.  
  16. TIM_INIT:
  17. ANL TMOD ,#0F0H
  18. ORL TMOD ,#02H
  19. MOV TH0 ,#106
  20. SETB TR0
  21. SETB ET0
  22. SETB EA
  23. RET
  24.  
  25. ISR_TIMER0_OVF:
  26. DJNZ R6,ISREND
  27. MOV R6,#215
  28. PUSH ACC
  29. MOV A,P1
  30. INC A
  31. MOV P1,A
  32. POP ACC
  33. ISREND:
  34. RETI
  35.  
  36. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement