Hi all
I have a problem with my PIC16F631 chip and PORTA.4
First of I set it's state to low and then set it to be an input port:
Further down the code I check if the port it high or not.
If the port is high I show this by turning on some lights and if it's low I turn them off.
Ok, so far so good, but here's were it goes bad.
If the input on the port goes high the program does what it should, but if it goes low again, at any given time after that, the port stays high and therefore my program think the input on the port is high when in fact it's the port that's high.
PORTA.4 is the only port doing this.
I hope some of you clever Pic coders can help me figure this one out.
Thanks in advance
I have a problem with my PIC16F631 chip and PORTA.4
First of I set it's state to low and then set it to be an input port:
Code:
PORTA = 0b101100;
TRISA = 0b011011;
Further down the code I check if the port it high or not.
If the port is high I show this by turning on some lights and if it's low I turn them off.
Ok, so far so good, but here's were it goes bad.
If the input on the port goes high the program does what it should, but if it goes low again, at any given time after that, the port stays high and therefore my program think the input on the port is high when in fact it's the port that's high.
PORTA.4 is the only port doing this.
I hope some of you clever Pic coders can help me figure this one out.
Thanks in advance