Pic18f452 in mikroc

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

Ian Rogers

User Extraordinaire
Forum Supporter
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