ADC using c language programming and using PIC16f877a

Thread Starter

nurul farhan

Joined Feb 9, 2012
my project is about to compare reference voltage and input voltage,reference voltage is 240V and variable input voltage, so the idea is when the input voltage less than reference voltage,the input will goes low and when input voltage is 240v it will be high..the ports is not so important because i'm using simulation only.

anyone can help me?a.s.a.p

thnk so much...


Joined Apr 24, 2011
If all you want to do is compare two voltage levels then all you need is a voltage comparator, not a micro controller.

You will need resistive dividers to drop down the large voltage inputs to something more suitable for low level signal applications (<±15V max, <+5V typical)