patricktran
New Member
Hi everyone,
I ve done a code of running a timer 1 of pic 16f877 with 7 seg display of second, minutes... I am wondring how to implement 4 buttons of start, stop, pause and reset the timer.
This is what I think:
1. Start: I will turn the TMR1 on
2. Stop:
3. Reset: = Stop then Reset
4. Pause: :?: I dont know :roll:
Can someone please help me out?
Thanks alot.
Patrick![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I ve done a code of running a timer 1 of pic 16f877 with 7 seg display of second, minutes... I am wondring how to implement 4 buttons of start, stop, pause and reset the timer.
This is what I think:
1. Start: I will turn the TMR1 on
Code:
bsf T1CON, TMR1ON
2. Stop:
Code:
bcf T1CON, TMR1ON
3. Reset: = Stop then Reset
Code:
bcf T1CON, TMR1ON
; then reload the preset values for TMR1: TMR1H and TMR1L
4. Pause: :?: I dont know :roll:
Can someone please help me out?
Thanks alot.
Patrick