OK first of I'm still getting my feet wet with pic programming so this is probably a simple answer is just has me stuck.
Is there something special about PortA.5 that I'm missing?
I'm using PBP, on a PIC16F876A, below is a small part (abbreviated) of the code, I am pulling portA pins low with a switch, and they should then light up the LEDs on portB in theory
PortA.2 is measuring the value of a pot to adjust the amount of time the LED is on. Everything works except for PortA.5 it is just dead
no matter what state PortA.5 is in it has no effect on the PortB.5 LED...
Is there something special about PortA.5 that I'm missing?
I'm using PBP, on a PIC16F876A, below is a small part (abbreviated) of the code, I am pulling portA pins low with a switch, and they should then light up the LEDs on portB in theory
Code:
Y var Word
Define ADC_BITS 8
Define ADC_CLOCK 3
Define ADC_SAMPLEUS 50
ADCON1 = 7
PortA = %11111111
TrisA = %11111111
PortB = %00000000
TrisB = %00000000
main:
adcin 2, Y
Y = Y * 10
If PortA.0 = 0 Then
PortB.0 = 1
Pause Y
PortB.0 =0
Endif
'This part of the code below doesn't work?
If PortA.5 = 0 Then
PortB.5 = 1
Pause Y
PortB.5 = 0
Endif
Goto main