2005-11-22 10:27 PM
2011-05-17 03:09 AM
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;2011-05-17 03:09 AM
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 !!! :)