PC-based 7 Segment Rolling Display
PC-based 7 Segment Rolling Display
Rolling Display
It
is very interesting and con
venient to be able to control
everything while sitting at
your PC terminal. Here, a simple
hardware circuit and software is
used to interface a 7-segment based
rolling display.
The printer port of a PC pro-
vides a set of points with some act-
ing as input lines and some others
as output lines. Some lines are open
collector type which can be used as
input lines. The circuit given here
can be used for interfacing with any
type of PC’s printer port.
The 25-pin parallel port connec-
tor at the back of a PC is a combi-
nation of three ports. The address
varies from 378H-37AH. The 7 lines
of port 378H (pins 2 through 8) are
used in this circuit to output the
code for segment display through
IC1. The remaining one line of port
378H (pin 9) and four lines of port
37AH (pins 1, 14, 16, 17) are used
to enable the display digits (one a
time) through IC2.
The bits D0, D1 and D3 of port
37AH connected to pins 1, 14 and 17
of ‘D’ connector are inverted by the
computer before application to the pins PC places the 7-segment code for the first over and over again. Because of this rep-
while data bit D2 is not inverted. There- digit/character on the data bus and ena- etition at a fairly high rate, there is an
fore to get a logic high at any of former bles only the first 7-segment display. After illusion that all the digits/characters are
three pins, we must send logic 0 output to delay of a few milliseconds, the 7-segment continuously being displayed. DISP1 is to
the corresponding pin of port 37AH. code for the digit/character is replaced by be physically placed as the least signifi-
Another important concept illustrated that of the next charter/digit, but this time cant digit.
by the project is the time division multi- only second display digit is enabled. IC1 (74LS244) is an octal buffer which
plexing. Note that all the five 7-segment After the display of all characters/ is primarily used to increase the driving
displays share a common data bus. The digits in this way, the cycle repeats itself capability. It has two groups of four buff-
P r o g r a m
/*DISP.C*** PC BASED ROLLING clrscr(); delay(300);
DISPLAY */ for(f=200;f<=500;f+=100)
/* P.R.DESHMUKH*/ { }
#include<stdio.h> sound(f );
#include<conio.h> delay(100); else
#include<dos.h> } {
#define PORTA 0x378 nosound(); outportb(PORTB,0x0b);
#define PORTB 0x37a while (!kbhit()) outportb(PORTA,m[j]);
void main() { outportb(PORTA ,(m[j] || ( 0x80)));
{ for (j=0;j<=4;j++) delay(300);
int dno[6]={0x0a,0x09,0x0f,0x03,0x80}; { }
/* code for “hallo”*/ outportb(PORTA,m[j]); }
int m[5]={0x76,0x77,0x38,0x38,0x3f }; if(j<=3) }
/*code for the selection of display*/ { }
int f,j; outportb(PORTB,dno[j]);