Author Topic: How to connect a "Bus Pirate", as a UART, to an Arduino Pro Mini, to program it.  (Read 4294 times)

0 Members and 1 Guest are viewing this topic.

Offline switchedmodepsuTopic starter

  • Regular Contributor
  • *
  • !
  • Posts: 80
  • Country: gb
If you were unaware that you needed a USB to serial board to connect to the Arduino Pro Mini, as I was, and didn't fancy another 2 day to 3 WEEK wait for the slow boat from China to deliver one, but you DO have a "Bus Pirate" laying around, fear not - you may use your new Arduino IMMEDIATELY  by configuring the "Bus Pirate" as a transparent UART bridge - the same thing a USB to serial board achieves.


Setting up the Bus Pirate:


Connect the Bus Pirate to the Arduino Pro Mini as shown (or other, I have only tested the Arduino Pro Mini, thus far):



*NOTE* - some Bus Pirate boards (EG, from "SparkFun") have the PCB side plastic shroud back to front - ignore this - the pinouts are still the same, it's just that for some odd reason, someone decided to place the keyed connector BACK TO FRONT on some variants of the Bus Pirate, notably my "SparkFun" model.


Connnect to the Bus Pirate with a terminal (I use "Tera Term") at 115200 baud.

Put the Bus Pirate in UART mode and speed 57600 baud. Bus Pirate menu steps below, in the code block:

Code: [Select]
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 and open Arduino IDE, and set the COM port to the COM port of the Bus Pirate (Windows should have automatically installed the Bus Pirate FTDI drivers already.)

If you get stuck, try these links:

http://wiki.flav.com/wiki/Arduino_Bus_Pirate

https://haquesprojects.wordpress.com/embedded-device-hacking/using-a-bus-pirate-as-a-usb-ttl-serial-converter
« Last Edit: February 04, 2017, 07:00:27 pm by switchedmodepowersupply »
 
The following users thanked this post: jancumps


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf