What are you doing with the analog settings or pins.?
What are you doing with the analog settings or pins.?
Dave
Always wear safety glasses while programming.
Im not using any analogue. The datasheet says analogue is disabled if ADCON1.0 is 0. It also says that its 0 by default.
I seem to remember these outputs working before by they arnt doing now. Ive not added any code that changes the state of those pins anywhere except the 1 line
Try adding this to the start of your code.
Code:ADCON1=7 CMCON=7
Dave
Always wear safety glasses while programming.
ADCON0.0 is the start/stop bit of ADCON0.
ADCON1 is where the pins are controlled. There is a table in the ADCON1 section.
Comparators are similar.
This also helps.
http://www.picbasic.co.uk/forum/showthread.php?t=561
Have Fun![]()
Dave
Always wear safety glasses while programming.
Im sure ive been pointed to that thread before. I knew about the problem but i thought the settings i had would stop it. Aparently not. I must have misread the datasheet and completely overlooked CMCON.
I should probably read the whole datasheet when using a PIC. The only problem is that by about page 50 i cant remember what was on page 1. There are a few PICs (including the 16F877A) which seem to cover just about everything i do so hopefully if i just concentrate on these few ill get to know them better.
It just takes a little time. You are doing fine.
I only have a dozen or so chips that I use and many of them I do not use all of the features.
Still learning myself.
Dave
Always wear safety glasses while programming.
Bookmarks