I have been working for days on an RF project, and I suspect I'm going crazy.
I have put a button on my 16F877a just so I can tell it to do something.
The problem is, that when I press the button it activates, but when I let go of it, it stays activated.
I have gone as low as a 560ohm pullup/down resistor. Tried pulling to ground, and to +5V.
I am currently using pin D.0
Code:TRISD = %10000000 but VAR PORTD.0 .... Start: lcdout $fe,$80,"Rec ",dec counter lcdout $fe,$c0,bin result," " lcdout $fe,$d4,bin stats," " if but = 1 then lcdout $fe,$8A,"B" gosub chkstatus else lcdout $fe,$8A," " endif if nIRQ = 0 then lcdout $fe,$94,"Receiving!" gosub receive else lcdout $fe,$94,"Waiting..." endif pause 50 counter = counter + 1 goto start
With a 560ohm to +5v, and the button to ground. After it has been pressed, and depressed - I am still measuring 185mV on pin D.0. Even after I remove the jump wire to the button entirely, I am still reading 185mV on the pic with only the resistor connected to +5v.
HOWEVER... If I take the jump wire from pin D.0 and connect it straight to +5v, and then to ground. The display and functions work as expected.
How could I have done this? I have tried 2 different (new) 877a's, and several port pins.
Running on 10MHz, 5V regulated, smoothing caps, on a breadboard.




Bookmarks