Thanks,
Hmm i see the 644 has more timers on board.
BTW.
In my experiments i did this:
void setup() {
pinMode(9, OUTPUT); //OC1A
pinMode(10, OUTPUT); //OC1B
}
void loop() {
TCCR1A = bit (COM1A0) | bit (COM1B0); // | bit (WGM10) | bit (WGM11);
OCR1A = 50000; //count to 50001, relative to ZERO!
TCCR1B = bit (CS12) | bit (WGM12);// | bit (WGM13);
OCR1A = 50000; //count to 50001, relative to ZERO!
OCR1B = 10; //count to 10001, relative to ZERO!
}
But as you can see when i change the pulse width then the frequency also changes and vice versa.
I then mapped analog inputs to change the countervalues etc, but that method isn't what i'm after
i did that some time ago
I'll have a look at how you used fastpwm and if that works the same on the 328 chip.
Yea.. I tend to waste time on doing things the hard way hehehe i tried to take a shortcut with my question and yea i've cut the corner a bit rough there.:-)
Hmm i see the 644 has more timers on board.
BTW.
In my experiments i did this:
void setup() {
pinMode(9, OUTPUT); //OC1A
pinMode(10, OUTPUT); //OC1B
}
void loop() {
TCCR1A = bit (COM1A0) | bit (COM1B0); // | bit (WGM10) | bit (WGM11);
OCR1A = 50000; //count to 50001, relative to ZERO!
TCCR1B = bit (CS12) | bit (WGM12);// | bit (WGM13);
OCR1A = 50000; //count to 50001, relative to ZERO!
OCR1B = 10; //count to 10001, relative to ZERO!
}
But as you can see when i change the pulse width then the frequency also changes and vice versa.
I then mapped analog inputs to change the countervalues etc, but that method isn't what i'm after
i did that some time ago
I'll have a look at how you used fastpwm and if that works the same on the 328 chip.
Yea.. I tend to waste time on doing things the hard way hehehe i tried to take a shortcut with my question and yea i've cut the corner a bit rough there.:-)