PDA

View Full Version : PortA.5 don't react



SKOLS1
- 12th April 2012, 10:20
I have connected a push-switch to a PortA.5 on PIC16F876A.But it's not responding.Here is the code:

DOWN VAR PORTA.5

if DOWN=0 Then
IF SETBAND = 1 THEN
SETHEAT=SETHEAT-1

write 1,setheat
ELSE
SETCOOL=SETCOOL-1
WRITE 2,SETCOOL
ENDIF
endif

c_moore
- 12th April 2012, 10:55
Do you have portA configured as digital? do you have a pullup/pulldown resistor on your input pin?

mackrackit
- 13th April 2012, 00:14
http://www.picbasic.co.uk/forum/showthread.php?t=561