I've been using this code:
const double freq = 0.8 * 1.0e6; //in hertz
void setup() {
TCCR2A = ((1 << WGM21) | (1 << COM2A0));
TCCR2B = (1<<CS20);
TIMSK2 = 0;
OCR2A = 0.5 * (F_CPU / freq) - 1;
}
void loop() {
}
in order to get a 0.8 MHz signal out of pin 11 on my arduino UNO and its working great. However I need another clock signal so that its frequency will be 0.2 MHz. Is there a way to create two different clock signal from two different pins on an arduino UNO?
Thanks for the helpers