Unused µC ADC pins find second life
Kannan Natarajan, Mediatronix Private Limited, Kerala, India -- 2/3/2000
Some PIC µCs, such as the 12C67X and 16C7X, have more than one analog
input channel. If you don't need all the available channels, you can use the
unused channels as general-purpose I/O. For example, you can use unused ADC pins
for power-on status reading and as an output in normal operation.In Figure 1, the jumper selects a mode—the battery charge voltage, for example—by PIC software at power-on. At power-on, software configures the RAX line as an analog input and reads the voltage—for example, 1V at Digit 0 and 2V at Digit 1. The same RAX line also drives the base of a transistor through a 3V zener diode. At power-on, the voltage at the RAX input is insufficient to turn on the transistor. However, after using power-on-initialization software, you configure RAX as a digital output. Now, the low-impedance high/low voltage at RAX can override the bias voltage at the jumper to turn the transistor on and off.
You can easily extend this method to multiple jumpers and BCD switches. The only condition is that the voltage that the jumpers determine should be less than 3V and that impedance should be high. (DI #2475)
© 2009, Reed Business Information, a division of Reed Elsevier Inc. All Rights Reserved.

