• Member Blogs have been stealth lauched / soft launched. Members who are keen to start a useful informative blog and who will keep it current can contact GerardV to be set up. Blogs that go stale will be archived.

Bus Pirate

If you've ever found yourself looking longingly in a datasheet at features of an interesting DAC or AMP chip which can only be accessed over I2C or SPI and your coding aptitude is relatively weak or non-existent, this is the device for you. What it does is allow you to interact with the chip in real time from a terminal window on your PC so you can play with the 'software' features and does not require any C or assembler skills to get going. A quick search of the forum revealed one DIYer using it to get to grips with programming his ESS DAC but other than that mention, it seems relatively unknown. Hence this post to share my considerable enthusiasm for this little puppy.

Bus_pirate_20230305090843.png


To get it going you first need drivers from FTDI, the USB interface is provided in a USB-UART bridge chip from FTDI, that's IC2 in the photo. You can download those here : https://ftdichip.com/drivers/vcp-drivers/ Once installed, that will create a virtual COM port in Windows Device Manager, mine was called COM6.

Once they're installed you'll need a terminal program (apparently Windows terminal sucks too bad, I've never tried it though). I use PuTTY to communicate through COM6 at 115200baud, flow control OFF. https://putty.org/

Then with communication established with the Bus Pirate, set up the mode - in my case that's I2C which is mode4. I2C pins to your target come from the black header on the left - CLK is SCK and MOSI is SDA. Don't forget GND too. Hookup guide here : https://learn.sparkfun.com/tutorials/bus-pirate-v36a-hookup-guide/all

Seeing as I2C is a multi-drop bus it needs pull-ups and if they're not on your target you can get the BP to provide them. There is a hidden catch though which caught me out at first. Just turning on the pull-ups in software (command 'p') won't do the trick, you also need to hardwire the VPU (stands for pull-up voltage) to +5V (or 3.3V if that's what your target needs). That's the function of the white wire in the photo, between +5V and VPU. Note also that the +5V/3.3V needs enabling in software with a 'W' command. http://www.buspirate.com/tutorial/bus-pirate-pull-up-resistor-guide. The firmware on my BP must be older than this tutorial as I didn't get the warning message about no VPU volts.

With your target powered up, a handy feature of BP is to scan all I2C addresses to see which ones generate an ACK. '(1)' is the command to do that - if you forgot to turn on the pull-ups (or the VPU) it will show every possible address as present. Once you've verified the BP can see the target address you can start poking the internal regs and the syntax for that's handled in the link below :

http://www.buspirate.com/tutorial/bus-pirate-command-guide#busInteraction

If MA12070 is your current amp chip of choice, with BP you can explore all those varied operating modes now to see which sounds best.