How to add more Outputs to your Microcontroller
This Instructable will show you step-by-step how to add 8 extra digital outputs, using only 3 of your microcontroller's digital outputs.

Step 1: Which Microcontroller Should You Use?

How to add more Outputs to your Microcontroller
In order to do this Instructable with your microcontroller, you will need to make sure that it has the following:

(3x)......Available Digital Outputs (Analog/PWM Outputs will work too)
(1x)......Ground/GND Pin
(1x)......10k (or more) of programming space

Step 2: Parts

How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
How to add more Outputs to your Microcontroller
Show All 8 Items
The parts needed to do this Instructable include:

(1x)......Microcontroller
(1x)......1 to 2 foot Length of Breadboard compatible wire
(1x)......74HC595 IC
(1x)......0.1uF ceramic cap (Code = 104)
(1x)......Breadboard
(8x)......20mA LEDs (of any color)
(8x)......220 Ohm resistors

Step 3: Tools

How to add more Outputs to your Microcontroller

(1x)......Wire stripper
(1x)......Wire cutter
(1x)......Power supply
(1x)......USB Cable (or relevant programming method)
(1x)......Computer with your microcontroller's programming software installed

Step 4: Wire it Up (Part 1)

How to add more Outputs to your Microcontroller
Start by gathering your parts.

Step 5: Wire it Up (Part 2)

How to add more Outputs to your Microcontroller
Now place the 74HC595 on the breadboard.

Step 6: Wire it Up (Part 3)

How to add more Outputs to your Microcontroller
Now insert the wires as shown

Step 7: Wire it Up (Part 4)

How to add more Outputs to your Microcontroller
Now add the Capacitor

Step 8: Wire it Up (Part 5)

How to add more Outputs to your Microcontroller
Add the eight LEDs and eight 220 ohm resistors

Step 9: Wire it Up (Part 6)

How to add more Outputs to your Microcontroller
Wire the each LED's anode to pins 15 & 1 to 7

Pin15 = Output_0 // Port_# 1
Pin1 = Output_1 // Port_# 2
Pin2 = Output_2 // Port_# 3
Pin3 = Output_3 // Port_# 4
Pin4 = Output_4 // Port_# 5
Pin5 = Output_5 // Port_# 6
Pin6 = Output_6 // Port_# 7
Pin7 = Output_7 // Port_# 8

Step 10: Wire it Up (Part 7)

How to add more Outputs to your Microcontroller
Connect each of the resistors to ground
Also connect your Microcontroller's GND pin to the breadboard's ground

Step 11: Wire it Up (Part 8)

How to add more Outputs to your Microcontroller
Find your 3 to 5 volt, regulated DC power supply, and connect the Positive connection of the power supply
to the Breadboard's Positive rail.
Next, connect the power supply's Negative connection to the breadboard's negative, or ground, rail.

Step 12: Wire it Up (Part 9)

How to add more Outputs to your Microcontroller
Finally connect the Arduino's 3 digital pins as shown

Step 13: Code

How to add more Outputs to your Microcontroller
Below is the code for use with an Arduino

//Pin connected to ST_CP of 74HC595
int latchPin = 8;
//Pin connected to SH_CP of 74HC595
int clockPin = 12;
//Pin connected to DS of 74HC595
int dataPin = 11;

void setup() {
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
pinMode(dataPin, OUTPUT);
}

void loop() {
for (int j = 0; j < 256; j++) {
//ground latchPin and hold low for as long as you are transmitting
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, j);
//return the latch pin high to signal chip that it
//no longer needs to listen for information
digitalWrite(latchPin, HIGH);
delay(1000);
}
}
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel