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:
Data Rate: 115200
Data Bits: 8
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:
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.
That’s it for the basics! See the Bus Pirate site for more examples of how to use this nice piece of hardware.