That is: calculating prescalers and timer count is a headhache… what are computers for?? for doing calculations.. :)
Then it could be a great help that gcbasic calculates prescalers and count for reach the desired period.
I think the code is almost done for PIC (in hpwm.. just change for period instead of frec) and should be very similar for avr.
Or perhaps it should ve easier:
#define Timerx_ms 10
#define Timery_us 156
StartTimerx
StartTimery
Greatings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is: calculating prescalers and timer count is a headhache… what are computers for?? for doing calculations.. :)
Then it could be a great help that gcbasic calculates prescalers and count for reach the desired period.
I think the code is almost done for PIC (in hpwm.. just change for period instead of frec) and should be very similar for avr.
Or perhaps it should ve easier:
#define Timerx_ms 10
#define Timery_us 156
StartTimerx
StartTimery
Greatings.