
Originally Posted by
blainecf
Make sure:
1. ADCON1 = 7 so that your PORTA pins are digital
2. Set the appropriate TRISA.x = %1 for Digital Input
3. Wire a pull-up resistor (10K from V+ to each pin that will sense the switch)
4. Wire each switch, one side ground, the other to the pin from step #3
5. Set up a loop for polling the ports; High (%1) will be normal, and Low (%0) will show when the switch is held closed.
If you're not used to digital signals, it seems weird to ground out a resistor thats hooked to V+, but just accept it.
Regards,
Bookmarks