Arduino Bus Pirate

From Flav's Wiki
Jump to: navigation, search
Bus Pirate/Arduino Pro Mini

Why

I've broken my FTDI USB/TTL and need to upload a new sketch without unmounting all my prototype (SPI pins on my prototye are used). I have a Bus Pirate available.

Ressources

Connecting hardware

Connect :

Bus Pirate Arduino Pro Mini
GND GND
5V VCC
MOSI RX
MISO TX
CLK GRN

Buspirate arduinopromini bb.png

Setting up the Bus Pirate

Connnect to the Bus Pirate with a terminal at 115200 bauds.

Put the Bus Pirate in UART mode and speed 57600 bauds.

HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
9. DIO
x. exit(without change)

(1)>3
Set serial port speed: (bps)
 1. 300
 2. 1200
 3. 2400
 4. 4800
 5. 9600
 6. 19200
 7. 38400
 8. 57600
 9. 115200
10. BRG raw value

(1)>8
Data bits and parity:
 1. 8, NONE *default
 2. 8, EVEN
 3. 8, ODD
 4. 9, NONE
(1)>
Stop bits:
 1. 1 *default
 2. 2
(1)>
Receive polarity:
 1. Idle 1 *default
 2. Idle 0
(1)>
Select output type:
 1. Open drain (H=Hi-Z, L=GND)
 2. Normal (H=3.3V, L=GND)

(1)>2
Ready
UART>

Activate the power supply

UART>W
Power supplies ON
UART>v
Pinstates:
1.(BR)  2.(RD)  3.(OR)  4.(YW)  5.(GN)  6.(BL)  7.(PU)  8.(GR)  9.(WT)  0.(Blk)
GND     3.3V    5.0V    ADC     VPU     AUX     -       TxD     -       RxD
P       P       P       I       I       I       I       I       I       I
GND     3.31V   5.18V   0.00V   0.00V   L       H       H       L       L
UART>

Set the connection between the computer and the BusPirate at 57600:

UART>b
Set serial port speed: (bps)
 1. 300
 2. 1200
 3. 2400
 4. 4800
 5. 9600
 6. 19200
 7. 38400
 8. 57600
 9. 115200
10. BRG raw value

(9)>8
Adjust your terminal
Space to continue

Change the port speed to 57600 on the computer.

Now put the BusPirate in transparent bridge.

UART>(3)
UART bridge
Reset to exit
Are you sure? y

Now close your terminal.

Upload the sketch

Upload the sketch as usual using the COM port on which the Bus Pirate is set.

Note

The CLK connection is optionnal. If it is not connected you need to keep the Reset button pressed on the Arduino durring the compilation of the sketch and release it at the begining (or just 1 second) before the upload starts.