cancel
Showing results for 
Search instead for 
Did you mean: 

Port A problem!!!

saint
Associate II
Posted on November 23, 2005 at 07:27

Port A problem!!!

2 REPLIES 2
saint
Associate II
Posted on May 17, 2011 at 12:09

Hi

I`m using port A as GPIO input pins ,but they can`t receive the data that I sent, the part of my source code as follow Is there anyother register I must check??

PSD_reg.DRIVE_A &=0x0F;

PSD_reg.OUTENABLE_A |=0xF0;

PSD_reg.CONTROL_A &=0x0F;

PSD_reg.DIRECTION_A &=0x0F;

PSD_reg.DATAOUT_A |=0xF0;

if(PSD_reg.DATAIN_A & bmBIT4) port_val |=bmBIT1;

if(PSD_reg.DATAIN_A & bmBIT5) port_val |=bmBIT2;

if(PSD_reg.DATAIN_A & bmBIT6) port_val |=bmBIT3;

if(PSD_reg.DATAIN_A & bmBIT7) port_val |=bmBIT4;

saint
Associate II
Posted on May 17, 2011 at 12:09

thank you so much I found what the problem is

The bit 7 of VM register should be set to '0' (Disable Peripheral I/O mode)

thank you again !!! :)