hi
im using RA0,RA1 for bump detection, R2 for Infrared detect and RA3 & RA4 for sound detection. My inputs are all digital inputs i'm not using A/D.
I have set
OPTION_REG = 0xff;
ADCON1=0x06; //SET RA0,1,2,3,4,5 as digital inputs//
STATUS = 0x3f; // bank 1 //
TRISA = 0x07;
STATUS = 0x1f; // bank 0 //
and my robot responds to the inputs
but when i set TRISA=0x40; //111111 set RA0,1,2,3,4,5 as input//
my robot is not responding to the inputs!!!!!!!!!!!!!!
any ideas what's GOING ON WITH TRISA?
im using RA0,RA1 for bump detection, R2 for Infrared detect and RA3 & RA4 for sound detection. My inputs are all digital inputs i'm not using A/D.
I have set
OPTION_REG = 0xff;
ADCON1=0x06; //SET RA0,1,2,3,4,5 as digital inputs//
STATUS = 0x3f; // bank 1 //
TRISA = 0x07;
STATUS = 0x1f; // bank 0 //
and my robot responds to the inputs
but when i set TRISA=0x40; //111111 set RA0,1,2,3,4,5 as input//
my robot is not responding to the inputs!!!!!!!!!!!!!!
any ideas what's GOING ON WITH TRISA?