Hi Vasile,
2010/5/16 vasile surducan <[email protected]>: > I've solved the problem Good! >> I also noticed you don't handle PIR1_tmr1if in case there is no button >> pressed. Is this by design? > Yes, there is any problem? There was since you enabled the interrupt for this timer. Now it is okay. >> And also, timer1 is mostly off - it is set >> on at the start of you procedure and turned off within a condition or >> end of the procedure. > That's to keep almost the same delay for button debounce, no matter the > lenght of the main forever loop program. I'd think that is what the reload + clear of tmr1if is for. Since you disable the timer, you get on 'main cycle' delay extra. But anyway - it works. >> A few lines of comment that describe (at a >> higher level) what the intention of the code is, would be helpfull. > I solved the problem, here is how the code works: Still, you could add some of the notes from this mail to the code as comment... Joep -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
