Thread: Analogs.....
View Single Post
  #3   Spotlight this post!  
Unread 17-01-2006, 21:23
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Analogs.....

Quote:
Originally Posted by Jake M
I probably know the answer to this question, but I'm not that good with techincal terms. What is an analog input? What's the difference between an analog and, say, a digital.
Jake,
Basally a digital signal is an analog signal that follows certain rules.

An analog signal is basically ANY signal. It has no restrictions. Digital signals are (in the case of the 5v CMOS levels used on the RC) signals whose voltages ideally only equal 5V or 0V.

Those signals, because they can have only 2 values, can be encoded as a 0 or 1 (a single bit) in the microcontroller. The analog signals (bounded to 0V to 5V for this microcontroller) can be anything in between. The values are therefore encoded as a number between 0 and 1023 (if using the ADC in 10-bit mode) or 0 to 255 (8-bit mode). The values are evenly distributed across the range. So the Voltage = Code * 5V / 2^(bitwidth). Bitwidth being the setting of the ADC (8 or 10).

Cheers!
-Joe

Last edited by Joe Hershberger : 17-01-2006 at 21:28. Reason: correction