Hey!
First I wanted to know how to create precise timing with PIC using internal osc.?
I remember with AVR at school, we were loadind a value of *6* in the timer register so it could count from 6 to 255 or from 0 to 249! Can we apply that with PICs or there are better methods!
But I now wondering if even this method *above* would really work...
Another thing is writing a code where the *independent actions* of routines A, B, C,...depend on the pressing of a unique button (different) ...so I just wanted to confirm that it is possible to have a *key* routine (at top) that scans up to 8 buttons (given a register has 8 bits) and computes flags in a register for the routines A,B,C...I actually writing a code for that...
*Oh my system is really dead can't think straight right now..
heu how one would handle...assuming action of routine *A* is processed every X [ms] and *action* of routine *B*, every Y [ms]....
where X is a multiple of Y, for instance
A executes every 0.5 seconds and B executes every 1 second!
I have a little idea but I was thinking maybe someone here have done it already and that can save me lots of time!
Thanks!
First I wanted to know how to create precise timing with PIC using internal osc.?
I remember with AVR at school, we were loadind a value of *6* in the timer register so it could count from 6 to 255 or from 0 to 249! Can we apply that with PICs or there are better methods!
But I now wondering if even this method *above* would really work...
Another thing is writing a code where the *independent actions* of routines A, B, C,...depend on the pressing of a unique button (different) ...so I just wanted to confirm that it is possible to have a *key* routine (at top) that scans up to 8 buttons (given a register has 8 bits) and computes flags in a register for the routines A,B,C...I actually writing a code for that...
*Oh my system is really dead can't think straight right now..
heu how one would handle...assuming action of routine *A* is processed every X [ms] and *action* of routine *B*, every Y [ms]....
where X is a multiple of Y, for instance
A executes every 0.5 seconds and B executes every 1 second!
I have a little idea but I was thinking maybe someone here have done it already and that can save me lots of time!
Thanks!
Rich (BB code):
main
call keyz
call A
call B
call C
call D
...
goto main