CC18: Analog inputs
This does not apply to the CC16
The CC18 has two analog voltage inputs. The input voltage range is 0 to Vcc, where Vcc is the +5V nominal onboard logic power supply. The onboard 5V regulator (which is effectively the analog reference voltage) is accurate to ±5%. The resolution is 10 bits (0.1%).
These inputs are very well suited to use with the ratiometric sensor devices that are becoming common. These sensors run off a 5V logic supply and give an output proportional to the supply voltage X the quantity being measured. The inputs will also work very well with potentiometers.
The following diagram shows the analog pinning and a potentiometer connected to one input.
This circuit will give a floating point analog reading (fAnIn 0
instruction) of 0 with the wiper at the top of the diagram (at the 0V end of the potentiometer) and 1.0 at the other end.
How to blow up the analog inputs
- Apply more than ±24V to the analog input pins.
- Apply any external voltage to the +5V pin.