Scheme for combined selectable pull-up or pull-down configuration for digital input.

RD123

Member
Generally microcontrollers could have built-in selectable by software, pull-up or pull-down resistors on inputs.
But sometimes there are need for external resistor.



If we know what configuration we need, the circuit is simple:
EGHS-PullUpDownSwitchProtected.jpg



But what if we dont know yet, for what we will use spare pin in the future? Need pull-up or pull-down configuration?
The combined scheme for selectable pull-up or pull-down scheme for digital input:
IMG_20250329_113119.jpg
A2, B2 =external sensor/switch
Between C2 and D2 resistor 4,7k, 10k or potentiometer
Pull-down:
A1+A2, B1+B2, C1+C2, D1+D2
Pull-up:
A2+A3, B2+B3, C2+C3, D2+D3

The configuration can be selected on pcb board using jumper or solderable jumper pin pads.
jumper-cap-2-54mm-pcb-shunts-10pcs-a30395.jpguf6J8xs4E0nv2hiE0P6ZBA.jpeg


The working principle is shown here:
Screenshot_2025-03-29-12-27-15-980-edit_com.proto.circuitsimulator.jpg

Screenshot_2025-03-29-12-26-48-871-edit_com.proto.circuitsimulator.jpg

Screenshot_2025-03-29-12-25-58-319-edit_com.proto.circuitsimulator.jpg
Screenshot_2025-03-29-12-25-31-688-edit_com.proto.circuitsimulator.jpg
 
Back
Top