Using such a lot of switches....
you should read the articles who use a analog-port to read 4-7 switches !!!
Sleeping:
You have to use a timer to awake (!), because, there is no interrupt covering all your switches.
So you have to save the switches in your RAM, set a timer to wait a time (prescaler, postscaler, ...) to wake up, enable the neccessary interrupts and go sleep. The interrupt will wake up the PIC at the next position (imho) and you have to check, if any switch has been moved.
Loop !
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Bookmarks