NerdKits - electronics education for a digital generation

You are not logged in. [log in]

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
thatguy's Avatar

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
Noter's Avatar

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
thatguy's Avatar

Thanks buddy, I just realised there is enough ADC pins for what I need too ! I will take a look at that !

Post a Reply

Please log in to post a reply.

Did you know that you can adjust most wire strippers to make it easier to strip insulation faster? Learn more...