Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Zadanie z lab5.pdf - https://imgur.com/a/imBf9sM
- CZAS EQU 19456 ; 50ms
- DIODA EQU P2.7
- ORG 0
- MOV P2, #0
- MOV TMOD, #1 ; tryb pierwszy, timer0
- SETB TR0
- LOOP:
- SETB DIODA
- MOV R0, #6
- CALL DELAY
- CLR DIODA
- MOV R0, #4
- CALL DELAY
- SETB DIODA
- MOV R0, #3
- CALL DELAY
- CLR DIODA
- MOV R0, #17
- CALL DELAY
- SJMP LOOP
- DELAY: ; opóźnienie R0 * 50ms
- MOV TL0, #LOW CZAS
- MOV TH0, #HIGH CZAS
- JNB TF0, $
- CLR TF0
- DJNZ R0, DELAY
- RET
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement