I have a program that varies the step time and duty cycle for a 6 step commutation sequence. It takes an 8-bit ADC result and stores it as the TMR0 value, when TMR0 overflows, the ISR selects the next sequence.
I have 2 problems:
- This only works at low INTOSC frequencies, where UART will not work, and
- I don't get a large enough step range.
Any general ideas on how to create a larger ranged delay at a higher frequency? My first idea is to use a nested loop, still using a TMR0 value, then putting that inside of a loop the steps the inverse of TMR0 times...