a question about ports in Dspic(F33..256GP710)

Thread Starter

saman1969

Joined Nov 2, 2012
15
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
 

takao21203

Joined Apr 28, 2012
3,702
Look up the datasheet carefully for that I/O port.

You may also need to configure the I/O routing matrix for some PICs, while I don't know about this particular model.
 
Top