16F877a disable psp and make portA and E as digital

Status
Not open for further replies.

varunme

Advanced Member level 3
Joined
Aug 10, 2011
Messages
741
Helped
17
Reputation
36
Reaction score
17
Trophy points
1,318
Activity points
5,764
for setting port A and E as digital and disable PSP, is the below code enough, or we need any further declaration ?


Code:
    ADCON1 = 0x07 ;  //Disable all analogs
    CMCON = 7;         //Disable all comparators
    TRISE.f4 = 0;        //PSP off 
    trisa=0xff;            // porta as input
    trise=0xff;            // porte as input
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…