How do I turn off all A/D,timers and all the stuff on PIC16F887?
I know that ANSELH=0 turns of the A/D on PORTB but thers tons of extra on the other ports that i dont want..
How do I turn off all A/D,timers and all the stuff on PIC16F887?
I know that ANSELH=0 turns of the A/D on PORTB but thers tons of extra on the other ports that i dont want..
Cut the power supply !
![]()
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
Look at a PIC like a toolbox with lots of funny tools inside (they are acually hardware functions) Some of these functions are activated after a Power on Reset or similar event, other functions stays in the toolbox until you start to use them. You have already figured out how to turn off PORTB analog functions.
You 1--PIC 0
Next we have to worry about Comparators, they are normally a headache so look in the manual, page 87 under 8.6. As you can see a reset event turns this function off and because the PIC makes a POR when it starts this is taken care of.
You 1--PIC 1
Timers and other functions:
Look at other modules and see how they are tured on, look at page 26 Table 2.1 and figure out what the default startup setting is after POR. Table 2.1 shows how things are when the PIC is released from POR
If the module is not turned on by the PIC and you don't want to use it I see no reason at all to activate them, just let them be and they won't bother you. When you see a need for them just get them one by one and use them as you see fit.
The only thing left that can make serious trouble is Ocillator settings 4.0 make sure you read and understand this because this is the key module for all functions, no or wrong ocillator freq and you will not get anywhere nor will your program.
Ok, so this will turn off the Comparators?
And I have no idea how Table 2.1 works :/Code:CMxCON0 CM2CON1
Hi,
Have you read these?
http://www.picbasic.co.uk/forum/showthread.php?t=564
http://www.picbasic.co.uk/forum/showthread.php?t=561
Table 2-1 just tells the address and names of special function registers. Each is covered in the corresponding part of the data sheet. What one are you looking at?
Dave
Always wear safety glasses while programming.
Bookmarks