You are on page 1of 2

Running LEDS!

December 5, 2011

1 Introduction

Till now, we have used only the LED's and the switches available on the launch-
pad board to conduct our experiments. We shall now start building small cir-
cuits on the breadboard and connect them to the the launchpad board! Let us
start with a simple running LED's experiment.
( Note: if you are not familiar with using breadboards,
refer: http://www.kpsec.freeuk.com/breadb.htm. You may do a google search
for breadboard tutorial -
you might get links like this: http://www.youtube.com/watch?v=oiqNaSPTI7w
)

2 The Running LED circuit

Build the circuit shown in Figure 1 on the breadboard. The circuit is very
simple - connect the I/O port pin P1.0 to the +ve terminal of the rst LED,
connect P1.1 to +ve terminal of 2nd LED, connect P1.2 and P1.3 similarly to
the +ve terminals
1 of the third and fourth LED's. Connect the -ve terminals of
all the LED's to a single point and then, through a single 1K resistor, connect
it to GND.
Now, write a program which will rst light up the LED on P1.0 - after a
fraction of a second, the led on P1.0 goes OFF and the LED on P1.1 comes ON.
Then, P1.1 goes OFF and P1.2 comes ON, and nally, P1.2 goes OFF and P1.3
comes ON.
Then, P1.3 goes OFF and P1.0 comes ON and the cycle repeats innitely ...
Post your code to github.

3 Take care when you connect external circuits!

Here are some points you have to be very careful about when you start inter-
facing external circuits with your launchpad board:

1 The longer leg of the LED is the +ve terminal

1
Figure 1: 4 LED's

P1.0

P1.1 1K

P1.2

P1.3

1. Do not short circuit VCC and GND (or the I/O port pins of the mi-
crocontroller) - this may happen accidentally when you plug in (or play
with)loose wires. Connect the launchpad board to the PC only after you
make all connections to the external circuit. Before removing the wires
connecting the external circuit to the launchpad board, make sure that
you detach the USB cable from the PC.

2. When in doubt, post a query to the forum and wait for the reply before
proceeding!

3. When interfacing LED's/seven segment displays, make sure that you have
a 1K resistor in series. The MSP430's I/O pins can supply a current of only
about 5mA; the 1K resistor limits the current to about 3.6mA (assuming
a HIGH on the port pin is about 3.6V). The LED may not glow very
brightly, but that's OK! Don't try to make the LED glow brighter by
reducing the resistance value.

4. If you feel that some component on the launchpad board (or in your cir-
cuit) is heating up, disconnect the USB cable immediately!

5. If you are using a breadboard for the rst time and you have some doubts
even after reading tutorials / watching youtube videos, please post a ques-
tion to the forum and clarify your doubts before proceeding.

4 Test

There is not test associated with this lesson.

You might also like