yes it is simplest to use a timer ISR. It can create all signals.
you can use a byte variables named bStepSate and check its value in the ISR. Then based on the value you take some action and change the value/state.
Depending on the frequency it will give some load on the system while executing but it will not slow down the main code much.
when splitting tasks you can use i2c. it is very simple and reliable. when having enough pins you could use SPI ot shiftin/shiftout as well.
i2c slave works in interrupt mode so i would use that, but my first choice would be to put the code in the main chip.
↧