Check the data sheet but if I remember correctly ADCON1 is the register to set on that PIC.
ADCON1 = %01111111
makes all digital.
Check the data sheet but if I remember correctly ADCON1 is the register to set on that PIC.
ADCON1 = %01111111
makes all digital.
Dave
Always wear safety glasses while programming.
Hmmm.
How are the configs set?
Dave
Always wear safety glasses while programming.
I finally found the solution. You cannot clear PORTA
when I removed the code
'PORTA = %01000000 ' Clear PORTA
It worked on the first 'release from reset'. Now all I need is to indivually clear each bit.
How's this for Spaghetti Code
PORTA.1 = 0 :PORTA.2 = 0 :PORTA.3 = 0 :PORTA.4 = 0 :PORTA.5 = 0 :PORTA.6 = 0
A friend of mine writes code that way. Here is a mild sample.
http://www.picbasic.co.uk/forum/showthread.php?t=5407
After you do it that way for awhile it begins to make sence.
Dave
Always wear safety glasses while programming.
Boat-load of errors in wbubels code Dave.
Got an E-Beer ready for the first one to fix em all & explain in detail why...;o}
Last edited by Bruce; - 31st July 2009 at 01:06.
Great!
I saw you configs and was wondering about the OSC setting.
But if it is working...
Dave
Always wear safety glasses while programming.
Bookmarks