I've got a project where I need to select between 3 options and only have one pin spare. I'd like any opinions on the method I'm thinking of using to select the 3 options.
Tie the pin to ground with a 100k resistor and have solder pads that can ground the pin or tie it to Vcc.
In code,
If the pin is high then it's tied to Vcc = option 1.
else, turn on WPU (20k ish) - if pin high then open circuit - option 2
else, option 3 - must be tied low.
The thing I'm worried about is the value of the WPUs as this isn't guaranteed but is stated in datasheets - as a current, not resistance.
The datasheet I'm looking at has 100uA as the typical WPU current but as low as 25uA @3.3V. 130k equiv.
The more I type the more I think this is a bad idea.
Maybe I can tie the pulldown to another pin so I can turn it on/off at boot time.
TIA,
Mike.
Tie the pin to ground with a 100k resistor and have solder pads that can ground the pin or tie it to Vcc.
In code,
If the pin is high then it's tied to Vcc = option 1.
else, turn on WPU (20k ish) - if pin high then open circuit - option 2
else, option 3 - must be tied low.
The thing I'm worried about is the value of the WPUs as this isn't guaranteed but is stated in datasheets - as a current, not resistance.
The datasheet I'm looking at has 100uA as the typical WPU current but as low as 25uA @3.3V. 130k equiv.
The more I type the more I think this is a bad idea.
Maybe I can tie the pulldown to another pin so I can turn it on/off at boot time.
TIA,
Mike.