Practical guide to Bus Pirate pull-up resistors

From DP

Jump to: navigation , search

There's often some confusion about how the Bus Pirate's on-board pull-up resistors work.

Contents

How the on-board pull-up resistors work

pullups.ii

The figure outlines the basic parts of the Bus Pirate v2go/v3/+ on-board pull-up resistors.

  • A pull-up (or pull-down) voltage supplied through the Vpullup (Vpu) pin is fed into a CD4066 analog switch (IC3).
  • The 4066 distributes the pull-up voltage to four 10K resistors (R20-23) that connect to the MOSI, CLOCK, MISO, and CS bus pins.

Connect a voltage to the Vpullup pin

I2C>v <<< voltage monitor report
VOLTAGE MONITOR: 5V: 5.0 | 3.3V: 3.3 | VPULLUP: 5.0 |
I2C>

You must connect the Vpullup pin to a voltage.

The pull-up resistors aren't hard-wired to a power supply, you can apply any voltage level that's needed (from ground to +5volts). Type 'v' in the Bus Pirate terminal to see the current voltage on the Vpullup pin.

When the main microcontroller (IC1) holds the 4066 enable pin at 0volts the pull-up voltage is blocked and nothing goes through the resistors. When the enable pin is high, the pull-up voltage is allowed through the 4066 and the resistors hold the bus pins at the level of the Vpullup pin.

Activate the pull-up resistors

2WIRE> p
Pull-up resistors OFF
2WIRE> P <<<enable the pull-up resistors
Pull-up resistors ON
2WIRE>

p and P toggle the pull-up resistors off and on. Capital P 2 enables the 4066, and the voltage on the Vpullup pin is applied to the 10K pull-up resistors.

2WIRE> P
Pull-up resistors ON
Warning: no voltage on Vpullup pin<<<check voltage report
2WIRE>

If you get the error Warning: no voltage on Vpullup pin check the voltage report (v) and verify that a voltage is attached to the Vpullup pin.

If you connected Vpullup to the Bus Pirate's 3.3volt or 5.0volt supply, be sure to use the 'W' command to enable the power supplies.

pull-up voltage select

V4 hardware only

I2C>e <<<pull-up voltage select menu
Select Vpu source
1) None or external
2) Onboard 3V3 Vreg
3) Onboard 5V Vreg
(1)>2
3V3 on-board pullup voltage enabled
I2C>

The voltage applied to the pull-up resistors can be toggled between 3.3volts, 5volts, and the Vpu pin of the IO header, using the e menu. This is available on v4 hardware only.

More Information

Read more about pull-up resistors and the Bus Pirate's open collector output mode (HiZ):