1st task (phase angle control):
- Read pin change interrupt (120hz zero cross signal) and generate digital output exacly (+- 150us) 0ms-8.3ms later with 83us granularity
2nd task (read analog periodic signal):
- Read 10bit adc every 1ms (timer-based); times of readings may fluctuate +-250us but never more than 1ms
3rd task (graphical display):
- SPI with 4MHz-10MHz to send 128 bytes every 5ms over SPI to display
4th task (wifi):
- Send binary data to computer for visualization by app (128 bytes every 500ms) and, maybe, serve dynamic web pages