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