Bus Pirate menu options guide
From DP
This guide was last updated to firmware v5.2.
Menu options are single character commands that configure the Bus Pirate. Type a letter, followed by <enter>, to access the menu. Some options are unavailable in some modes and on some hardware.
A simple syntax is used to interact with chips. Syntax characters have the same general function in each bus mode, such as 'R' to read a byte of data.
Up to 4000 characters of menu and syntax stuff can be entered into the Bus Pirate terminal at once, press enter to execute the syntax.
Menu options overview
Menu options are single character commands that configure the Bus Pirate. Press enter to show the command prompt if your terminal is blank.
HiZ> p
Command not used in this mode
HiZ>
Enter a command, followed by <enter>, to access the menu. Most configuration and option prompts have a default value shown in (). Press enter to select the default option. Some options are unavailable in some modes, for example bit order configuration and pull-up resistors.
Previous version guides: v2.1.
Configuration commands
Print a help screen with all available menu and syntax options in the current firmware and hardware.
I Hardware, firmware, microcontroller version information
HiZ> i
Bus Pirate v3a <<<hardware version
Firmware v5.2RC (r413) Bootloader v4.3 <<<firmware and bootloader version
DEVID:0x0447 REVID:0x3043 (B5) <<<PIC device ID and revision
http://dangerousprototypes.com <<<project webpage
HiZ>
The information menu displays the hardware, firmware, and microcontroller version.
*----------*
POWER SUPPLIES OFF
Voltage monitors: 5V: 0.0 | 3.3V: 0.0 | VPULLUP: 0.0 |
a/A/@ controls AUX pin
Normal outputs (H=V+, L=GND)
Pull-up resistors ON
MSB set: MOST sig bit first
* ----------*
RAW2WIRE>
If a bus mode is configured additional information about the configuration options is printed.
M Set bus mode (1-Wire, SPI, I2C, JTAG, UART, etc)
HiZ> m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. KEYB
9. LCD
x. exit(without change)
(1)>
Select a bus mode. The command resets the Bus Pirate and immediately disables all pins, pull-up resistors, and power supplies.
The default mode is HiZ, a safe mode with all pins set to high-impedance and all peripherals disabled.
H Command history
SPI> h
1. h
2. [10 r:3]
3. m
4. i
x. exit
(0)> 2 <<<replay #2
CS ENABLED
WRITE: 0x0A
READ: 0x00 0x00 0x00
CS DISABLED
SPI>
The previous 10 commands can be replayed from the command history menu. Firmware v5.0+.
c/C Toggle AUX control between AUX and CS/TMS pins
3WIRE> c
a/A/@ controls AUX pin
3WIRE> C
a/A/@ controls CS/TMS pin
3WIRE>
Sometimes it's useful to control the CS pin from the user terminal. The c/C configures the a/A/@ commands to control the AUX or CS pins.
The current AUX pin configuration is displayed on the extended information screen.
l/L Set MSB/LSB first in applicable modes
3WIRE> L
MSB set: MOST sig bit first
3WIRE> l
MSB set: LEAST sig bit first
3WIRE>
The l/L command determines the bit order for reading and writing bytes in some bus modes. This command is only available in bus modes that are software based (raw2wire, raw3wire).
The current bit order configuration is displayed on the extended information screen.
O Data display format (DEC, HEX, BIN, or raw)
HiZ> o
1. HEX
2. DEC
3. BIN
4. RAW
(1)>
Display format set
HiZ>
The Bus Pirate can display values as hexadecimal, decimal, binary, and a raw ASCII byte. Change the setting in the data display format menu (o). The default display format is HEX.
The RAW display mode sends values to the terminal as raw byte values without any text conversion. This is useful for ASCII serial interfaces. It can also be used to speed up the display of bus sniffers and other high-speed functions where converting raw bytes to text takes too much time. Adjust the display format in your serial terminal to see the raw values as HEX/DEC/BIN.
B Set PC side serial port speed
HiZ> b
Set serial port speed: (bps)
1. 300
2. 1200
3. 2400
4. 4800
5. 9600
6. 19200
7. 38400
8. 57600
9. 115200
10. BRG raw value
(9)>
Adjust your terminal
Space to continue
HiZ>
Adjust the speed of the serial port facing the computer (and USB->serial converter chip).
After choosing a speed you must adjust the serial terminal and press space to continue. The Bus Pirate will pause until the space key is pressed to verify that the terminal speed is correct.
(9)> 10
Enter raw value for BRG
(34)> 34
Adjust your terminal
Space to continue
HiZ>
Since v5.2 there is an option to set a custom baud rate with a raw BRG value. The value can be calculated according to the datasheet or with a utility (key constants: PIC24, 32MHz/16MIPS, BRGH=1).
~ Perform a self-test
HiZ> ~
Disconnect any devices
Connect (Vpu to +5V) and (ADC to +3.3V)
Space to continue
Perform a hardware self-test. Please see the Bus Pirate self-test guide. Firmware v2.0+, hardware v2go and v3 only.
# Reset
HiZ> #
Are you sure? y
RESET
Bus Pirate v3a
Firmware v5.2RC (r413) Bootloader v4.3
DEVID:0x0447 REVID:0x3043 (B5)
http://dangerousprototypes.com
HiZ>
Reset the Bus Pirate. Firmware v2.0+
$ Jump to bootloader
HiZ> $
Are you sure? y
BOOTLOADER
Enter the bootloader for a firmware update without connecting the PGC and PGD pins. Remember to disconnect your terminal program before the upgrade.
BL4+BL4+
Bootloader v4.3+ will respond with a version string if a key is pressed while it's active.
Bootloader v4+, firmware v4+. Bus Pirate upgrade instructions, bootloader upgrade instructions.
Utilities
w/W Power supplies (off/ON)
1-WIRE> w
POWER SUPPLIES OFF
1-WIRE> W
POWER SUPPLIES ON
1-WIRE>
Toggle the switchable 3.3volt and 5.0volt power supplies with the w/W command. Capital 'W' enables the supplies, lowercase 'w' disables them. The power supplies on the Bus Pirate v2go and v3 can supply up to 150mA. The current configuration is displayed on the extended information screen.
Use the power supply voltage report to see the current voltage at each power supply. The 5.0volt supply is powered by the 5.0volt USB supply, so it's normal for it to fall below 5.0volts under load.
V Power supply voltage report
1-WIRE>v Voltage monitors: 5V: 4.9 | 3.3V: 3.2 | VPULLUP: 0.0 | 1-WIRE>
(v1+ hardware only)
p/P Pull-up resistors
RAW2WIRE>p WARNING: pins not open drain (HiZ) 1. Pull-ups off 2. Pull-ups on (1) >2 Pull-up resistors ON RAW2WIRE>
See the practical guide to Bus Pirate pull-up resistors. (V0,V2+ hardware)
The current configuration is displayed on the extended information screen.
F Measure frequency on the AUX pin
HiZ>f Frequency on AUX pin: 50Hz HiZ>
Measures frequency from 0Hz to 40MHz.
G Frequency generator/PWM on the AUX pin
HiZ>g 1KHz-4,000KHz frequency generator/PWM (beta) Frequency in KHz (50) >400 Prescale:1 PR2:39 Duty cycle in % (50) > PWM active HiZ>
Enable the frequency generator, set frequency and duty cycle. Frequencies from 1kHz to 4MHz possible.
HiZ>g PWM disabled HiZ>
Use g again to disable the PWM.
=X Convert X to HEX/DEC/BIN number format
HiZ>= CONVERT (1) >0x59 0x59 89 0b01011001 HiZ>
Firmware v2.1+
S BASIC script engine
Bus Pirate BASIC script reference
d/D Measure from voltage probe (once/CONTINUOUS)
a/A/@ Control axillary pin (low/HIGH/read)
Bus interaction commands
{ or [ Bus start condition.
] or } Bus stop condition.
R or r Read one byte
r:1…255 for bulk reads
0b01 Write this binary value
Format is 0b00000000 for a byte, but partial bytes are also fine: 0b1001.
0h01/0x01 Write this HEX value
Format is 0h01 or 0×01. Partial bytes are fine: 0xA. A-F can be lower-case or capital letters.
0-255 Write this decimal value
Any number not preceded by 0x, 0h, or 0b is interpreted as a decimal value.
"abc" Write this ASCII string
/, Value delimiter
Use a coma or space to separate numbers. Any combination is fine, no delimiter is required between non-number values: {0xa6,0, 0 16 5 0b111 0haF}
&/% Delay 1uS/MS. (&:1…255 for multiple delays)
: Repeat (e.g. r:10)
Bitwise bus commands
Bitwise commands are only available in certain bus modes.
^ Send one clock tick
^:1…255 for multiple clock ticks
/ or \ Toggle clock level high (/) and low (\)
Includes clock delay
- or _ Toggle data state high (-) and low (_)
Includes data setup delay
! Read one bit with clock
. Read data pin state (no clock)
Macros, user macros
(0) List mode macros
(#) Run macro
<x= > Assign user macro
<0> List user macros
<#> Run user macro #
User macro x/assign x/list all


