NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Reading a high or low value from voltage
May 20, 2011 by thatguy ![]() |
Hey guys, I want to be able to read (without using ADC) a pin that will tell me if the voltage is high or low.... What i'm doing, there will be a high voltage sent to the pin and then will stop, is it possible to read a high voltage for example 1, and a low voltage as 0 ? I remember I used to be able to read 0volts and 4.77 volts at one stage, however I can't remember how I did it, I don't believe i used ADC, although I could be wrong. |
---|---|
May 20, 2011 by Noter ![]() |
Sure you can. Take a look at the dip_arithmetic.c sample. It uses dip switches to set the voltage on pins and then reads them as 1 or 0. Then search the forum for "dip_arithmetic" and you'll find lots of additional info. |
May 20, 2011 by thatguy ![]() |
Thanks buddy, I just realised there is enough ADC pins for what I need too ! I will take a look at that ! |
Please log in to post a reply.
Did you know that talking to the microcontroller over the USB/Serial link is easy under Windows, Linux, and OS X? Learn more...
|