Society of Robots - Robot Forum
Software => Software => Topic started by: fiflak666 on March 03, 2009, 01:41:38 PM
-
http://www.societyofrobots.com/member_tutorials/node/231 (http://www.societyofrobots.com/member_tutorials/node/231)
this tutorial is very useful but I found an error
at the page that I linked above there is something like this:
TCCR1B = (1 << WGM13) | (1<<WGM12) | (1<<WGM11) | (1 << CS10);
but TCCR1B register doesnt have WGM11 flag
it sholud like like this:
TCCR1B = (1 << WGM13) | (1<<WGM12) | (1 << CS10);
TCCR1A = (1 << COM1A1) | (1 << COM1B1) | (1 << WGM11);
-
Hi.
I wrote the tutorial so thanks for spotting any errors.
PWM and Timers are rather unportable from one controller/Timer to another - with different bits in different registers etc. So rather complex.
Can you let me know which processor you are using, and which Timer you are using - then I can update it.
Thanks in anticaption.
Webbot
-
I think he is right........
TCCR1B only has WGM12 and WGM13....
At least the ATMEGA32 and ATMEGA8 you have in the tutorial are by this....