Since you're using PORTA (Analog pins) as digital ...
I might suggest ...
ALLDIGITAL.pbp
http://www.picbasic.co.uk/forum/showthread.php?t=11100
<br>
Since you're using PORTA (Analog pins) as digital ...
I might suggest ...
ALLDIGITAL.pbp
http://www.picbasic.co.uk/forum/showthread.php?t=11100
<br>
DT
Thanks for the link.
Is there not just a short command that I can place into the code that will change all of PortA pins to digital input? I have been able to get the button to work on PortB so I am sure my code is right, is just doesnt work on PortA.
Sorry for the newb questions!
Would this work?
Code:CMCON = 7 ADCON1 = 7
Last edited by gtrplaya101; - 13th October 2009 at 21:28.
That's what AllDigital does ...Code:INCLUDE "ALLDIGITAL.pbp"Yes, that will work on a 16F877A.Would this work?
Code:CMCON = 7 ADCON1 = 7
And is exactly what AllDigital would do.
But when you go to use a different chip, those registers will probably not work anymore and you'll have to search the datasheets to see which ones are needed for that chip.
AllDigital will still work no matter which chip you are using.
<br>
DT
Bookmarks