Pic18f452 in mikroc

Status
Not open for further replies.

Barasha

New Member
Hello all,

I am a beginner in mikroC. Getting error in the following lines every time program is compiled.Need some help if the following commands are not applicable for PIC18F452.

ADCON1 |= 0x0F; // Configure AN pins as digital
CMCON |= 7; // Turn off comparators
 
The compatators is off by default on that chip so you don't need that one...

Code:
ADCON1 |= 7;
is a valid command... However, the "|" character on some keyboards has the wrong ASCII number.

If you try
Code:
ADCON1 = 0x0F;
..... to see if it compiles
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…