Code Monkey home page Code Monkey logo

interfacing-seven-segment-display-with-lpc2148's Introduction

Interfacing-Seven-segment-display-with-lpc2148

Name: H.Syed Abdul Wasih Roll no: 212221240057 Date of experiment: 10/11/2022

Ex. No. : 08 Date: 10/11/2022

Aim:

To configure and display 4 character LED seven segment display and write a c code for displaying number 1 to 9 and A to F

Components required:

Proteus ISIS professional suite, Kiel μ vision 5 Development environment image Figure-01 Internal circuit for seven segment MPX4 display

Theory:

7 Segment Display has seven segments in it and each segment has one LED inside it to display the numbers
by lighting up the corresponding segments. Like if you want the 7-segment to display the number "5" then
you need to glow segment a,f,g,c, and d by making their corresponding pins high. There are two types of 
7-segment displays: Common Cathode and Common Anode, here we are using Common Cathode seven segment display.

image

      Figure-02 Pin configuration for seven segment display  

Below table shows the HEX values and corresponding digit according to LPC2148 pins for common cathode configuration.

Sl no Hex code Output of LCD 1 0x88 1 2 0xeb 2 3 0x4c 3 4 0x49 4 5 0x2b 5 6 0x19 6 7 0x18 7 8 0xcb 8 9 0x8 9 10 0x9 A 11 0xa B 12 0x38 C 13 0x9c D 14 0x68 E 15 0x1c F 16 0x1e 0

image Figure -3 Circuit diagram of interfacing for LPX4 - CA

Kiel - Program:

#include <LPC214x.h>
unsigned char dig[]={0x88,0xeb,0x4c,0x49,0x2b,0x19,0x18,0xcb,0x8,0x9,0xa,0x38,0x9c,0x68};
void delay(unsigned int count)
{
	int i=0,j=0;
	for(j=0;j<count;j++)
	{
		for(i=0;i<120;i++);
	}
}
int main(void)
{
	unsigned char count=0;
	unsigned int i=0;
	IO0DIR|=(1<<11);
	IO0SET=(1<<11);
	IO0DIR|=0x007F8000;
	while(1)
	{
		count++;
		if(count==16)count=0;
		for(i=0;i<800;i++)
		{
			IO0CLR=0x007F8000;
			IO0SET=(dig[count]<<15);
			delay(20);
		}
	}
}

Output screen shots :

Display Off:

03

Display On:

01

02

Circuit Diagram:

04

Result :

LED seven segment display is interfaced and displayed alpha numeric characters.

interfacing-seven-segment-display-with-lpc2148's People

Contributors

abdulwasih2003 avatar vasanthkumarch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.