Pages: [1]   Go Down
Author Topic: Trying (and failing) to set /32 prescaler  (Read 280 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 30
Needs more lasers...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been given this code to set the timer interrupt prescaler to /64, and it works OK...

  TCCR2B |=      (1<<CS22);                 // turn on  CS22 bit
  TCCR2B &=  ~((1<<CS21) | (1<<CS20));     // turn off CS21/0 bit

I tried to write code to set 0,1,1 to set the prescaler to /32 and it no longer works (timer does not fire) , can someone show me how to load the 0,1,1 values into the bits correctly?

« Last Edit: January 23, 2008, 11:49:32 pm by shobley » Logged

Pages: [1]   Go Up
Jump to: