We found some time to whip up a new demo to show the Digital IO mode (DIO) of the Bus Pirate. This mode gives us full control of the pins and acts much like the binary mode. We used it to interface a 74F138 and a couple of LEDs. The 74F138 is a binary decoder, 3 input pins toggle between one of 8 inverted outputs.

We connected 8 LEDS and 8 resistors (1K) between Vcc (5V) and the outputs, hardwired the enable pins to Vcc and GND, and connected the inputs to the Bus Pirate as seen in this schematic.

We even picked some green and red LEDs to give that extra Xmas feeling!

Inputs

Outputs

ENABLE

SELECT

G1

G2′

C

B

A

Y0

Y1

Y2

Y3

Y4

Y5

Y6

Y7

X
L
H
H
H
H
H
H
H
H

H
X
L
L
L
L
L
L
L
L

X
X
L
L
L
L
H
H
H
H

X
X
L
L
H
H
L
L
H
H

X
X
L
H
L
H
L
H
L
H

H
H
L
H
H
H
H
H
H
H

H
H
H
L
H
H
H
H
H
H

H
H
H
H
L
H
H
H
H
H

H
H
H
H
H
L
H
H
H
H

H
H
H
H
H
H
L
H
H
H

H
H
H
H
H
H
H
L
H
H

H
H
H
H
H
H
H
H
L
H

H
H
H
H
H
H
H
H
H
L

Here’s the truth table for the 74138. The input pin combinations shown activate one of the 8 outputs.

We hardwired G1 to Vcc and G2a and G2b to GND, so ABC gets decoded into just one lit LED.

Value

Pin

0x01

CS

0x02

MISO

0x04

CLK

0x08

MOSI

0x10

AUX

At the moment the DIO mode isn’t described very well in our wiki, but it does work like every other protocol. Command ‘r’ will read the pins, the bits of each byte directly control the Bus Pirate pins as shown in the table above.

To display this Xmas Knight Rider ™ we used a few commands on the Bus Pirate.

This entry was posted
on Saturday, December 25th, 2010 at 4:00 am and is filed under Bus Pirate, demonstrations, dev boards, PCBs.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.