CMCON not recognised

General discussion on mikroBasic.
Post Reply
Author
Message
Mikwabobo
Posts: 2
Joined: 26 Jul 2016 14:42

CMCON not recognised

#1 Post by Mikwabobo » 01 Aug 2016 05:15

I am doing a project with pic16f877a but when i used
CMCON =0x7 to off comparator , the compiler complained that CMCON not declared. . Plus ANSEL and ANSELH are not recognized.Please ,i am new to mikroC . Can someone help me out.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: CMCON not recognised

#2 Post by lana.arsic » 01 Aug 2016 14:21

Hi Mikwabobo,

Welcome to the MikroE forum.

CMCON =0x07 will compile without errors in the newest version,
which you can download at this link:

http://www.mikroe.com/mikrobasic/pic/

PIC16F877A doesn't have ANSEL and ANSELH registers,
you can try to use ADCON1 and ADCON0 instead, please check the datasheet:

http://ww1.microchip.com/downloads/en/D ... 39582C.pdf

Best regards,
Lana

Post Reply

Return to “mikroBasic General”