cancel
Showing results for 
Search instead for 
Did you mean: 

Using PA as a Imput

sbencke3
Associate II
Posted on February 02, 2004 at 17:15

Using PA as a Imput

2 REPLIES 2
sbencke3
Associate II
Posted on May 17, 2011 at 11:58

I'm having some problems to configure PA to be a Input, I make a simple code as folow:

main{

PSD8xx_reg.VM |= 0x80;

PSD8xx_reg.DIRECTION_A = 0x00;

PSD8xx_reg.DIRECTION_B = 0x00;

While(1){

printfLCD(''PA = %x \n'', PSD8xx_reg.DATAIN_A);

printfLCD(''PB = %x \n'', PSD8xx_reg.DATAIN_B);

}

}

I don't have problems with PortB, just with Port A. Does I have to make somethink special in the port A ?

joseph2399
Associate II
Posted on May 17, 2011 at 11:58

If you want your Port A to behave the same way as your Port B which is in MCU I/O mode, then do not set bit 7 of the VM register, since setting this bit will put your Port A to Peripherial I/O mode.