View Single Post
  #7   Spotlight this post!  
Unread 03-10-2007, 18:17
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: pwm signal delay

Quote:
Originally Posted by Alan Anderson View Post
There is still some occasional twitchiness with Kevin's code when writing EEPROM. It doesn't affect normal robot operation, and I haven't taken the time to figure out whether it's due to interrupts being disabled briefly or some other cause.
The PWM code should be pretty solid at this point. If the twitchiness occurs while saving camera parameters to EEPROM, the likely problem is that I call printf() many times in rapid succession to draw the menu on the terminal screen. This bogs down the CPU and causes a long delay between PWM pulses. If the delay is long enough, the servos assume something is wrong and attempt to center the output shaft. In practice this isn't a problem and can be fixed by using a state machine to dole out the printf()s a few at a time.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org