This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2553: Using ADC to read switch values from R2R network, can I use digital input to start the process?

Part Number: MSP430G2553

I'd like to use a ADC to read pushbutton values from an R2R ladder, but, to save power, don't want to continuously read the value.

Here's the plan (which exists only in my imagination):

Configure an input pin as a digital input with an interrupt on low/high transition. Power consumption=zero.

Interrupt occurs, reconfigure it as an analog input to read the value. Continuously read the value (which may include several different pushbutton patterns).

When all the buttons are released, the analog value should be (close to) zero. Wait a bit in case another button is pressed, then reconfigure back to a digital input.

I haven't tried 'yet, because I am hoping someone has. If it just doesn't work, I'll abandon the idea. If someone has made it work (or something similar) I'll pursue it further.

What resistor values would work? When all the buttons are open, the digital input is floating. Is this a problem? Do I need a pulldown resistor? If that adversly affects the balance of the R2R ladder, I can adjust for it in the software. There is really no reason for the bit pattern coming out of the ADC to match the pattern of the pushbuttons, as long as I can tell which button(s) is pressed.

Any other pitfalls? Your educated opinions are valued.

  • I just looked at the R2R ladder and it already has a pulldown resistor, so I withdraw the part about floating input.

  • The biggest problem is the wide variation in positive going logic high threshold. Max is stated as 0.75Vcc. Which means all of your button voltages have to fit into that span between 0.75Vcc and Vcc.

  • You're right. That means all the button voltages have to fit in 0.75Vcc and Vcc, except 0. I tried to find resistor values to make it work, but couldn't find them. Maybe they are in hiding, or maybe they don't exist. In either case, I have concluded that this is not a practical solution. Oh, well.

  • Afterthought: if the question doesn't have an answer, change the question.Remove the requirement that we can read any simultaneous combination of buttons (implied by R2R). Add the requirement that only one button can be pressed at a time. Each button then connects a voltage divider to the ADC. The number of buttons is only limited by the accuracy of the ADC and the precision of the resistors. I think I can get 10 buttons using 5% resistors. (The result of pressing more than one button is undefined. Well, it's well defined, but not useful, so we'll say undefined.)

**Attention** This is a public forum