You are on page 1of 2

Dot Matrix Display with 8051

Lab # 4

Components:
♦ AT89C51 (Microcontroller)
♦ Dot Matrix 8 × 8
♦ Keil Software
♦ Proteus

Write a program to display a letter H by using Dot Matrix , also implement this
program on proteus .

Program :
#include <reg51.h>
void main()
{
unsigned int x;
{
P2 = 0x80;
P3=0x00;
For(x=0;x<150;x++);
P2 = 0x40;
P3=0xf7;
For (x=0;x<150;x++);
P2 = 0x20;
P3=0xf7;
For (x=0;x<150;x++);
P2 = 0x10;
P3=0xf7;
For (x=0;x<150;x++);
P2 = 0x08;
P3=0xf7;
For (x=0;x<150;x++);
P2 = 0x04;
P3=0xf7;
For (x=0;x<150;x++);
P2 = 0x01;
P3=0xf7;
For (x=0;x<150;x++);
P2 = 0x01;
P3=0x00;
For (x=0;x<150;x++);
}
}

Proteus Implementation :

You might also like