error message:undeclared identifier ansel

Status
Not open for further replies.

baltee

Newbie level 5
Joined
Sep 7, 2013
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Location
baltistan
Visit site
Activity points
56




hi everyone
i am novice in programming mikroc.i need your kind help me to understand the problem.
 

ANSEL and ANSELH registers doesn't exist in the PIC you are using. See if you have to configure ADCON1, CMCON, CVRCON registers instead. Zip and post mikroC project files and mention PIC and Clock frequency used. Post a Circuit.
 

Can't help without knowing your Clock frequency and which PORTS you are using as input or output.

Replace the lines


Code C - [expand]
1
2
3
ANSEL = 0;
ANSELH = 0;
OSCCON = 0b01111110;



with


Code C - [expand]
1
2
3
ADCON1 = 0b10000110;
CMCON = 0x07;
CVRCON = 0x00;

 

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…