I am looking for some advice for design hints to make a "signal multiplexer" with an Atmega168.
Signal input comes from 8 digital IO, and output signal goes to one pin. Signal input min period between two front is 800 usec, and same for signal output.
What method would you advice to do this.
- output signal handled by timer 1
- input signal read by polling, and using counter1
- ouptput signal handled by polling based on counter1
- input signals polled using counter1
and all written in C.
I got fairly poor accuracy of the output signal as shown by the oscilloscope. I wanted a 1 microsecond accuracy, but it looks signal varies to much.
Any advice ?