1. 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.
    Dismiss Notice

Pic18f452 in mikroc

Discussion in 'Code Repository' started by Barasha, Sep 25, 2013.

  1. Barasha

    Barasha New Member

    Joined:
    Oct 2, 2012
    Messages:
    1
    Likes:
    0
    Location:
    India
    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
     
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    8,946
    Likes:
    877
    Location:
    Rochdale UK
    ONLINE
    The compatators is off by default on that chip so you don't need that one...

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

    If you try
    Code (text):
    ADCON1 = 0x0F;
    ..... to see if it compiles
     

Share This Page