Introduction: Interfacing MSP430 Launchpad With 7 Segment Display
Welcome to my MSP430 Launchpad interfacing tutorial ,In this instructable i will be interfacing a MSP430 Launchpad with a 7 segment Common cathode display .
Source codes (C Files) and Circuit diagram (PDF) can be downloaded from here.
The interfacing between MSP430 and the 7 segment display is done using a parallel interface ie i am using 8 data lines to control the 7 segments + decimal Point on the Display.
The Code provided will display the numbers from 0 - 9 and alpha numeric Characters like A,b,C ,d, E, on the 7 segment display.
The 7 segment Display used in this instructable is of Common Cathode Variety .
Step 1: Hardware Required
For this Instructables you will require a
MSP430 Launchpad Development Board (MSP-EXP430G2)
a 74LS244 octal buffer
A Common Cathode 7 Segment Display (LT543)
Step 2: Common Cathode 7 Segment Display
Here we are going to use a Common Cathode 7 Segment Display.A normal 7 segment Display will have 7 LED's positioned to display a digit from 0 to 9.
The LED Segments are named as a,b,c up to f.There is another LED segment called dp which is used to display the decimal point.
In a common Cathode 7 segment LED ,the -ve Pin of all the LED's in the display are tied together internally and brought out to two pins called G as shown in the above picture.
When the two Common cathode Pins (G) is tied to Ground (-ve) and a positive voltage is applied to the pins corresponding to the 7 segments ,they will light up .
For eg:- if you apply +ve voltage to pin corresponding to g,the middle segment will light up .This logic is used to display numbers and patterns on the display.
Please do not connect 5V directly to the 7 segment pins of your Display always use a resistor (about 180 ohms or more ).Connecting without resistors may blow the LED's in the 7 Segment .
Refer the Circuit for more.
You can check out the code explanation here.
Step 3: Building the 7 Segment Interface
MSP430 is a 3.3V microcontroller which is not designed to drive 7 segment display directly.
In order to protect the pins of MSP430 Launchpad I am using a 74LS244 Buffer ,The Buffer has 8 channels which are then used to connect the pins of 7segment display with MSP430 Launchpad.The circuit diagram of the interface can be found here.
Step 4: Taking 5V From MSP430 Launchpad
Since MSP430 is a 3.3V logic microcontroller ,the VCC pins available on the Launchpad board are all 3V .For our project we are going to need 5V.
The USB section near the top of the board operates at 5V .You can easily solder a pin near the USB pin and take 5V from there.Please use a Multimeter to check the correct pin ,One pin is 5V while the other is at Ground .
Step 5: Code Explanation
All the codes are written in embedded C and can be compiled using either IAR or Code Composer Studio.