I’m new to PIC controllers and have a question that will probably be simple, but I cannot find the answer anywhere. I’ve got a 16F527 that I’m controlling a 3 digit 7 segment LED display. The outputs to the display are on PORTC and the transistor driver outputs are on PORTB. I’ve got 3 input switches, one that increments the display, one that decrements it and one that clears it to ‘000’. I’ve got the + and - working on RA0 and RA2 respectively, but I cannot get the third one working on RA4 (or any other RAx for that matter. I’ve turned off analog inputs, both comparitors and the opamps. Everything works until I add in the code for the third button. When I do three things happen: 1) when the clear button is pressed the LED sometimes resets to ‘000’, and sometimes displays a random value. 2) when the clear button is pressed the display blinks really quickly. (I don’t have a debounce per say, I disable the button until it detects that it has been released). 3) the PIC will randomly not work on power on, none of the buttons will work. I could just make RB7 an input and be done with it, but as I’m new to all this I’d really like to know what I’m doing wrong (or simply that what I’m trying is not possible due to xxx).
Thanks in advance
mike