• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic18f452 in mikroc

Thread starter #1
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
Most Helpful Member
#2
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
 

Latest threads

EE World Online Articles

Loading

 
Top