View Single Post
  #8   Spotlight this post!  
Unread 30-04-2008, 16:06
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,809
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Need help with PWM 1-2ms pulse control

Quote:
Originally Posted by Generalx5 View Post
Um...im getting an analog value from 0 - 22. or 0-23, is this right? I thought it was supposed to be from 0 to 254?
Nope, not right, so something is odd.
The direct analog inputs on the EDU controller have 10-bit resolution, so you should see 0-1023 returned as values.
If you are talking about the analog input from a radio transmitter joystick, then that value is indeed 0-254.

How exactly are you printf-ing the value? There may be a simple error there. At least that's where I'd check first.

I assume it looks something similar to:
Code:
printf("Analog input = %d\r\n", (int) Get_Analog_Value(rc_ana_in01));
Is the analog input port initialized properly? e.g., Set_Number_of_Analog_Channels(ONE_ANALOG); // one or more
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 30-04-2008 at 16:12.