This is an old revision of the document!


Bus Parrot Bus Pirate

busparrot.jpg

The Bus Parrot is a clone of the Bus Pirate general purpose I/O device for the RPi.

In this instance communication is performed via the RPi built-in UART rather than using a USB bridge as in the original.

Licence

Bus Parrot is derived from and uses the same licensing as the original Bus Pirate. Visit this page for Bus Pirate licensing information.

Credits and Thanks

All the hard work was done by Dangerous Prototypes and it's really worth visiting their site for a proper overview of the Bus Pirate here

Build

This layout is a work-in-progress and is almost functionally the same as the original the difference being the the power section.

SCHEMATIC

All components should be available from CPC in the UK including the PICMicro.

Firmware

Configuration
DEVICE=RPI
SLEEP=1
BITRULES=0x1700
VPP=9
PGM=255
PGC=10
PGD=11
Detect Chip
p24 lvp id
[000000] [PROGRAM]  5600 WORDS
[00ABFC] [CONFIG2]  F9DF
[00ABFE] [CONFIG1]  3F7F
[8007F0] [APPID]    D3
[8007F4] [CALIB1]   E97B34
[8007F6] [CALIB2]   0F0081
[8007F8] [CALIB3]   FF006F
[8007FA] [CALIB4]   FF0001
[8007FC] [CALIB5]   FFFF21
[8007FE] [CALIB6]   FFF97D
[FF0000] [DEVID]    0447 FAM:11 DEV:07 PIC24FJ64GA002
[FF0002] [DEVREV]   3046 MAJOR:1 DOT:6
Time: 0:00.07s
Program firmware
hg clone http://hg.kewl.org/pub/bus-parrot
cd BPv3
p24 lvp program BPv3-Firmware_v6.3-beta1_r2151__Bootloader_v4.4.hex 
Total: 18436
Time: 0:03.97s
Verify firmware
p24 lvp verify BPv3-Firmware_v6.3-beta1_r2151__Bootloader_v4.4.hex
Total: 18436 Pass: 18436 Fail: 0
Time: 0:04.58s

Communications

To communicate we will use `kermit' but any other comms. program will do such as picocom or even screen.

Install
apt-get install ckermit
Configure
set modem type none
set line /dev/ttyAMA0
set carrier-watch off
set speed 115200
set flow none
connect
Test
kermit
#
RE
Bus Pirate v3.a
Firmware v6.3-beta1 r2151  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
HiZ>
<CTRL>\Q

<CTRL>\ is the CONTROL key pressed and then backslash entered without releasing control. Hold and release this and afterward enter upper case Q. This will quit kermit and return to the UNIX shell.

Demonstration

We will follow the I2C EEPROM demo from the original site using our bus-parrot.

kermit
#
RE
Bus Pirate v3.a
Firmware v6.3-beta1 r2151  Bootloader v4.4
DEVID:0x0447 REVID:0x3046 (24FJ64GA002 B8)
http://dangerousprototypes.com
HiZ>m
1. HiZ
2. 1-WIRE
3. UART
4. I2C
5. SPI
6. 2WIRE
7. 3WIRE
8. LCD
x. exit(without change)

(1)>4
Set speed:
 1. ~5KHz
 2. ~50KHz
 3. ~100KHz
 4. ~400KHz

(1)>
Clutch disengaged!!!
To finish setup, start up the power supplies with command 'W'

Ready
I2C>P
Pull-up resistors ON
I2C>W
POWER SUPPLIES ON
Clutch engaged!!!
I2C>(0)
 0.Macro menu
 1.7bit address search
 2.I2C sniffer
I2C>(1)
Searching I2C address space. Found devices at:
0xA0(0x50 W) 0xA1(0x50 R) 

I2C>[0b10100000 0 0 3 2 1]
I2C START BIT
WRITE: 0xA0 ACK 
WRITE: 0x00 ACK 
WRITE: 0x00 ACK 
WRITE: 0x03 ACK 
WRITE: 0x02 ACK 
WRITE: 0x01 ACK 
I2C STOP BIT
I2C>[0b10100000 0 0]
I2C START BIT
WRITE: 0xA0 ACK 
WRITE: 0x00 ACK 
WRITE: 0x00 ACK 
I2C STOP BIT
I2C>[0b10100001 r:3]
I2C START BIT
WRITE: 0xA1 ACK 
READ: 0x03  ACK 0x02  ACK 0x01 
NACK
I2C STOP BIT
I2C>
<CTRL>\Q
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies