Hello,

I was asking myself about the possibility of using any TTL input of my PIC to "read" 3 different levels.

Roughtly, for TTL values, the LOW level is from 0V to 1V and the HIGH is from 3,5V to 5V.

Assuming this is not completely wrong, would it be possible to read 3 different states on the PIC?

I tried to make it a simple way with a 2 resistor divider between Vdd and Vss. The middle point of the divider is logically connected to the pin.

Two buttons are parallel connected each to a resistor.

In theory, I can simulate 3 states:
1.- 0V (if button "A" is pressed)
2.- something around 2V (no button is pressed)
3.- 5V (if button "B" is pressed)

I can't achieve to read state 2.- but is it really possible... or am I dreaming?