CCK,
Are you sure it's not a 16F877A
If it is, you'll also need CMCON = 7
<br>
CCK,
Are you sure it's not a 16F877A
If it is, you'll also need CMCON = 7
<br>
DT
It is actually the 877 and not the 877A. I thought the same thing at first until I double checked the actual chip. I did however since discover the issue. It has some to do with Bit7 for the ADCON1 register. I made it 1 instead of 0 and everything seems to work fine now. I don't understand why because the A/D is turned off for the justification I would not think would have any bearing on this matter but it seems to.
You've GOT to be kidding!
That's the strangest thing I've ever heard about PIC's.
I use ADCON1=7 alot, and have never had to ADCON1=$87 for digital inputs. And, ADCON1=6 works well too.
Is it repeatable? Changing ADCON1.7 back to 0, causes the same thing again?
<br>
DT
Well this makes no sense but I just checked it again with a 0 and it now works. I'm not sure what to make of this. Maybe I changed something else and forgot that I did that. Not sure what to make of it. It seems to work fine now![]()
ADCON1 = %00001111 is setting RA0 as A/D in, RA2 as -Vref & RA3 as +Vref.
What does it mean when the datasheet says "Bit is unknown"? How do you make all the ports digital because the datasheet says 011x with x being an unknown?
X in this case means it doesn't matter what the bit is. ADCON1 = %00000111 or ADCON1 = %00000110 will have the same effect.
Bookmarks