Using the Bus Pirate v2go on Mac

My Bus Pirate v2go just arrived this morning and I was eager to try it out. There is some documentation on Hack-a-Day on how to use the bus pirate with HyperTerminal. However, all of my electronics stuff is on the other side of the room from my Windows desktop. I use my MacBook for programming the Arduino and my other AVR projects, so I wanted to use it for the Bus Pirate as well. What to do?

My first google searches ended in disappointment – using the built in Terminal program with Screen was unsuccessful (probably because it doesn’t seem like you can set the baudrate). Update: it turns out that you can set the baudrate with screen using an argument like so – “screen /dev/ttyWHATEVER 115200″. Thanks goes to the David in the comments below. After a little searching, it looked like the few serial terminal applications for Mac were old and outdated, but I did manage to find ZTerm. It’s simple and basic – perfect for use with the bus pirate.

Don’t forget that you need to have already installed the FTDI driver so that your computer will see the device over USB. Start Zterm and choose the correct port in the popup window (if it isn’t already chosen automatically). Then you need to change the connection settings to talk to the Bus Pirate properly. Go to Settings->Connection and set it like this:
ZTerm settings for Bus Pirate
Data Rate: 115200
Data Bits: 8
Parity: None
Stop bits: 1

The rest you can leave at the default. [UPDATE] On newer firmware versions you’ll need to deselect Xon/Xoff as per Ian in the comments below.

Hit ok and go back to the terminal window to start talking

Hit enter to start communicating. Entering ? will bring up the list of commands like so:
Bus Pirate menu
To test some functionality of the bus pirate, we’re going to measure the voltage on the ADC pin. We’ll do this by putting the Bus Pirate into just about any mode besides HiZ – we’ll choose 1-Wire since it’s simple to set up.

Enter “m” to bring up the mode menu, choose 1-Wire by entering “2″. Hook up some voltage to the ADC pin (see the bottom of the Bus Pirate for it’s pinout). Then enter “d” to read the value on the pin. I connected the pin to the 5V input from the USB line, so it reads 5.1V. You can see that full process in the terminal below.
Bus Pirate ADC Reading

That’s it for the basics! See the Bus Pirate site for more examples of how to use this nice piece of hardware.

Comments 9

  1. Livy wrote:

    Wow. I couldn’t understand any of that. How do we communicate with each other?

    Posted 24 Jul 2009 at 4:26 PM
  2. brettinman wrote:

    I prefer English. You can also reach me by email.

    Posted 24 Jul 2009 at 4:55 PM
  3. Ian wrote:

    Thanks for writing this, we need more MAC references for the Bus Pirate. I’ll list it as a resource on the Bus Pirate Google Code page.

    Posted 11 Aug 2009 at 1:22 AM
  4. David Findlay wrote:

    FWIW, with screen you can pass the baud rate as the second argument, so:

    screen /dev/ttyWHATEVER 115200

    This worked for me on my Mac with my Bus Pirate.

    Posted 12 Aug 2009 at 11:28 AM
  5. brettinman wrote:

    Thanks for the info, David! Post has been updated to reflect this.

    Posted 12 Aug 2009 at 12:25 PM
  6. Ian wrote:

    The XON/XOFF setting isn’t required in recent firmwares (2.2+) and might be causing a problem with the latest (v2.5+) and ZTerm.

    Posted 21 Oct 2009 at 3:17 AM
  7. brettinman wrote:

    Thanks Ian, post updated. I still haven’t gotten around to updating my firmware so I hadn’t run into that yet.

    Posted 21 Oct 2009 at 9:57 AM
  8. Ian wrote:

    Hi Bret,

    It looks like we found the issue with ZTerm and some later firmwares. Some people were having an issue with ZTerm because the default profile sent a modem initialization string (AT…something) that accidentally put the Bus Pirate in binary mode.

    This is something to check if you’re using ZTerm and you can’t see anything in the terminal, your MODE LED will probably also be on when this happens.

    Posted 24 Oct 2009 at 12:18 AM
  9. Kunal wrote:

    It is working. Worked like a charm :-)

    Thanks.

    Posted 27 Jul 2010 at 6:44 AM

Trackbacks & Pingbacks 3

  1. From ereet st on 11 Aug 2009 at 11:24 AM

    Updating Bus Pirate firmware in OS X…

    So a while ago hack-a-day introduced a really awesome DIY project called The Bus Pirate which is small device for interfacing with all sorts of different chips and devices using a host of protocols. The really slick part is that despite the small size…

  2. From Bus Pirate: Connecting with MAC, OSX « Dangerous Prototypes on 12 Aug 2009 at 6:02 AM

    [...] Brettinman got a Bus Pirate from Hack a Day’s preorder, but he couldn’t get it working with the default MAC serial terminal. He used ZTerm and documented how to use the Bus Pirate with a MAC. [...]

  3. From Bus Pirate Test – BlinkM | mctouch on 21 Aug 2011 at 10:44 AM

    [...] and followed the instructions to connect to the bus pirate serially from here http://brettinman.com/2009/07/24/using-the-bus-pirate-v2go-on-mac/ . There are loads of other terminal programs that will work like ‘screen’ in the various unix [...]

Post a Comment

Your email is never published nor shared.