Go Down

Topic: Fast PWM causing some problems (Read 651 times) previous topic - next topic

andyjjones

#5
May 24, 2011, 07:00 am Last Edit: May 24, 2011, 07:02 am by andyjjones Reason: 1

Quote
completely bonkers

Jerry Lewis comedic bonkers, or Harold Camping barking-mad bonkers?


Actually more along the lines of Dizzee Rascal - Bonkers.  Sorry to not be more specific.

I copied the these following two lines of code from somewhere else, and they worked:

Code: [Select]
//    TCCR1B=TCCR1B&0xf8|0x01;    // Pin9,Pin10 PWM 31250Hz
//    TCCR2B=TCCR2B&0xf8|0x01;    // Pin3,Pin11 PWM 31250Hz


Which modifies just Timer 1 and Timer 2 prescalers (I think?).  Pin3 and Pin11 are not connected to my motor drivers, so I just used some jumper wires and now it works.

I guess Timer 0 is off limits to change the prescaler.

Go Up