View Single Post
  #6   Spotlight this post!  
Unread 10-03-2006, 01:15
The Lucas's Avatar
The Lucas The Lucas is offline
CaMOElot, it is a silly place
AKA: My First Name is really "The" (or Brian)
FRC #0365 (The Miracle Workerz); FRC#1495 (AGR); FRC#4342 (Demon)
Team Role: Mentor
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Dela-Where?
Posts: 1,564
The Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond reputeThe Lucas has a reputation beyond repute
Send a message via AIM to The Lucas
Re: Timer0 stubbornly not working

Quote:
Originally Posted by IFI
Yes, all five timers can be available for you to use in your code.

Timers 1-4 are available by default.

Timer 0, however, is used by the Generate_Pwms() function if you use ifi_library.lib or FRC_library.lib. These libraries use Timer0 to synchronize any PWM outputs generated by the User processor to make sure they avoid any SPI interrupts.

If you want to use Timer0 yourself, then you can replace ifi_library.lib/FRC_library.lib with ifi_alltimers.lib/FRC_alltimers.lib in the project.

A white paper with an example of using a timer can be found here,
You can't use Timer0 because Generate_Pwms() is screwing it up according to the FAQ here . You are probably getting the same counts every cycle (like I was when I was trying to tach my shooter). Use a different timer. I need to sleep now, since I have robots to fix/inspect in the morning
__________________
Electrical & Programming Mentor ---Team #365 "The Miracle Workerz"
Programming Mentor ---Team #4342 "Demon Robotics"
Founding Mentor --- Team #1495 Avon Grove High School
2007 CMP Chairman's Award - Thanks to all MOE members (and others) past and present who made it a reality.
Robot Inspector
"I don't think I'm ever more ''aware'' than I am right after I burn my thumb with a soldering iron"