BusPirate on Debian

I’m using BusPirate v4
Get driver for switch USB to serial mode.

1
apt-get install usb-modeswitch

Add user permission to access.

1
usermod -a -G dialout $USER

Add rules to udev.

1
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="04d8", ATTR{idProduct}=="fb00", MODE="0660"' | tee /etc/udev/rules.d/47-BusPirate.rules

Referencies:

https://wiki.archlinux.org/index.php/Bus_pirate
http://d.lij.uno/linux-bus-pirate.html
https://learn.sparkfun.com/tutorials/bus-pirate-v36a-hookup-guide
https://hackaday.com/2009/09/18/how-to-write-udev-rules/
http://jumptuck.com/2010/01/21/writing-a-bus-pirate-udev-rule/
http://jumptuck.com/2010/01/20/using-the-bus-pirate-with-ubuntu/

SPI using pyBusPirateLite

Settings of SPI. This Python library using Bitbang Mode. Reference to original SPI Documentation.

1
2
3
4
5
6
7
8
from pyBusPirateLite.SPI import *

spi = SPI("COM17", 115200, 1)

spi.config = CFG_PUSH_PULL | CFG_LSB_FIRST
spi.speed = '1MHz'

data = spi.transfer( [ControlRegAddr.M_S_CTRL | (1<<7), 0x18], autoCS = True)

Bus Pirate: Entering binary mode

Bus Pirate LCD adapter v2

Raw-wire (binary))

Bus Pirate 101 tutorial

SPI

SPI (binary))

Controlling WS2812B LEDs with a Bus Pirate

BusPirate using pyBusPirateLite

This is small guide how to use BusPirate with Python.

First you need Python 3 (tested on windows Python 3.5.3 64bit)
Don’t forget add Python to enviroment variables to easy install packages with pip.
2017_10_17_09_34_16_Python_3.5.4_64_bit_Setup

Install required packages

1
pip install pyserial

Download library pyBusPirateLite and install or copy to your project root.

Your project could look like this in Eclipse with PyDev.
Python35-PyDev-BusPirate_main.py-Eclipse