Thread: Pwm and pot
View Single Post
  #3   Spotlight this post!  
Unread 29-01-2006, 18:47
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Pwm and pot

Quote:
Originally Posted by steven114
Actually, you'd have to do something more like:
Code:
pwm01 = Get_Analog_Value(rc_ana_in01) >> 2;
The controller doesn't sample the analog inputs until you call Get_Analog_Value, and the shift is to convert the 10-bit analog input to the 8-bit PWM output.
Yep... my mistake.
__________________