EgrK
Junior Member level 2
- Joined
- Jul 31, 2012
- Messages
- 24
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,283
- Location
- East part of world
- Activity points
- 1,438
Hellow again
i need to make the pic sleep for exactly one minute
the follwing is my unprecise code.
i have tried alot to get 1 minute sleep but could not
need help
thanks in advance
i need to make the pic sleep for exactly one minute
the follwing is my unprecise code.
i have tried alot to get 1 minute sleep but could not
need help
thanks in advance
Code:
list p=16f883
#include <p16f883.inc>
i equ 20
j equ 21
Minutes equ 22
Seconds equ 23
.
.
.
movlw b'10001000'
movwf OPTION_REG
movlw .1 ;one minute
movwf i ;i=1
call DelayiM
.
.
.
DelayiM sleep
sleep
loop_Minute sleep
movlw .60
movwf Seconds
loop_Sec sleep
sleep
movlw .60
movwf j
loop_Option sleep
clrwdt
decfsz j,1
goto loop_Option
decfsz Seconds,1
goto loop_Sec
decfsz i,1
goto loop_Minute
return
END
Last edited: