Firmware v0g for all Bus Pirate revisions is now available. Updates in this release include a bootloader, frequency generator/pulse-width modulator, SPI bus sniffer, MIDI library, configuration reports, improved user interface, and bug fixes. v0g is also the first firmware to fully support the v2 hardware branch.
We’re really proud of this release as it brings a much more consistent structure to the internal operation of the Bus Pirate. It lays the foundation for future CAN, LIN, and OBDII libraries, and it supports localization and translations. Install and upgrade instructions are included with the firmware. Report bugs on the project issue tracker.
We document the new features after the break.
Firmware v0g includes a bootloader. After the bootloader is installed, firmware updates can be done over the serial or USB connection, instead of using a proper ICSP programmer. Install and update instructions are included in the firmware archive.
Frequency generator/pulse-width modulator
1-WIRE>g <–frequency generator/PWM setup command
1KHz-4,000KHz frequency generator/PWM (beta)
FREQUENCY in KHz (50) >50 <–enter frequency in KHz
PRESCALE:8 <–calculated prescaler
PR2:39 <–calculated PR2 value
DUTY CYCLE in % (50) >50 <–enter percent duty cycle
1-WIRE>f <–frequency measurement command
PWM ACTIVE: DISABLE PWM <–not available when PWM is active
1-WIRE>g <–g again to disable PWM
A 1Hz-4MHz frequency generator/pulse-width modulator function is available on the auxiliary pin using menu option ‘g’. This feature is still in development, but v0g has the essential functionality. The frequency generator and frequency measurement features can not be used at the same time. We also squashed a small bug in the frequency measurement code for hardware v1+.
SPI bus sniffer
SPI>(1) <–sniffer macro
1. CS low
2. CS high
3. All traffic
(1) >3 <–when to sniff bus
SPI BUS SNIFFER, PRESS ANY KEY TO EXIT
0x10(0x00) 0xC6(0x00) <–displays data as MOSI(MISO)
The PIC24F’s SPI slave mode made it easy to add an SPI bus sniffer. It works fine on slow or intermittent data transmissions, but it needs additional output buffering for better performance at high speeds. For the best performance, change the Bus Pirate display mode to ‘raw output’.
MIDI, a popular interface for musical instruments, is simply a 33.2K baud/8/N/1 UART. The MIDI library has the same functions as the asynchronous serial port library, with the settings fixed for MIDI communications. MIDI devices require an isolated transceiver, we’re working on one but need a MIDI connector footprint and part number.
Bus Pirate status report
RAW3WIRE>i <– status report command
Hack a Day Bus Pirate v2g0
POWER SUPPLIES ON
VOLTAGE MONITOR: 5V: 5.0 | 3.3V: 3.3 | VPULLUP: 5.0 |
AUX: DEFAULT SETTING (AUX PIN)
High-Z outputs (H=input, L=GND)
PULLUP RESISTORS OFF
MSB SET: MOST SIG BIT FIRST
A new in-terminal status report lists the features available in the active protocol library, and the current settings.
User prompts with defaults
9. PC KEYBOARD
(1) > <–press enter for default option (1/HiZ)
The user prompt has been updated to accept multiple-digit values. Enter without any input selects the default value shown in parentheses before the prompt. All user input is now handled by this single user prompt function.
User value input format
SPI>r:0x02 <–repeat in hex format
BULK READ 0x02 BYTES:
SPI>(0b0) <–macro command in binary format
1.SPI bus sniffer
All user prompts now support input values in binary, hexadecimal, or decimal. Previously, menu and macro prompts only supported decimal formatted input.
If you make a translation, please share it with us. We’ll host the translation in SVN and compile a localized firmware for anyone that might be interested.
Test the v0h beta
If you like to live on the edge, try the v0h nightlies. These features are already implemented in v0h nightlies:
- I2C sniffer,
- HD44780 character LCD test library.
- Keyboard library I/O timeout.
- Improved syntax parser.
- Software reset command.
Check the issue tracker for future features, or to make feature requests.