KlausST
Advanced Member level 7
- Joined
- Apr 17, 2014
- Messages
- 26,354
- Helped
- 4,926
- Reputation
- 9,875
- Reaction score
- 5,803
- Trophy points
- 1,393
- Activity points
- 177,448
Hi,
If your 300ms and 800ms is "from edge to edge" then I'd do this with a single 100ms timer for multiple outputs.
100ms is the GCD of 300 and 800.
Use two counters inside the ISR which are incremented every ISR run.
If your "IF" is after the "increment" instruction:
The one counts 0, 1, 2, 3 (if = 3 then toggle the output and set counter to zero)
The other similarely counts 0..8
Klaus
If your 300ms and 800ms is "from edge to edge" then I'd do this with a single 100ms timer for multiple outputs.
100ms is the GCD of 300 and 800.
Use two counters inside the ISR which are incremented every ISR run.
If your "IF" is after the "increment" instruction:
The one counts 0, 1, 2, 3 (if = 3 then toggle the output and set counter to zero)
The other similarely counts 0..8
Klaus