Bus Pirate firmware update v0g

buspiratefirmwarev0g

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.

Bootloader

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
PWM ACTIVE
1-WIRE>f <–frequency measurement command
PWM ACTIVE: DISABLE PWM <–not available when PWM is active
1-WIRE>g <–g again to disable PWM
PWM DISABLED
1-WIRE>

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
Sniff when:
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)
SPI>

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 library

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

http://www.buspirate.com

Firmware v0g
*———-*
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
*———-*
RAW3WIRE>

A new in-terminal status report lists the features available in the active protocol library, and the current settings.

User prompts with defaults

HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. JTAG
7. RAW2WIRE
8. RAW3WIRE
9. PC KEYBOARD
10. MIDI
(1) > <–press enter for default option (1/HiZ)
MODE SET
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:
0x00 0x00
SPI>(0b0) <–macro command in binary format
0.Macro menu
1.SPI bus sniffer
SPI>

All user prompts now support input values in binary, hexadecimal, or decimal. Previously, menu and macro prompts only supported decimal formatted input.

Localization, translations

A lot of the text used in the program has been moved to a translation file, which is defined in base.h.

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:

Check the issue tracker for future features, or to make feature requests.

Comments

  1. keystoneclimber says:

    How about an update on the hardware side of things?

  2. clint says:

    Sweet! Thanks Ian!

    BTW, Ian, you are aware of this, right?:

    http://www.seeedstudio.com/depot/preorder-bus-pirate-v2go-assembled-from-hackaday-p-415.html

  3. @clint yes, the announcement is coming later today. I just put the ad in the sidebar. That’s the official hardware.

    @keystoneclimber yes, we’re publishing the hardware update later today.

  4. clint says:

    I saw the v2.x hardware info on the download site. Thanks!!!

  5. ik says:

    Anyone else find the easter egg?

  6. lol says:

    I have another project I would like to produce, but don’t know a reputable PCB manufacturer that does parts assembly too.

    I would prefer a north American company…
    does anyone have recommendations?

  7. Stu says:

    wow.
    am I right in thinking protocol analysis hardware in, for instance, fluke meters, you’d likely pay hundreds or even thousands for the privilege?
    even then you’d be hard pressed to find one that supports this many protocols.
    great work guys, when the kit is properly released Im seriously thinking of going for one!

  8. Dan says:

    Good job. But please change “check supply volts” to “check supply voltage”. After all, this kit is being sold for a good “price” not for a good “dollars”.

  9. Jacob says:

    @lol

    I recently surveyed for localish pcb manufacturers myself and ended up using advanced circuits at 33each.com (they have a million domains, also check out 4pcb.com ) for some prototyping and found their service really nice. As I understand it they are in denver. They offered me assembly at checkout but I didn’t need it so can’t vouch for that.

  10. BiOzZ says:

    im on preorder 2 … when will my pirate get here?! D:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s