I want to set '1' pin number 18 (that belongs to port A) of my Dspic . because multitasking of some pins in dspic , i should disable some features of these pin so it will act as I/O pins . but unfortunatly i can not this.
i tested that by instruction "LATA.F12=1" this register change , but pin 18 that related to it does not change to '1'
my code is:
main() {
TRISA.F12=O; //related to pin 18 that belongs to port A
AD1PCFGH=0XFFFF; //for disable of analoug input of some pins
AD1PCFGL=0XFFFF;
AD2PCFGL=0XFFFF;
LATA.F12=1; //set '1' to pin 18
while(1)
{
...
}
}
is any other register that i should set?
thanks
i tested that by instruction "LATA.F12=1" this register change , but pin 18 that related to it does not change to '1'
my code is:
main() {
TRISA.F12=O; //related to pin 18 that belongs to port A
AD1PCFGH=0XFFFF; //for disable of analoug input of some pins
AD1PCFGL=0XFFFF;
AD2PCFGL=0XFFFF;
LATA.F12=1; //set '1' to pin 18
while(1)
{
...
}
}
is any other register that i should set?
thanks