Thread: pwms
View Single Post
  #5   Spotlight this post!  
Unread 11-01-2007, 09:07
charrisTTI charrisTTI is offline
Ramblin' Wreck
AKA: Charles Harris
FRC #0623
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Vienna, VA
Posts: 106
charrisTTI has a spectacular aura aboutcharrisTTI has a spectacular aura about
Send a message via AIM to charrisTTI
Re: pwms

Assigning a value to a PWM output is not the same as turning a digital output on or off. PWM<x> is a data variable in the block of data which is passed back to the master microprocessor. The master microprocessor handles the radio link and generating the motor signals (there is a way to directly control some of the motor signals, but lets not worry about that at this point). PWM stands for Pulse Width Modulated. The signal on the pwm pin is a stream of pulses at a frequency of about 50-55Hz. The width of the pulse varies between 750 us and 2250 us. A 127 value to the pwm variable generates a pulse width of 1500 us and the motor response to this no movement. A 0 value is full speed in one direction and 255 is full speed in the opposite direction.
__________________
FRC 623 2003,2004,2005,2006,2007,2008, 2009, 2010, 2011
FRC 1900 2007
FVC 60 and 193 2006
FVC 3271 2007
FTC 226 and 369 2008, 2009, 2010, 2011
FTC 3806 2010