74F138 Xmas demo

First of all Merry Xmas to everyone!

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.

Get your own handy Bus Pirate for $30, including world-wide shipping. Also available from our friendly distributors Adafruit, Open Source Control Systems, and eHaJo.

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
0×01 CS
0×02 MISO
0×04 CLK
0×08 MOSI
0×10 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.

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)>9
Ready
DIO>W
Power supplies ON
DIO>0 %:500 8 %:500 2 %:500 10 %:500 4 %:500 12 %:500 6 %:500 14 %:500

Here’s the syntax we used to blink the lights in the video. Each LED is illuminated by switching the three Bus Pirate pins connected to the decoder. %:500 provides a short delay between each change.

We used a protoboard to connect the 74F138 to the Bus Pirate. This is a specially designed SMD prototype board to connect all kinds of chip and circuits to our beloved Bus Pirate.

It has footprints for:

  • 0805  parts (59x)
  • SOIC chips from .150″ to .3″ (max 112 pins)
  • SOT23-3
  • 26×10 pin through-hole prototype area
  • Bus Pirate connector and breakout

Did you ask Santa for one? We did.

Happy Xmas from the Dangerous Prototype crew!

This entry was posted in Bus Pirate, demonstrations, dev boards, PCBs and tagged , , .

Comments

  1. MichaelZ says:

    OK where is the protoboard on Seeed? Could not find it.

  2. IPenguin says:

    Finally, there is a nifty protoboard for the Bus Pirate! :)

    … and Sjaak sends MichaelZ running hopeless errands … o.O

  3. jnd says:

    I wonder why you chose the ancient, power hungry 74F and not something like HC :)

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.