Page 1 of 1

CMCON not recognised

Posted: 01 Aug 2016 05:15
by Mikwabobo
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.

Re: CMCON not recognised

Posted: 01 Aug 2016 14:21
by lana.arsic
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