what are the levels for digital input?

Hi, I have a digital sensor that outputs 1V in low state and 3V in high state.
I am always reading low in both ways.
What are the voltage levels needed for low and high?
I couldn’t find that in the datasheet.
thanks so much!

Check for “Electrical Characteristics”. It’s usually stated on ALL Datasheets

Found, it says:

Input low voltage: min 0, max 0.2Vcc
Input high: min 0.8
Vcc, max -

My XBee is installed in the 990.001 board. It is internally power regulated, but the Vin voltage comes from 3 AA batteries, so 4.5V.
I think that Vcc is 3.3V due to the voltage regulator, is it right?
So, input low should be no more that 0.2*3.3=0.66 V
and input high should be above 2.64 V
Is all this correct?

Yes that’s correct!
You could have already tried that and verify tat in the lab by now. (if you have one).

You can google what the Voltage Regulator does, jz google the # you can read on the Vreg.
I’m not sure what board are u using. Haven’t heard of that before.

I have measured the voltage across pin 1 and 10 of the XBee and it’s approx. 3.3V, so the values I calculated above are correct.
Unfortunately, it seems that both values are low (or high) for the digital pin!

Hmm, if I’m getting this right… It’s a digital pin correct?
And Digital Pins only Outputs or Inputs discreet signals, i.e.: True Or False, High or Low.
Perhaps what you need is the Analog Pins. Take a look at the datasheet again, in there it explains how to configure them. [Hint: X-CTU]
Also, do take note of the maximum threshold voltage for the Analog Pins that it can accept, since it’s an ADC so, figure out :slight_smile:

Just a thought: have you made sure you’ve disabled the pullup resistors for the inputs yoy’re using? Or alternatively, if the pullup resistors are still enabled, have you made sure that that’s the way you want them to be?

Hmm, if I’m getting this right… It’s a digital pin correct?
And Digital Pins only Outputs or Inputs discreet signals, i.e.: True Or False, High or Low.
Perhaps what you need is the Analog Pins. Take a look at the datasheet again, in there it explains how to configure them. [Hint: X-CTU]
Also, do take note of the maximum threshold voltage for the Analog Pins that it can accept, since it’s an ADC so, figure out :slight_smile:

The sensor is this one:
http://www.vishay.com/docs/81732/tsop348.pdf
I thought I could have used the digital input, since it outputs at 2 discrete levels. Is this incorrect?

I have tried pullup resistors both enabled and disabled!

I thought I could have used the digital input, since it outputs at 2 discrete levels. Is this incorrect?
looked through your datasheet at a glance. It’s discreet to me. Do you a have multimeter?
Run through a simple test (w/o connecting to the XBee pin yet). Connect your sensor like in the application circuit (pg 1), cept leave the uC node open circuit. Test the photo detector and measure the Voltage when low and high.
By right, it should work with the XBee. If you run the above independent test, you’ll find out where the problem lies since you’ve isolated the photo detector from the XBee. I suspect the problem lies in your photo detector configuration