View Single Post
  #6   Spotlight this post!  
Unread 04-02-2007, 13:39
Shinigami2057 Shinigami2057 is offline
Slackware Is Your New God (Mentor)
AKA: Harry Bock
FRC #1350 (Rambots)
Team Role: Programmer
 
Join Date: Oct 2006
Rookie Year: 2006
Location: Johnston, RI
Posts: 106
Shinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really niceShinigami2057 is just really nice
Re: Potentiometer with ADC

How is that a problem when analog inputs return an unsigned int (16-bits on the PIC18, more than enough for the 10-bit ADC conversion)? I'm assuming %d is expecting an int, so it should be fine. Even if the compiler was lopping of the 2 MSbs of the result, it should still return a value from 0-255.

Thanks for the help, though. We're going to try some new linear taper 10k/50k pots tomorrow. We really weren't sure exactly what kind of pots the old ones were, only that they were 100k ohm.
__________________
One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.