View Single Post
  #2   Spotlight this post!  
Unread 22-01-2008, 17:03
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,746
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Trouble Generaing PWM output

First question: Are you seeing the two printf statements in your terminal window?

Second question: can you post a picture of your setup?

The code looks just fine to me, it could very well be something with your setup.

Also, be aware that there are 12 "standard" PWM outputs (refreshed every 17mSec) and 4 "fast" PWM outputs (refreshed up to every 2mSec) - these could have an effect on what you want to do.

FWIW, we hooked our motors up to PWM01 and 02 last year, and had no problems controlling the robot - 17ms is still way faster than the combination between human perception and the ability to move the joystick to the desired location!