Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to disable comparator mode

Status
Not open for further replies.

Faisal Nouman

Junior Member level 1
Joined
Sep 22, 2011
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Pakistan
Activity points
1,399
Hello people
i want to know how can i disable the comparator mode in PIC18f458
i am feeding analogue input at pin RA0 to covert it in digital value
it was working good but now the pin is giving constant 3.5 volts and analogue is not converted into digital
i came to know that this is because of comparator
but i do not know how to disable it
kindly anybody tell me how to disable it and instruction for it
i am using mikroC as compiler
 

according to datasheet page 251...when we write 0x07 to CMCON register..it will be disable the comparator and put RD0 to RD3 into digital mode...

just put

CMCON = 0x07;

into the initialization routine of your code...

good luck...
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top