PIC18 configuration problem

Status
Not open for further replies.

handsprince

Member level 2
Joined
Feb 7, 2006
Messages
43
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,583
pic18 configuration

Below is my C18 code to set up a PORTA , PORTE and PORTB...the problem is, the input port still in analogue mode...i don't know why, can anyone explain to me?

code:
#include <p18f4620.h>
#include <adc.h>
#include <stdlib.h>
#include <stdio.h>
#include <delays.h>
int result,i;
void main( void )
{
TRISA = 0xcF;
TRISB = 0x00;
ADCON1 = 0x07;
CMCON = 0x07;
TRISE = 0X07;
}
 

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…