You are on page 1of 81

KATHMANDU UNIVERSITY

SCHOOL OF ENGINEERING
DEPARTMENT OF ELECTRICAL & ELECTRONICS ENGINEERING


PROJECT REPORT






LED Matrix Display



Submitted To:
Mr. Jeevan Shrestha
Project Supervisor
Department of Electrical and Electronics Engineering
School of Engineering
Kathmandu University



Submitted By:
Kabool Neupane (EE1, 22017)
Bigyan Chapagain (EE2, 22031)
Praveen Shrestha (EE2, 22042)
Manish Prajapati (EE2, 22048)



June 27, 2010
i

ABSTRACT

The project LED Matrix Display is concerned with the construction of a two dimensional
arrangement of LEDs in a rectangular arrangement for the purpose of displaying English
Alphabets (Upper Case) and decimal numerals. The characters to be displayed are entered
using a computer. Therefore, in this project the computer functions as an input device and
LED Matrix Display functions as an Output device. A computer program shall also be
included in the project to create a user-interface environment to enter the characters and
numbers to be displayed.




























ii

ACKNOWLEDGEMENT

We express our sincere thanks to our project supervisor Mr. Jeevan Shrestha for his kind
support, encouragement and guidance throughout the course of our project work. It is
because of his continuous support we were able to acheive much in this project work. We
would also like to express our sincere gratitude to our project coordinator Mr. Samip Malla
for his guidance on this project course. Similarly we would like to thank all the teachers
and lab incharges who have helped us in every possible way. This project has helped us a
lot in our understanding and experience. Besides, it has been a great excitement doing this
project and we hope to achieve much more in future. We, therefore look forward to your
kind support in the years to come.






















iii

SYMBOLS AND ABBREVIATIONS

A. Symbols
Symbol Description
Ohm
K Kilo ohm
s Micro second
mA Milli ampere



B. Abbreviations
Abbreviation Full Form
LED Light Emitting Diodes
PC Personal Computer
IC Integrated Circuit
PCB Printed Circuit Board






iv

LIST OF FIGURES

Fig. No. Title Page No.
1. Block Diagram 2
2. Parts of a LED 4
3. The inner workings of LED 4
4. Eye response to color 5
5. LED Matrix 6
6. Transistor as a switch 7
7. Pulse driven LED 8
8. Pin configuration of 4017 9
9. Timing diagram of 4017 10
10. Cascade 4017 11
11. Parallel port 11
12. Parallel port configuration 12
13. IC 74244 13
14. Block diagram 14
15. Cascaded counter implementation 15
16. Cascaded LED Matrix 16
17. Code Protection circuit 17
18. Flowchart of the program 19
19. Flowchart to detect the column of matrix 20
20. LED Matrix component setup 21
21. Master transistor switch setup 21
22. Output waveform from data pin 6 22
23. Output waveform from data pin 1 23
24. LED Matrix display 24
25. LED Matrix display in PCB 27
26. Gantt chart 29




v

LIST OF TABLES

Table No. Title Page No.
1. Pin configuration of 4017 9
2. Ring counter sequence 10
3. Port pins in our project 12
4. Address of registers 13
5. Cost Estimation 26



vi

TABLE OF CONTENTS

Abstract i
Acknowledgement ii
Symbols and Abbreviations iii
List of Figures iv
List of Tables v
Chapter 1: Introduction 1
1.1 Background theory and Objectives 1
1.2 System overview 2
1.3 Methodology 2
1.4 Overview of the Report 3
Chapter 2: Technology and Literature Survey 4
2.1 Components used 4
2.1.1 LEDs 4
2.1.2 LED Matrix configuration 6
2.1.3 Transistor as a switch 7
2.1.4 LED Driving Circuit 7
2.1.5 Counter IC 4017 9
2.1.6 Parallel port 11
2.2 Software used 13
Chapter 3: System Analysis and experiments 14
3.1 System Analysis 14
3.1.1 System analysis 14
3.1.2 Overall description of the circuit 15
3.1.3 Computer Program 18
3.2 Mathematical calculation and experiments 21
3.2.1 Mathematical calculation 21
3.2.2 Experimental observation 22
Chapter 4: Product description and performance 24
4.1 Product description 24
4.1.1 Physical description 24
4.1.2 Cost Estimation 26
4.2 Product performance 27
4.3 Final product 27
vii

Chapter 5: Discussion and performance 28
5.1 Gantt chart 29
Biblography 30
Appendix A: Mathematical Calculations 31
Appendix B: Computer program 33
Appendix C: PCB Circuit 50
Appendix D: Datasheets of components 52
D1: Datasheet of BC548
D2: Datasheet of 1N4148
D3: Datasheet of SL100
D4: Datasheet of 74244
D5: Datasheet of 7408
D6: Datasheet of 74175
D7: Datasheet of 4017






1

CHAPTER 1
INTRODUCTION


1.1 Background Theory and Objectives

1.1.1 Background
Nowadays, we can see various ways of visual information everywhere. One of the
most common sights that we can see today is the LED Matrix Display. Nowadays
these are extensively used in streets, malls, buildings, parks and other public places.
LED Matrix Displays have become a basic way of visual information since they are
cheaper and more reliable than LCD displays and other expensive display devices.
Now, considering the growing popularity of the LED Matrix display, we decided to
construct a small home based PC controlled LED Matrix display so that it could be
used for small household purposes as well as for various entertainment purposes.
Therefore our project deals with the construction of a LED Matrix display whose
input device is a computer.

1.1.2 Objectives
This project mainly focuses on the following topics
To study existing concepts and required materials related to a LED
Matrix Display
To design a proper circuit, for a LED Matrix Display, which is most
suitable for our case.
To create a computer program to enter data to be displayed by the LED
Matrix Display.
To make the program an user interface program.


2

1.2 System Overview














Figure 1: Block Diagram


The Operational framework of the LED Matrix display is shown in Figure 1. The
figure illustrates that the computer port controls the rows of the matrix and the
columns are controlled by the counter. Furthermore, Computer triggers the counter of
the circuit. This helps in synchronizing the timing pulse of counter with the computer
signal.

1.3 Methodology
In order to complete this project work we have taken help from various books,
magazines, websites, and by consulting to teachers and seniors. The procedure taken for
the successful design and operation of LED Matrix Display comprises of mainly two
parts i.e.
Hardware part
Software part

1.3.1 Hardware Part
For hardware part, the following procedures were taken:
- Firstly literature survey was conducted.
- Different approaches to the circuit design were considered and the best
was chosen.
- The circuit was implemented on a bread board.
- Various experiments were undertaken.
- The overall system was analyzed.
- Constantly, the circuit in bread board was upgraded to get the best
performance.
- Finally, the circuit was completed in PCB, obtaining successful output.



Power Flow
Signal Flow
Computer Control


LED Matrix Display
Control Column
C
o
n
t
r
o
l

R
o
w

Counter

3

1.3.2 Software Part
For software part, we applied the following procedures.
- The user interface program was decided to be implemented in C
programming language.
- The algorithm for the program was discussed.
- Then the program was written and implemented in virtual LED Matrix
environment.
- For simplicity and user friendliness, the program was further modified
with function modules.
- The program was implemented in the hardware part.
- Various problems were encountered, and solved.
- Finally the successful output was obtained.

1.4 Overview of the report
This report gives an overview of the project LED Matrix Display. In the next pages,
we will discuss about the processes involved in the project. We will also be dealing
with the technologies used. This report also discusses about the C program
implementation on accessing and controlling the parallel port. To sum up, this report
gives any reader a complete overview of our project on LED Matrix Display.

















4

CHAPTER 2
TECHNOLOGY AND LITERATURE SURVEY



This project can broadly be divided into two sections:
Software part: Software part includes programming design for the system. In
this part, a C program is developed in order to send information to LED
Matrix from PC via the parallel port.

Hardware part: Hardware part includes the design and construction of the
hardware parts of the system. Design of LED Matrix and construction of
supporting elements like development of ring counter, implementation of
transistors as switch and LED driving circuits are included in this portion.
Firstly, we will discuss about main components used in the circuit and their structure.
Later on, their working mechanisms and their effect in the circuit will be discussed.

2.1 Components used

2.1.1 LEDs
As the name implies, a Light Emitting Diode (LED) is a diode that gives visible or
invisible (infrared) light when energized. LEDs are diodes usually constructed by
GaAs. In such semi-conductor p-n junction, during the recombination of holes and
electrons, the energy is dissipated in the form of photons resulting in the emission of
light.






Figure2: Parts of a LED
aaaaALELlLLED
Figure3: The inner workings of LED

5

The color of the LED used for the LED Matrix Display is red. The reason we have
selected this LED is because it is known that human eyes are least sensitive to red
color. In other words, shades of red light are least sensitive to our eyes. This implies
that slight variation in the brightness of the red LED lights will mostly go unnoticed
by our eyes. This fact is crucial in our product since we require constant brightness of
all LEDs. Even though considerable thought and careful designing has been done to
maintain constant brightness, it is nevertheless probable that slight error will arise,
due to imperfect and non-uniform electronic components, which is inevitable.
Therefore, red lights provide the perfect solution for this problem.


Figure 4: Eye Response to color

Figure 4 illustrates that RED and Blue lights are least sensitive to human eyes. While
this fact is advantageous to our product as discussed earlier, it however implies that a
red LED must have a much stronger efficiency than a green one to be visible at the
same intensity. It means that sensitivity to wavelength and sensitivity to intensity are
different. For a green LED and red LED to be of equal intensity, the latters efficiency
should be greater or in other words power transfer should be greater. Considering this
fact it is ensured that optimum intensity of the red LEDs used in the product has been
maintained under safe limits.
Generally Red LEDs are constructed using GaAsP and their threshold voltage is
usually 1.3 V.

RED
GREEN
BLUE

6

2.1.2 LED Matrix Configuration:
The dimension of LED Matrix chosen for our project is 55. It is chosen since it is
relatively easy to design a character or a number in such configuration. Furthermore,
since the project implies the use of parallel ports with 8 output pins, the matrix can be
friendly for the port interface. In any case, a LED matrix with 55 dimension implies
controlling of 25 LEDs at any time. To reduce this difficulty the configuration of the
LED matrix is done in following way:




The configuration shown in figure 5 allows reduction of points to be controlled for the
LED Matrix Display. Instead of controlling each individual LED, the configuration
allows us to control entire row and column at any instance. In the configuration, the
anodes of the LEDs are connected along a row and the cathodes are connected along a
column. This allows control of an individual LED in any instance. For example, if we
wish to control a LED at position 22, we can do it by controlling voltage supply at
2
nd
row and ground supply at 2
nd
column. In this way any LED in the matrix can be
controlled. In case of 55 LED matrix, this configuration reduces the control points to
10 from 25.

For further reduction of number of control pins, we have used a counter to
automatically control entire column. By doing so, the control pins are further reduced
to half.

Figure 5: LED Matrix
Configuration

7

2.1.3 Transistor as a Switch
Transistor is a three layer semi-conductor device consisting of either two n- and one
p-type layers of material or two p- and one n-type layers of material. Both types can
be used for switching purpose. In such application a transistor works in saturation and
cut off mode. The transistor we have used in the project is an npn type transistor
BC548. This transistor has been used for switching purpose. It is set in common
emitter configuration. The reason behind the use of transistor as switch is to control
the power supply to the LEDs.
VCC
VCC
1
0
2 3

2


2.1.4 LED Driving Circuits:
LEDs are current driven elements. It requires a constant current in order to maintain
constant brightness. A LED Driving Circuit is a circuit that is designed to maintain
constant brightness in LEDs.

LED Driving Circuit:
- Delivers a constant average current under all conditions.
- Controls ripple current at acceptable level under all conditions.
- A LED Driving circuit is a type of power conversion circuit
that delivers constant current instead of constant voltage.
If a constant current is not maintained, a pulse circuit can be designed to generate
maximum brightness from a LED without damaging it.
Figure 6: Transistor as a switch
Common configuration for tran
istor as a switch

8


Pulse Circuit:
- A sufficient current pulse for the maximum brightness of a
LED is sent at a suitable frequency.
- The pulse duration saves a LED from over heating by sending
the average of current pulses while maintaining the brightness
of a LED.
- The pulse duration and synchronization is maintained by
providing the same timing pulse of computer signal to the
counter.
VCC
5V
1
2
3
4
5
7
11

Figure 7: Pulse Driven LED

R
o
w
s

c
o
n
t
r
o
l
l
e
d

v
i
a

p
a
r
a
l
l
e
l

p
o
r
t

Column connected to counter output
Code protection output

9

Brief Description:
The previous diagram represents the configuration of the LED driving circuit at any
instance of time. Since any column is controlled by a counter, no two columns can be
active at a same time. Therefore at any instant only one such column is active. Now
the transistors controlled by the parallel port provide a constant current to each LED
connected to it. This configuration is thus better than the previous ones, which we
have implemented, which failed to ensure constant current to each LED at all
conditions. The new configuration along with the pulse driving circuit thus ensures
better results.

2.1.5 Counter (IC 4017)

Figure 8: Pin configuration of IC 4017

PIN NO. SYMBOL NAME AND FUNCTION
3, 2, 4, 7, 10, 1, 5, 6, 9,
11 Q0 to Q9 decoded outputs
8 GND ground (0 V)
12 Q5-9 carry output (active LOW)
13 CP1
clock input (HIGH-to-LOW, edge-
triggered)
14 CP0
clock input (LOW-to-HIGH, edge-
triggered)
15 MR master reset input (active HIGH)
16 VCC positive supply voltage
Table 1: Pin configuration of IC 4017

The 4017 counter has ten outputs which go high in sequence when a source of pulses
is connected to the clock input and suitable logic is applied to Reset and Enable
inputs.
Internally 4017 contains five bistable subunits. These are interconnected in a pattern
known as Johnson counter. The Johnson Counter is a counter in which the Q output
of last F/F is connected to the serial input of the first stage. The outputs of bistables
are then decoded to give ten individual outputs.

10



The timing diagram for the 4017 counter is shown below:

Figure 9: Timing Diagram of 4017

The behavior of a 3 stage Johnson Counter can be understood as following:
(ALL F/F is reset in the beginning)
















Table 2: Ring Counter sequence

5 stage Johnson counter has 10 decoded outputs (2n output states). The decoder uses 2
input NOR gates to give 10 decoded outputs.
Clock Pulses D Input Output A Output B Output C
0 1 0 0 0
1 1 1 0 0
2 1 1 1 0
3 0 1 1 1
4 0 0 1 1
5 0 0 0 1
6 1 0 0 0

11

Cascading 4017:


Figure 10: Cascaded 4017

It is essential not to enable the counter on CP
1
when CP
0
is HIGH, or on CP
0
when
CP
1
is LOW as this would cause an extra count.
We cascade the 4017 IC for extending the number of decoded outputs. Decoded
outputs are sequential within each stage and from stage to stage with no dead time
(except propagation delays).

2.1.6 Parallel Port

Introduction
Parallel port is a type of interface located at the back of PC used for communication
and device control. Usually, it is used for connecting printer, so also called printer
port or centronics port. The type of parallel port present in the computer is D-Type 25
Pin female connector. There may be also be D-Type 25 pin male connector. Since it is
easy to program and faster compared to other ports, nowadays it is very much popular
for controlling external devices. But the main disadvantage of parallel port is it
requires more number of transmission lines, so it cannot be used for long distance
communication and is so used for short distances only.
In our project, it is used as the bridge between the hardware component and the
software component.

Figure 11: Parallel Port

12

Pin Configuration
In parallel port, all 8 bits of a byte will be sent to the port at a time and an indication
will be sent in another line. For the accomplishment of this task, the 25 pins are
grouped to various groups to accomplish the parts of this task. The below given figure
illustrates it better.

Figure 12: Parallel port configuration

For the above figure, it is clear that the port is composed of 4 control lines, 5 status
lines and 8 data lines and the rest of pins are for ground. The data lines send the data
from port to the external device. Status lines give the information about the current
status of the port and control lines control the port access. The control lines and status
lines are uni-directional i.e. they can feed data only into one direction, whereas the
data ports are bi-directional.

Under our project, the port pins are used for respective purposes:


Table 3: Port pins in our project

Brief Description on parallel port setup
The data pins connected to the rows of the LED matrix (D
0
to D
4
) are used to send
data to the Led Matrix. D
0
is connected to the lowest row, D
1
is connected to the row
above the one connected to D
0
and so on.
D
5
data pin is connected to the CP
0
of the counter. This pin thus provides the
necessary clock pulse to the counter.
Register Pin No. Connected to
D
0
to D
4
2 to 6 Each row of the LED matrix starting from the bottom row.
D
5
7 CP
0
(CLK) of counter
D
6
8 MR(Master Reset) of counter
D
7
9 Clock to D Flip flops
S
6
10 Any one counter output connected to a column.
GND 18 to 25 Ground

13

D
6
data pin controls the Master Reset pin of the counter. This pin when high resets the
counter to its starting condition irrespective of its present state.
D
7
data pin provides the clock pulses to the D flip flops which are used in the product
for code protection of the LED Matrix. This is further discussed in the sections to be
followed
S
6
status pin is used to detect an output pin of a counter which is connected to a
column of the matrix. This status pin is used to determine the number of columns of
the matrix.
Pins 18 to 25 are shorted internally to provide a complete circuit for other pins. Thus
they are used as ground for the parallel port.
Besides these other pins are not used in the project.

Port address
For the programming, we require the address of the registers present in port. Usually,
the port address starts with 0x378 in most of the computers. The addresses are in
hexadecimal number system. The addresses for the different registers are given
below.

Registers Address
Data (+0) 0x378
Status (+1) 0x379
Control (+2) 0x379A

Table 4: Address of registers

Parallel Port protection
Parallel Port protection is necessary since it can supply and sink very limited amount
of current. A little high current above certain limit may damage the parallel port. In
our case parallel port protection is done using the buffer IC 74244.

Figure 13: IC 74244
2.2 Computer Program
A C program was used to create a user interface program to control the parallel port.
The two functions used to control the parallel ports are:
outportb(PORT ADD,Data); (Sends one byte of data)
inportb(PORT ADD,Data); (Reads one byte of data)

14

CHAPTER 3
SYSTEM ANALYSIS AND EXPERIMENTS

3.1 System Analysis

3.1.1 System Analysis
















Figure 14: Block Diagram

The LED Matrix display has rows and columns connected separately in order to
reduce the control bits. The rows are connected via transistors, used as switch, to the
parallel port. So the rows of the matrix are controlled by the computer. Similarly the
columns of the matrix are connected via transistors, used as switch, to the counter.
Therefore, the columns are controlled by the counter. The counter consists of 3
cascaded 4017 with 23 working output pins. Therefore, the cascaded counter is used
to produce 23 bits ring counter. In order to display certain character, it is necessary to
synchronize the counter triggering and data sent via parallel port. A certain
combination of data is sent through the port and displayed on first column. When
another bit combination is sent it is necessary to trigger the counter so that the bit
pattern is displayed on second column and so on.
A particular problem may arise when the computer is restarted. Whenever a computer
is restarted, the BIOS sends high bits to all parallel port pins. This may cause a
problem to the LED matrix since the first column is lit at this condition. In order to
prevent this we have designed a circuit which we have named code protection. In this
method we have used two D flipflops whose outputs are Anded and given to a master
transistor switch which acts as a switch to the whole Matrix. Now a certain bit pattern
to clock input and D input of the D FFs will only set the transistor. Therefore, a
particular bit pattern which acts as a code will only initialize the LED Matrix and
prevent unnecessary lighting of the matrix.

Computer Control
Counter


LED Matrix Display
Control Column
C
o
n
t
r
o
l

R
o
w

Power Flow
Signal Flow

15

3.1.2 Overall description of the circuit
In this section, description and working of the entire circuit is provided. The
description is done in separate parts of each major components of the circuit.

Counter:



4017BD_5V
O0
3
O1
2
O2
4
O3
7
~CP1
13
MR
15
CP0
14
O4
10
O5
1
O6
5
O7
6
O8
9
O9
11
~O5-9
12
4017BD_5V
O0
3
O1
2
O2
4
O3
7
~CP1
13
MR
15
CP0
14
O4
10
O5
1
O6
5
O7
6
O8
9
O9
11
~O5-9
12
4017BD_5V
O0
3
O1
2
O2
4
O3
7
~CP1
13
MR
15
CP0
14
O4
10
O5
1
O6
5
O7
6
O8
9
O9
11
~O5-9
12
CLOCK

Figure 15: Cascade Counter Implementation

In cascading, the first decoded output of 1
st
IC resets the second 4017 IC and so on.
Similarly, the last decoded output of the IC is ANDed with the master clock. Hence,
the second IC gets clock as soon as the last decoded output of first IC is high. Since
we have used 4 LED Matrix we require 23 output counter bits. So 9 bits are taken
from first counter, 8 bits from second counter and 6 bits from third counter. Therefore
the master reset of first counter is connected to output 7 of third counter. Therefore we
have 23 bits output counter.
The clock input the counter is given via the parallel port. Also, the Master Pin is also
connected to the parallel port in addition to output 7 of third column.

16

LED Matrix display
.....
.....
.....
.....
VCC
5V
R0
R1
R2
R3
R4
.....
LED MATRIX
SWITCH
O1 O2 O0 O4 O5 O3 O7 O8 O6 O9
To Counter Ouputs

Figure 16: Cascaded LED Matrix

The transistors connected to the buffer IC control the Vcc supply to the LEDs.
Similarly the transistors connected to the counter control the ground to the LEDs.
Furthermore, the anodes of LEDs in a particular row are connected together to a
single transistor controlled by parallel port. Similarly, the cathodes of LEDs in a
particular column are connected together to a single transistor controlled by the
counter. Therefore, we have a setup where we can control any particular row and
column which was our objective.
In order to display a certain character we need to synchronize the triggering of counter
and the data sent through the parallel port. When a certain bit pattern is supplied one
of the columns is lit. Now before the next pattern is supplied it is necessary to trigger
the counter so that next column is initiated. Therefore when the next bit pattern
arrives it is displayed on next column and so on. In order to synchronize the counter
and the parallel port, the clock pulse to the counter is taken from the computer itself
and not by external timer.
The Master LED Matrix switch is used in order to control the entire LED Matrix
Display. This is used in the code protection component which is described in the
following section.
T
o

P
a
r
a
l
l
e
l

P
o
r
t

v
i
a

B
u
f
f
e
r

I
C


17

Code protection
The code protection is used in order to prevent unnecessary switching on of the LED
Matrix Display. One such condition arises when computer is restated. Similarly when
operating software is loaded the parallel port may have unpredictable bit patterns.
Furthermore, certain noise voltages may also initialize the LED Matrix. So, it is of
prime importance that a design be made to prevent unnecessary lighting up of the
LED Matrix Display. The design used for this purpose in our product is illustrated
below:
D_FF
D Q
~Q
RESET
CLK
SET
D_FF
D Q
~Q
RESET
CLK
SET
Master LED Matrix
Transistor
12 11
10
9
8
7
LED MATRIX
VCC
5V
0
From data pin 7
From data pin 8

Figure17: Code Protection circuit

In order to initialize the LED Matrix we need to supply logic 1 to data pin 7 and clock
pulse to data pin 8 so that both FFs have high outputs. At this condition the transistor
is on and the LED Matrix display has ground supply. Similarly in order to disable the
LED Matrix display, we need to supply logic 0 to data pin 7 and clock pulse to data
pin 8 so that any one of the FFs has 0 output. At this condition the transistor is off and
the LED Matrix is relinquished from ground supply.

When the LED matrix is in working condition, i.e. when characters are being
displayed, the data pin 8 is at 0 pin all the time. Therefore there is no clock pulse to
the D FFs and they are not affected. In this way we can control the entire LED Matrix
Display at any time.


18

3.1.3 Computer Program:
Considerable time in the course of this project work has been dedicated to the construction of
a computer program to control the outputs of LED Matrix display. We have constructed a C
program to control the LED Matrix. The features of our program are listed below:

1. Real-Time Display: Allows user to display characters on the matrix display
in real time.
2. Scrolling Display: Allows user to scroll the characters on the matrix display.
3. Automatic detection of number of columns: A status feedback discussed
above detects the number of columns automatically. This also detects if the
hardware is turned on or not. It also follows that the program supports any
number of columns as long as it can maintain a good clock frequency for
persistence of vision.
4. Flexibility: The program is flexible in terms of variations. Any variation such
as modifications to font style can be easily achieved.
5. Alphanumeric characters: Allows user to enter uppercase alphabets (A to
Z) and numerals (0 to 9) along with few special characters (+, -, =).
Functions used in the program and their descriptions:

int essentials() : Determines and Sets pre-requisites of the program
void det_col(): Determines number of columns
void det_mat(): Determines number of matrices
void initials(): Sets default characters
void real_time_disp() : Real-Time Display
int real_time_screen(int *chlen): Real-Time's Menu Screen
int scroll_disp(): Scrolling Display
int scroll_screen(): Scrolling's Menu Screen
void char_select(char tempch[],int strno): Selects entered characters and determines the
bit pattern
void extract(int *bit[],int chlen): Extracts the bit patterns and stores them separately
void byte_dec(int *bit[], int dec[]): Generates decimal equivalence of the extracted bits
sequentially
void real_matrix(int dec[]): Sends data to data port
void initmat(): Enables LED Matrix display
void stopmat(): Disables LED Matrix display



19

Flowchart of the program:
Figure 18: Flowchart of the program
START
Menu
Choice
Call essentials()
Call det_col()
Column
Detected
?
Try
Again
?
Call det_mat()
Check
Menu
Choice
Call real_time_disp() Call scroll_disp()
Call real_time_screen()
Call scroll_screen()
Call char_select()
Call extract()
Call byte_dec()
Call real_matrix()
STOP
1 or 2
Esc
YES
NO NO
YES
1 2
Call initmat()
Call stopmat()

20

Flowchart to detect the column of the matrix:



































The status line is connected to one of the counter outputs which is connected to one of
the columns. When the output pin is high status becomes low. This initiates the
counting sequence and it continues until the next state when status is again 0.
START
Status
=
0?
Status = 1
Count=Count+1
Status
=
0?
Column = Count
STOP
Clock Pulse
Clock Pulse
YES
NO
YES
NO
Figure 19: Flowchart to detect the columns of the matrix

21

3.2 Mathematical Calculations and Experiments

We have performed several mathematical calculations and experiments under this
project in order to achieve correct outcomes. These calculations and experiments
include:

3.2.1 Mathematical Calculations
(All detail calculations are shown in Appendix A)

1. Required instantaneous current for maximum brightness = 0.2A

2. Calculation for Resistors
i. For LED Matrix resistors
1
2
0
3
4
6
Counter
Port via
buffer
VCC
5V
2V
3.1V
5
VCC
RC
RB1
RB2
8
0

Figure 20: LED Matrix component setup
R
C
= 15
R
B1
= 333
R
B2
= 2.2k
ii. For Master Led Matrix transistor

Master LED Matrix
Transistor
LED MATRIX
VCC
5V
0
1
RB

Figure 21: Master Transistor switch setup
R
B
= 645

22

3.2.2 Experimental Observations

Experiment 1: Output Pins of Parallel Port and Buffer IC

Direct Port: 5.15V
Corresponding Buffer Output: 6.1V

Experiment 2: Voltage Drop across Diode (Red)

Voltage Drop: 1.81V 2V

Experiment 3: Frequency from the parallel port when data is sent

From Data Pin 6 (Clock input):


Figure 22: Output waveform from data pin 6

Frequency observed: 1.515kHz.

23

From Data Pin 1 (Controls Row 1 of LED Matrix):


Figure 23: Output waveform from data pin 1

Of any particular column
On time 600us
Total time period 14ms







24

CHAPTER 4
PRODUCT DESCRIPTION AND PERFORMANCE

4.1 Product Description

4.1.1 Physical Description
The main purpose of this project LED Matrix Display is to display the
alphanumeric characters. It is used as a basic way of visual information. These are
best used to advertise, display news on streets, malls, buildings, parks and other
public places. However our product is designed for small purposes such as calculators
and games.
The final product consists of LEDs arranged into 2 dimensional, 55 matrix. There
are 4 such matrices with three additional columns, a D25 male connector for
connection between the parallel port of pc and the display device, LED Matrix
Display.



Figure 24: LED Matrix Display in PCB


Feature of LED Matrix Display

The final product of LED Matrix display can be divided into two parts: They are:
Hardware part and software part.

Hardware part
Code protection:
The code protection feature prevents unwanted lighting of the LED
Matrix under certain conditions such as computer restart and noise.
This therefore ensures safety of LEDs.

Maintenance of constant current in the LEDs:
The constant current is maintained in each LEDs of the LED Matrix,
Hence this provides equal brightness of LEDs when it is on.

Absence of high level circuits:
The circuit is build up by using simple electronic components like
transistors and counter ICs. Advanced components such as
microcontrollers which are usually used to construct LED Matrix
display are not used. Hence, this feature helps to reduce the price of
our final product.


25

Software part

Real-Time Display:
Allows user to display characters on the matrix display in real time.

Scrolling Display:
Allows user to scroll the characters on the matrix display.

Automatic detection of number of columns:
The computer program detects the number of columns automatically. This
also detects if the hardware is turned on or not. Similarly it indicates if the
parallel port is connected or not. It also follows that the program supports any
number of columns as long as it can maintain a good clock frequency for
persistence of vision.

Flexibility:
The program is flexible in terms of variations. Any variation such as
modifications to font style can be easily achieved.
Alphanumeric characters:
Allows user to enter uppercase alphabets (A to Z) and numerals (0 to
9) along with few special characters (+, -, =).


26

4.1.2 Cost Estimation

Cost Estimation of LED Matrix Display

Hardware Cost

Item Quantity Rate Price (Rs.)
LEDs 150 1.5 225
Transistor (BC548) 29 4 116
Transistor (SL100) 1 20 20
IC 74244 1 65 65
IC 4017 5 40 200
IC 7408 1 30 30
IC 74244 Holder 1 30 30
IC 4017 Holder 5 10 50
IC 7408 Holder 1 10 10
Zener Diode 5 5 25
Resistor (2.2k) 23 1 23
Resistor (10) 5 1 5
Resistor (300K) 5 1 5
Resistor (450) 3 1 3
Resistor (3.3K) 1 1 1
PCB Board (66) 1 300 300
TOTAL Rs. 1108

Table 5: Cost Estimation

Software Cost

LED Matrix Software = Rs.2500

Labour Cost

Labour cost per hour = Rs. 8
Total hour worked per week = 6 hours
Labour cost per week = Rs. (86) = Rs. 48
Labour cost per month = Rs. (484) = Rs. 192
TOTAL LABOUR COST of 8 months = Rs. (1928) = Rs. 1536

TOTAL COST without profit = Rs. (1108+2500+1536) = Rs. 5144

Profit

5% profit = Rs. 257.2

TOTAL COST with profit = Rs. (5144+257.2) = Rs. 5401.2


27

4.2 Product Performance

Algorithm
1. Connect the parallel port cable to parallel port of the computer.
2. Give 5V DC supply to the circuit.
3. Run the program and follow the menu instructions.

When the above procedure was followed the LED Matrix display worked properly.
The LEDs were lit with constant brightness and the Matrix did not turn on in
unwanted conditions.

4.3 Final Product.


Figure25: Final Product








28

CHAPTER 5
DISCUSSION AND CONCLUSION


The final product of our project has been done on a PCB board. The final product
represents the design concept of our product. The same concept can be utilized to
construct other LED Matrix displays for other purposes such as calculators and LED
Matrix display game.
We have tried to make our product better in every possible way. For this we have
spent considerable time and put on a lot of effort on it. In the course of the
construction of the LED Matrix display we feel that we have achieved much
knowledge and acquired immense experience.
The following is the list of work accomplished during the project course:

Work accomplished:

- Literature survey on existing LED matrix displays and related materials.
- Designing a proper LED Matrix display circuit most appropriate for our purpose.
- Creating a C program to enable user interface between the hardware and the
computer.
- Fabrication of the circuit on a PCB board.

Though we have tried to make the product as complete as possible there is always
room for improvements. The major improvement that can be done in the software
portion is constructing a proper delay function to ensure proper frequency. In our case
we have devised a proper way to maintain appropriate frequency which however can
be computer dependent. When a proper delay function is devised one can also create a
program which can set the on-time and off-time automatically to set proper frequency
automatically for any number of columns. In further improvements, the C program
can be made compatible for Windows NT and higher systems. In hardware portions
suitable parallel port slot and dc supply slot can be created to make the product
portable.
Therefore considering all the facts discussed in this report, it can be assured that our
product works properly and is reliable. The product is quite unique in the sense that
the design concept is in many ways different from that of existing LED Matrix
displays. Thus in the allocated time we have successfully completed our project work
and come up with a fine product.

29

5.1 Gantt Chart

March April May June
Proposal
writing

Proposal
defense

Literature
review

Prototype
design

Testing and
Implementation

Final
presentation








Figure 25: Gantt chart
Work Remaining
Work Completed

30

Bibliography


Boylestad, Robert L & Nashelsky, Louis. Electronic Devices and Circuit
Theory. 9
th
edition. Prentice Hall. India. 2008
http://en.wikipedia.org/wiki/Led
http://www.doctronics.co.uk/4017.htm
http://electrosofts.com/parallel/parallelwin.html
http://logix4u.net/Legacy_Ports/Parallel_Port/A_tutorial_on_Parallel_port_Int
erfacing.html

31

APPENDIX A
MATHEMATICAL CALCULATIONS

1. Calculation for required instantaneous current for maximum brightness










I
av
=
Since I
av
= =8mA
I
ins
= =0.18A =0.2A

2. Calculation for Resistors

(i) For LED Matrix resistors
1
2
0
3
4
6
Counter
Port via
buffer
VCC
5V
2V
3.1V
5
VCC
RC
RB1
RB2
8
0

We have, I
sat
= 0.2A
Now,
R
C
= =15

I
B1
= = =5.210
-4
A

V
600us
14ms
t

32

We take I
B1
, slightly greater
i.e. I
B1
=610
-4
A

Now,

R
B1
= =333.33
So, we have used 310 resistor.
Similar for R
B2
,

R
B2
= =2.6k 2.2k

(ii) For Master LED Matrix transistor

Master LED Matrix
Transistor
LED MATRIX
VCC
5V
0
1
RB


I
Csat
=0.25 =1A
I
B1
= =6.6710
-3
A
Therefore, R
B
= =645

33

APPENDIX B
COMPUTER PROGRAM

/*LED MATRIX DISPLAY PROGRAM FOR MATRIX OF 5 ROWS*/

#include<stdio.h>
#include<conio.h>
#include<dos.h>
#include<ctype.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>

#define PORT 0x378 /* PORT'S REGISTER ADDRESS */
#define ON_TIME 1
#define OFF_TIME 0
#define ROW 5

int **byte; /* Stores character patterns */
char check; /* Checks choice in menu */
int COL; /* No. of columns */
int MAT; /* No. of matrices */
int charlen=100; /* Maximum number of characters */
char ch[100];

int essentials(); /* Determines and Sets pre-requisites of the program */
void det_col(); /* Determines number of columns */
void det_mat(); /* Determines number of matrices */
void initials(); /* Sets default characters */

void real_time_disp() ; /* Real-Time Display */
int real_time_screen(int *chlen); /* Real-Time's Menu Screen */
int scroll_disp(); /* Scrolling Display */
int scroll_screen(); /* Scrolling's Menu Screen */

void char_select(char tempch[],int strno); /* Selects entered characters and
determines the bit patterns */
void extract(int *bit[],int chlen); /* Extracts the bit patterns and stores
them seperately */
void byte_dec(int *bit[], int dec[]); /* Generates decimal equivalence of the
extracted bits sequentially*/
void real_matrix(int dec[]); /* Sends data to data port */
void initmat(); /* Enables LED Matrix */
void stopmat(); /* Disables LED Matrix */


34


int main(){
while(1){
clrscr();
gotoxy(30,20);
printf("Please enter a choice:\n");
gotoxy(31,22);
printf("1: Real Time Display\n");
gotoxy(31,24);
printf("2: Scrolling Display\n");
gotoxy(36,28);
printf("Esc: Exit:\n\n");
gotoxy(40,30);
check=getch();
delay(100);
if(check=='\033') return 0;
if(essentials()==0) continue;
initmat();
if(check=='1') real_time_disp();
if(check=='2') scroll_disp();
stopmat();
outportb(PORT,0);
}
outportb(PORT,0);
free(ch);
free(byte);
return 0;
}

void initmat(){
outportb(PORT,0);
outportb(PORT,64);
delay(10);
outportb(PORT,192);
delay(10);
outportb(PORT,64);
delay(10);
outportb(PORT,192);
delay(10);
outportb(PORT,64);
delay(10);
outportb(PORT,0);
}



35


void stopmat(){
outportb(PORT,0);
outportb(PORT,0);
delay(10);
outportb(PORT,128);
delay(10);
outportb(PORT,0);
delay(10);
outportb(PORT,128);
delay(10);
outportb(PORT,0);
delay(10);
outportb(PORT,128);
}

int essentials(){
int i;
char chtry;
while(1){
det_col();
if(COL==-1){ /* Column not detected */
clrscr();
gotoxy(33,20);
printf("Column not detected\n");
gotoxy(24,23);
printf("Please check the connection and try again");
gotoxy(30,28);
printf("Press any key to try again");
gotoxy(29,30);
printf("Press Esc to return to menu");
gotoxy(42,32);
chtry=getch();
if (chtry=='\033') return 0;
else continue;
}
det_mat();
initials();
byte=(int *)malloc(charlen*sizeof(int*));/*Create memory to store bit
patterns*/
for(i=0;i<charlen;i++){
byte[i]=(int *)malloc(5*sizeof(int));
}
break;
}
return 1;
}


36

void det_col(){
int counter,count=0,checker=0;
int F=0;
int data;
clrscr();
while(1){
checker++; /* Sets the time limit for the counting sequence */
data=inportb(PORT+1);
counter=(data & 0x40)/0x40;/* Checks the status line connected to a counter
output */
gotoxy(38,25);
printf("LOADING");
if(counter==0){ /* Initiate counting sequence */
while(1){
checker=0;
outportb(PORT,32); /* Clock Pulse for the counter */
delay(1);
outportb(PORT,0);
delay(1);
data=inportb(PORT+1);
counter=(data & 0x40)/0x40;
count++; /* Incremented with every timing pulse */
if(counter==0){ /* The counting is stopped */
F=1;
break;
}
}

}
outportb(PORT,32); /* Clock Pulse for the counter */
delay(1);
outportb(PORT,0);
delay(1);
if(F==1) break;
if(checker==1000){ /* If no status detection till checker limit
hardware error */
count=-1;
break;
}
}
COL=count;
outportb(PORT,0);
}


37


void det_mat(){
int m,r;
m=COL/5;
r=COL%5;
if(r!=m-1) m=m-1; /* Sets the most feasible matrix number */
MAT=m;
clrscr();
printf("Column=%d Matrix=%d",COL,MAT);
getch();
}

void initials(){
int i;
for(i=0;i<=MAT;i++){
ch[i]=' ';
}
}

void real_time_disp(){
int i=0,j,k,value;
int *bit[ROW];
int *dec;
char *tempch;
char key;
dec=(int *)malloc(COL*sizeof(int)); /* Stores decimal values of bit's pattern
to be sent */
tempch=(char *)malloc(MAT*sizeof(char)); /* Stores temporary character which has
to printed at that moment */
for(j=0;j<MAT;j++){
tempch[j]=ch[j];
}
for(j=0;j<ROW;j++){ /* Stores all bits associated with the
characters entered */
bit[j]=(int *)malloc(COL*(sizeof(int)));
}
clrscr();
char_select(tempch,MAT); /* To make the matrix display blank
initially */
extract(bit,MAT);
byte_dec(bit,dec);
gotoxy(27,10);
printf("LED MATRIX REAL TIME DISPLAY");
gotoxy(27,35);
printf("Press Esc to return to menu");
while(1){
gotoxy(29,20);
cprintf("PLEASE ENTER THE STRING:");
gotoxy(40,22);
if(kbhit()){

38

value=real_time_screen(&i);
if(value==0) break; /* Esc or Enter Pressed */
if(value==-1) continue; /* Maximum character reached */
k=i;
gotoxy(20,20);
if(i<MAT){ /* To fill the matrix initially */
for(j=0;j<MAT;j++){
tempch[j]=ch[j];
}
}
else{ /* After the matrix is full */
for(j=MAT-1;j>=0;j--){
tempch[j]=ch[k-MAT+j];
}
}
char_select(tempch,MAT);
extract(bit,MAT);
byte_dec(bit,dec);
}
real_matrix(dec);
}
}

int real_time_screen(int *chlen){
int xco,yco;
int i;
i=*chlen;
ch[i]=toupper(getch());
xco=wherex();
yco=wherey();
if(ch[i]=='\033'||ch[i]=='\015') return 0; /* Enter or Esc */
if(ch[i]=='\010'&&i>0){ /* Backspace */
if(i<=MAT) ch[i-1]='\000';
ch[i]='\000';
i--;
gotoxy(26,15);
printf(" ");
gotoxy(xco,yco);
*chlen=i;
return 1;
}
if(i>=charlen-1){ /* Maximum character check */
gotoxy(26,15);
printf("Maximum character limit reached");
gotoxy(xco,yco);
return -1;
}
if((ch[i]>=060&&ch[i]<=071)||(ch[i]>=0101&&ch[i]<=0132)||
(ch[i]==055||ch[i]==053||ch[i]==075||ch[i]==040||ch[i]==0140)){ /* To allow certain
characters only */

39

i++;
*chlen=i;
return 1;
}
return -1;
}


int scroll_disp(){
int i=0,j,x=40;
int xco,yco;
int col=0;
float check=0;
int shift;
int start=COL,add=0;
float scroll_speed;
int swap_shift=0;
int chlen;
int *bit[ROW],*temp[ROW];
int *dec;
char keystr,tempch;
dec=(int *)malloc(COL*sizeof(int));
for(i=0;i<ROW;i++){ /* Create temporary memory to use in
scrolling */
temp[i]=(int *)malloc(COL*sizeof(int));
for(j=0;j<COL;j++){
temp[i][j]=0;
}
}
chlen=scroll_screen();
shift=(chlen*6-1);
char_select(ch,chlen);
for(i=0;i<ROW;i++){ /* Create bit memory to hold the
character bits */
bit[i]=(int *) malloc(shift * (sizeof(int)));
}
extract(bit,chlen);
scroll_speed=10;
while(1){
if(kbhit()){ /* To control speed */
keystr=getch();
if(keystr=='\033') break;
if(((keystr=='=')||(keystr=='+'))&&(scroll_speed>2.5)){
scroll_speed-=0.5;
x++;
}
if((keystr=='-')&&(scroll_speed<17)){
scroll_speed+=0.5;
x--;
}

40

if(check>scroll_speed) check=scroll_speed-1;
gotoxy(5,5);
//printf("%d ",scroll_speed);
}
gotoxy(25,25);
cprintf("<------------------------------>");
gotoxy(x,25);
cprintf("|");
gotoxy(40,26);
printf("%f %f",scroll_speed,check);
check++;
byte_dec(temp,dec);
real_matrix(dec);
if(check>scroll_speed){ /* Change pattern of output */
shift--;
check=0;
if(swap_shift==0){ /* Scroll the characters to the left */
start--;
if(start<0){ /* Set conditions once display is filled */
add++;
start=0;
col=add;
}
else col=0;
for(i=start;i<COL;i++){ /* Fill bits from the right end */
for(j=0;j<5;j++){
temp[j][i]=bit[j][col];
}
col++;
}
}
if(swap_shift==1){ /* Vanish bits at left end and fill zeros at
right end */
for(i=0;i<ROW;i++){
for(j=1;j<COL;j++){
temp[i][j-1]=temp[i][j];
}
}
for(i=0;i<ROW;i++){
temp[i][COL-1]=0;
}
}
if(shift==0){ /* Set initial conditions of scrolling */
shift=COL;
if(swap_shift==0) swap_shift=1;
else {
swap_shift=0;
shift=chlen*6-1;
add=0;
start=COL;

41

}
}
}
}
return 0;
}

int scroll_screen(){
int i=0;
char tempch;
int xco,yco,init_yco;
clrscr();
gotoxy(26,1);
printf("LED MATRIX SCROLLING DISPLAY");
gotoxy(1,6);
printf("PLEASE ENTER THE CHARACTER SEQUENCE: ");
init_yco=wherey();
while(1){ /* To compensate the
problem with getch() */
xco=wherex();
yco=wherey();
if(i>charlen){ /* Maximum character
reached */
gotoxy(25,10);
printf("Maximum character limit reached");
gotoxy(xco,yco);
}
else{
gotoxy(24,10);
printf(" ");
gotoxy(xco,yco);
}
tempch=toupper(getch());
if(tempch=='\015'||tempch=='\033') break; /* If Enter or Esc */
if(tempch=='\010'){ /* If Backspace */
if(i>0){
ch[i]='\000';
i--;
if(wherey()!=init_yco&&wherex()==1) gotoxy(80,wherey()-1);
else gotoxy(wherex()-1,wherey());
clreol();
}
continue;
}
if(i>charlen) continue;
if((tempch>=060&&tempch<=071)||(tempch>=0101&&tempch<=0132)||
(tempch==055||tempch==053||tempch==075||tempch==040)){ /* To allow
certain characters only */
putchar(tempch);
ch[i]=tempch;

42

i++;
}
}
gotoxy(24,10);
printf(" ");
gotoxy(24,15);
printf("PRESS:\n");
gotoxy(27,17);
printf("+ : Increase scrolling speed");
gotoxy(27,19);
printf("- : Decrease scrolling speed");
gotoxy(28,40);
printf("Press Esc to return to menu");
if(i==0){
ch[0]=' ';
return 1;
}
else return i;

}

void extract(int *bit[],int chlen){
int i,j,k,l,r,q;
for(i=0;i<ROW;i++){ /* 1 to 5th ROW */
l=chlen*6-1;
for(j=chlen-1;j>=0;j--){ /* Start from the last character */
q=byte[j][i];
for(k=0;k<5;k++){ /* Extract each bit from byte starting from right
end */
r=q%10;
bit[i][--l]=r;
q=q/10;
}
if(l<0) break;
bit[i][--l]=0;
}
}
}

void byte_dec(int *bit[], int dec[]){
int i,j;
for(j=0;j<COL;j++){ /* Calculate decimal equivalence of a column of
bits */
dec[j]=0;
for(i=0;i<ROW;i++){
dec[j]+=(pow(2,i)*bit[i][j]);
}
}
}


43

void real_matrix(int dec[]){
int i;
float j=0;
outportb(PORT,64); /* Master Reset */
for(i=0;i<COL;i++){
outportb(PORT,dec[i]); /* Required Bit Pattern */
while(j<21000) j++;
j=0;
//delay(ON_TIME);
outportb(PORT,32); /* Clock Pulse for the counter */
while(j<100) j++;
j=0;
//delay(OFF_TIME);
}
outportb(PORT,0);
}

void char_select(char tempch[],int strno){
int i;
for(i=0;i<strno;i++){
switch (tempch[i]){
case '0':
byte[i][0]=1110;
byte[i][1]=10001;
byte[i][2]=10001;
byte[i][3]=10001;
byte[i][4]=1110;
break;
case '1':
byte[i][0]=100;
byte[i][1]=1100;
byte[i][2]=100;
byte[i][3]=100;
byte[i][4]=11111;
break;
case '2':
byte[i][0]=11110;
byte[i][1]=1;
byte[i][2]=1110;
byte[i][3]=10000;
byte[i][4]=1111;
break;
case '3':
byte[i][0]=11110;
byte[i][1]=1;
byte[i][2]=11110;
byte[i][3]=1;
byte[i][4]=11110;
break;
case '4':

44

byte[i][0]=10001;
byte[i][1]=10001;
byte[i][2]=11111;
byte[i][3]=1;
byte[i][4]=1;
break;
case '5':
byte[i][0]=11111;
byte[i][1]=10000;
byte[i][2]=11110;
byte[i][3]=1;
byte[i][4]=11110;
break;
case '6':
byte[i][0]=1110;
byte[i][1]=10000;
byte[i][2]=11110;
byte[i][3]=10001;
byte[i][4]=1110;
break;
case '7':
byte[i][0]=11111;
byte[i][1]=1;
byte[i][2]=10;
byte[i][3]=100;
byte[i][4]=1000;
break;
case '8':
byte[i][0]=1110;
byte[i][1]=10001;
byte[i][2]=1110;
byte[i][3]=10001;
byte[i][4]=1110;
break;
case '9':
byte[i][0]=1110;
byte[i][1]=10001;
byte[i][2]=1111;
byte[i][3]=1;
byte[i][4]=1110;
break;

case 'A':
byte[i][0]=1110;
byte[i][1]=10001;
byte[i][2]=11111;
byte[i][3]=10001;
byte[i][4]=10001;
break;
case 'B':

45

byte[i][0]=11110;
byte[i][1]=10001;
byte[i][2]=11110;
byte[i][3]=10001;
byte[i][4]=11110;
break;
case 'C':
byte[i][0]=1111;
byte[i][1]=10000;
byte[i][2]=10000;
byte[i][3]=10000;
byte[i][4]=1111;
break;
case 'D':
byte[i][0]=11110;
byte[i][1]=10001;
byte[i][2]=10001;
byte[i][3]=10001;
byte[i][4]=11110;
break;
case 'E':
byte[i][0]=11111;
byte[i][1]=10000;
byte[i][2]=11110;
byte[i][3]=10000;
byte[i][4]=11111;
break;
case 'F':
byte[i][0]=11111;
byte[i][1]=10000;
byte[i][2]=11110;
byte[i][3]=10000;
byte[i][4]=10000;
break;
case 'G':
byte[i][0]=11111;
byte[i][1]=10000;
byte[i][2]=10111;
byte[i][3]=10101;
byte[i][4]=11101;
break;
case 'H':
byte[i][0]=10001;
byte[i][1]=10001;
byte[i][2]=11111;
byte[i][3]=10001;
byte[i][4]=10001;
break;
case 'I':
byte[i][0]=11111;

46

byte[i][1]=100;
byte[i][2]=100;
byte[i][3]=100;
byte[i][4]=11111;
break;
case 'J':
byte[i][0]=1111;
byte[i][1]=10;
byte[i][2]=10;
byte[i][3]=10010;
byte[i][4]=1100;
break;
case 'K':
byte[i][0]=10011;
byte[i][1]=10100;
byte[i][2]=11000;
byte[i][3]=10100;
byte[i][4]=10011;
break;
case 'L':
byte[i][0]=10000;
byte[i][1]=10000;
byte[i][2]=10000;
byte[i][3]=10000;
byte[i][4]=11111;
break;
case 'M':
byte[i][0]=10001;
byte[i][1]=11011;
byte[i][2]=10101;
byte[i][3]=10001;
byte[i][4]=10001;
break;
case 'N':
byte[i][0]=10001;
byte[i][1]=11001;
byte[i][2]=10101;
byte[i][3]=10011;
byte[i][4]=10001;
break;
case 'O':
byte[i][0]=1110;
byte[i][1]=10001;
byte[i][2]=10001;
byte[i][3]=10001;
byte[i][4]=1110;
break;
case 'P':
byte[i][0]=11110;
byte[i][1]=10001;

47

byte[i][2]=11110;
byte[i][3]=10000;
byte[i][4]=10000;
break;
case 'Q':
byte[i][0]=1110;
byte[i][1]=10001;
byte[i][2]=10101;
byte[i][3]=10011;
byte[i][4]=1111;
break;
case 'R':
byte[i][0]=11110;
byte[i][1]=10001;
byte[i][2]=11110;
byte[i][3]=10100;
byte[i][4]=10011;
break;
case 'S':
byte[i][0]=1111;
byte[i][1]=10000;
byte[i][2]=11110;
byte[i][3]=1;
byte[i][4]=11110;
break;
case 'T':
byte[i][0]=11111;
byte[i][1]=100;
byte[i][2]=100;
byte[i][3]=100;
byte[i][4]=100;
break;
case 'U':
byte[i][0]=10001;
byte[i][1]=10001;
byte[i][2]=10001;
byte[i][3]=10001;
byte[i][4]=1110;
break;
case 'V':
byte[i][0]=10001;
byte[i][1]=10001;
byte[i][2]=10001;
byte[i][3]=1010;
byte[i][4]=100;
break;
case 'W':
byte[i][0]=10001;
byte[i][1]=10001;
byte[i][2]=10101;

48

byte[i][3]=11011;
byte[i][4]=10001;
break;
case 'X':
byte[i][0]=10001;
byte[i][1]=1010;
byte[i][2]=100;
byte[i][3]=1010;
byte[i][4]=10001;
break;
case 'Y':
byte[i][0]=10001;
byte[i][1]=1010;
byte[i][2]=100;
byte[i][3]=100;
byte[i][4]=100;
break;
case 'Z':
byte[i][0]=11111;
byte[i][1]=10;
byte[i][2]=100;
byte[i][3]=1000;
byte[i][4]=11111;
break;
case '`':
byte[i][0]=11111;
byte[i][1]=11111;
byte[i][2]=11111;
byte[i][3]=11111;
byte[i][4]=11111;
break;
case '-':
byte[i][0]=0;
byte[i][1]=0;
byte[i][2]=11111;
byte[i][3]=0;
byte[i][4]=0;
break;
case '+':
byte[i][0]=100;
byte[i][1]=100;
byte[i][2]=11111;
byte[i][3]=100;
byte[i][4]=100;
break;
case '=':
byte[i][0]=0;
byte[i][1]=11111;
byte[i][2]=0;
byte[i][3]=11111;

49

byte[i][4]=0;
break;
case '^':
byte[i][0]=100;
byte[i][1]=1010;
byte[i][2]=10001;
byte[i][3]=0;
byte[i][4]=0;
break;
default:
byte[i][0]=0;
byte[i][1]=0;
byte[i][2]=0;
byte[i][3]=0;
byte[i][4]=0;
}
}
}

50

APPENDIX C
PCB Circuit



Top section



51



Bottom section



52

APPENDIX D
DATASHEETS



The following pages contain datasheets of the components used in the final product.
The datasheets are organized sequentially in following order:

1. Datasheet of BC548
2. Datasheet of 1N4148
3. Datasheet of SL100
4. Datasheet of 74244
5. Datasheet of 7408
6. Datasheet of 74175
7. Datasheet of 4017
B
C
5
4
8

/

B
C
5
4
8
A

/

B
C
5
4
8
B

/

B
C
5
4
8
C
NPN General Purpose Amplifier
BC548
BC548A
BC548B
BC548C
This device is designed for use as general purpose amplifiers
and switches requiring collector currents to 300 mA. Sourced from
Process 10. See PN100A for characteristics.
Absolute Maximum Ratings* TA = 25C unless otherwise noted
*These ratings are limiting values above which the serviceability of any semiconductor device may be impaired.
NOTES:
1) These ratings are based on a maximum junction temperature of 150 degrees C.
2) These are steady state limits. The factory should be consulted on applications involving pulsed or low duty cycle operations.
Thermal Characteristics TA = 25C unless otherwise noted
Symbol Parameter Value Units
V
CEO
Collector-Emitter Voltage 30 V
V
CES
Collector-Base Voltage 30 V
V
EBO
Emitter-Base Voltage 5.0 V
I
C
Collector Current - Continuous 500 mA
T
J
, T
stg
Operating and Storage Junction Temperature Range -55 to +150 C
Symbol Characteristic Max Units
BC548 / A / B / C
P
D
Total Device Dissipation
Derate above 25C
625
5.0
mW
mW/C
RJC
Thermal Resistance, Junction to Case 83.3 C/W
RJA
Thermal Resistance, Junction to Ambient 200 C/W
E
B
C
TO-92
1997 Fairchild Semiconductor Corporation 548-ABC, Rev B
B
C
5
4
8

/

B
C
5
4
8
A

/

B
C
5
4
8
B

/

B
C
5
4
8
C
NPN General Purpose Amplifier
(continued)
Electrical Characteristics TA = 25C unless otherwise noted
OFF CHARACTERISTICS
Symbol Parameter Test Conditions Min Max Units
V
(BR)CEO
Collector-Emitter Breakdown Voltage I
C
= 10 mA, I
B
= 0 30 V
V
(BR)CBO
Collector-Base Breakdown Voltage I
C
= 10 A, I
E
= 0 30 V
V
(BR)CES
Collector-Base Breakdown Voltage I
C
= 10 A, I
E
= 0 30 V
V
(BR)EBO
Emitter-Base Breakdown Voltage I
E
= 10 A, I
C
= 0 5.0 V
I
CBO
Collector Cutoff Current V
CB
= 30 V, I
E
= 0
V
CB
= 30 V, I
E
= 0, T
A
= +150 C
15
5.0
nA
A
ON CHARACTERISTICS
h
FE
DC Current Gain V
CE
= 5.0 V, I
C
= 2.0 mA 548
548A
548B
548C
110
110
200
420
800
220
450
800
V
CE(sat)
Collector-Emitter Saturation Voltage I
C
= 10 mA, I
B
= 0.5 mA
I
C
= 100 mA, I
B
= 5.0 mA
0.25
0.60
V
V
V
BE(on)
Base-Emitter On Voltage V
CE
= 5.0 V, I
C
= 2.0 mA
V
CE
= 5.0 V, I
C
= 10 mA
0.58 0.70
0.77
V
V
SMALL SIGNAL CHARACTERISTICS
h
fe
Small-Signal Current Gain I
C
= 2.0 mA, V
CE
= 5.0 V,
f = 1.0 kHz
125 900
NF Noise Figure V
CE
= 5.0 V, I
C
= 200 A,
R
S
= 2.0 k, f = 1.0 kHz,
B
W
= 200 Hz
10 dB
Product data sheet
Supersedes data of 2002 Jan 23
2004 Aug 10
DISCRETE SEMICONDUCTORS
1N4148; 1N4448
High-speed diodes
M3D176
2004 Aug 10 2
NXP Semiconductors Product data sheet
High-speed diodes 1N4148; 1N4448
FEATURES
Hermetically sealed leaded glass SOD27 (DO-35)
package
High switching speed: max. 4 ns
General application
Continuous reverse voltage: max. 100 V
Repetitive peak reverse voltage: max. 100 V
Repetitive peak forward current: max. 450 mA.
APPLICATIONS
High-speed switching.
DESCRIPTION
The 1N4148 and 1N4448 are high-speed switching diodes
fabricated in planar technology, and encapsulated in
hermetically sealed leaded glass SOD27 (DO-35)
packages.
MARKING
TYPE NUMBER MARKING CODE
1N4148 1N4148PH or 4148PH
1N4448 1N4448
Fig.1 Simplified outline (SOD27; DO-35) and
symbol.
The diodes are type branded.
handbook, halfpage
MAM246
k a
ORDERING INFORMATION
TYPE NUMBER
PACKAGE
NAME DESCRIPTION VERSION
1N4148 hermetically sealed glass package; axial leaded; 2 leads SOD27
1N4448
2004 Aug 10 3
NXP Semiconductors Product data sheet
High-speed diodes 1N4148; 1N4448
LIMITING VALUES
In accordance with the Absolute Maximum Rating System (IEC 60134).
Note
1. Device mounted on an FR4 printed-circuit board; lead length 10 mm.
SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT
V
RRM
repetitive peak reverse voltage 100 V
V
R
continuous reverse voltage 100 V
I
F
continuous forward current see Fig.2; note 1 200 mA
I
FRM
repetitive peak forward current 450 mA
I
FSM
non-repetitive peak forward current square wave; T
j
= 25 C prior to
surge; see Fig.4
t = 1 s 4 A
t = 1 ms 1 A
t = 1 s 0.5 A
P
tot
total power dissipation T
amb
= 25 C; note 1 500 mW
T
stg
storage temperature 65 +200 C
T
j
junction temperature 200 C
ELECTRICAL CHARACTERISTICS
T
j
= 25 C unless otherwise specified.
SYMBOL PARAMETER CONDITIONS MIN. MAX. UNIT
V
F
forward voltage see Fig.3
1N4148 I
F
= 10 mA 1 V
1N4448 I
F
= 5 mA 0.62 0.72 V
I
F
= 100 mA 1 V
I
R
reverse current V
R
= 20 V; see Fig.5 25 nA
V
R
= 20 V; T
j
= 150 C; see Fig.5 50 A
I
R
reverse current; 1N4448 V
R
= 20 V; T
j
= 100 C; see Fig.5 3 A
C
d
diode capacitance f = 1 MHz; V
R
= 0 V; see Fig.6 4 pF
t
rr
reverse recovery time when switched from I
F
= 10 mA to
I
R
= 60 mA; R
L
= 100 ;
measured at I
R
= 1 mA; see Fig.7
4 ns
V
fr
forward recovery voltage when switched from I
F
= 50 mA;
t
r
= 20 ns; see Fig.8
2.5 V
THERMAL CHARACTERISTICS
Note
1. Device mounted on a printed-circuit board without metallization pad.
SYMBOL PARAMETER CONDITIONS VALUE UNIT
R
th(j-tp)
thermal resistance from junction to tie-point lead length 10 mm 240 K/W
R
th(j-a)
thermal resistance from junction to ambient lead length 10 mm; note 1 350 K/W
2000 Fairchild Semiconductor Corporation DS008442 www.fairchildsemi.com
August 1986
Revised March 2000
D
M
7
4
L
S
2
4
4

O
c
t
a
l

3
-
S
T
A
T
E

B
u
f
f
e
r
/
L
i
n
e

D
r
i
v
e
r
/
L
i
n
e

R
e
c
e
i
v
e
r
DM74LS244
Octal 3-STATE Buffer/Line Driver/Line Receiver
General Description
These buffers/line drivers are designed to improve both the
performance and PC board density of 3-STATE buffers/
drivers employed as memory-address drivers, clock driv-
ers, and bus-oriented transmitters/receivers. Featuring 400
mV of hysteresis at each low current PNP data line input,
they provide improved noise rejection and high fanout out-
puts and can be used to drive terminated lines down to
133.
Features
I 3-STATE outputs drive bus lines directly
I PNP inputs reduce DC loading on bus lines
I Hysteresis at data inputs improves noise margins
I Typical I
OL
(sink current) 24 mA
I Typical I
OH
(source current) 15 mA
I Typical propagation delay times
Inverting 10.5 ns
Noninverting 12 ns
I Typical enable/disable time 18 ns
I Typical power dissipation (enabled)
Inverting 130 mW
Noninverting 135 mW

Ordering Code:
Devices also available in Tape and Reel. Specify by appending the suffix letter X to the ordering code.
Connection Diagram Function Table
L = LOW Logic Level
H = HIGH Logic Level
X = Either LOW or HIGH Logic Level
Z = High Impedance
Order Number Package Number Package Description
DM74LS244WM M20B 20-Lead Small Outline Integrated Circuit (SOIC), JEDEC MS-013, 0.300 Wide
DM74LS244SJ M20D 20-Lead Small Outline Package (SOP), EIAJ TYPE II, 5.3mm Wide
DM74LS244N N20A 20-Lead Plastic Dual-In-Line Package (PDIP), JEDEC MS-001, 0.300 Wide
Inputs Output
G A Y
L L L
L H H
H X Z
www.fairchildsemi.com 2
D
M
7
4
L
S
2
4
4
Absolute Maximum Ratings(Note 1)
Note 1: The Absolute Maximum Ratings are those values beyond which
the safety of the device cannot be guaranteed. The device should not be
operated at these limits. The parametric values defined in the Electrical
Characteristics tables are not guaranteed at the absolute maximum ratings.
The Recommended Operating Conditions table will define the conditions
for actual device operation.
Recommended Operating Conditions
Electrical Characteristics
over recommended operating free air temperature range (unless otherwise noted)
Note 2: All typicals are at V
CC
= 5V, T
A
= 25C.
Note 3: Not more than one output should be shorted at a time, and the duration should not exceed one second.
Supply Voltage 7V
Input Voltage 7V
Operating Free Air Temperature Range 0C to +70C
Storage Temperature Range 65C to +150C
Symbol Parameter Min Nom Max Units
V
CC
Supply Voltage 4.75 5 5.25 V
V
IH
HIGH Level Input Voltage 2 V
V
IL
LOW Level Input Voltage 0.8 V
I
OH
HIGH Level Output Current 15 mA
I
OL
LOW Level Output Current 24 mA
T
A
Free Air Operating Temperature 0 70 C
Symbol Parameter Conditions
Min Typ Max
Units
(Note 2)
V
I
Input Clamp Voltage V
CC
= Min, I
I
= 18 mA 1.5 V
HYS Hysteresis (V
T+
V
T
) V
CC
= Min 0.2 0.4 V
Data Inputs Only
V
OH
HIGH Level Output Voltage V
CC
= Min, V
IH
= Min
2.7
V
IL
= Max, I
OH
= 1 mA
V
CC
= Min, V
IH
= Min
2.4 3.4 V
V
IL
= Max, I
OH
= 3 mA
V
CC
= Min, V
IH
= Min
2
V
IL
= 0.5V, I
OH
= Max
V
OL
LOW Level Output Voltage V
CC
= Min I
OL
= 12 mA 0.4
V V
IL
= Max I
OL
= Max 0.5
V
IH
= Min
I
OZH
Off-State Output Current, V
CC
= Max V
O
= 2.7V 20 A
HIGH Level Voltage Applied V
IL
= Max
I
OZL
Off-State Output Current, V
IH
= Min V
O
= 0.4V 20 A
LOW Level Voltage Applied
I
I
Input Current at Maximum V
CC
= Max V
I
= 7V 0.1 mA
Input Voltage
I
IH
HIGH Level Input Current V
CC
= Max V
I
= 2.7V 20 A
I
IL
LOW Level Input Current V
CC
= Max V
I
= 0.4V 0.5 200 A
I
OS
Short Circuit Output Current V
CC
= Max (Note 3) 40 225 mA
I
CC
Supply Current V
CC
= Max, Outputs HIGH 13 23
Outputs Open Outputs LOW 27 46 mA
Outputs Disabled 32 54
3 www.fairchildsemi.com
D
M
7
4
L
S
2
4
4
Switching Characteristics
at V
CC
= 5V, T
A
= 25C
Symbol Parameter Conditions Max Units
t
PLH
Propagation Delay Time C
L
= 45 pF
18 ns
LOW-to-HIGH Level Output R
L
= 667
t
PHL
Propagation Delay Time C
L
= 45 pF
18 ns
HIGH-to-LOW Level Output R
L
= 667
t
PZL
Output Enable Time to C
L
= 45 pF
30 ns
LOW Level R
L
= 667
t
PZH
Output Enable Time to C
L
= 45 pF
23 ns
HIGH Level R
L
= 667
t
PLZ
Output Disable Time C
L
= 5 pF
25 ns
from LOW Level R
L
= 667
t
PHZ
Output Disable Time C
L
= 5 pF
18 ns
from HIGH Level R
L
= 667
t
PLH
Propagation Delay Time C
L
= 150 pF
21 ns
LOW-to-HIGH Level Output R
L
= 667
t
PHL
Propagation Delay Time C
L
= 150 pF
22 ns
HIGH-to-LOW Level Output R
L
= 667
t
PZL
Output Enable Time to C
L
= 150 pF
33 ns
LOW Level R
L
= 667
t
PZH
Output Enable Time to C
L
= 150 pF
26 ns
HIGH Level R
L
= 667
Philips Semiconductors
74F08
Quad two-input AND gate
Product specification 1995 Apr 19
INTEGRATED CIRCUITS
IC15 Data Handbook
Philips Semiconductors Product specification
74F08 Quad 2-input AND gate
2 1995 Apr 19 8530328 15145
74F08 Available for industrial range (40C to +85C)
TYPE TYPICAL
PROPAGATION
DELAY
TYPICAL
SUPPLY CURRENT
(TOTAL)
74F08 4.1ns 7.1mA
PIN CONFIGURATION
14
13
12
11
10
9
8 7
6
5
4
3
2
1
GND
V
CC
D2b
D2a
Q2
Q3
D3b
D3a
D0a
D0b
Q1
Q0
D1a
D1b
SF00038
ORDERING INFORMATION
DESCRIPTION
COMMERCIAL RANGE
V
CC
= 5.0V 10%, T
amb
= 0C to +70C
INDUSTRIAL RANGE
V
CC
= 5.0V 10%, T
amb
= 40C to +85C
PKG DWG #
14-pin plastic DIP N74F08N I74F08N SOT27-1
14-pin plastic SO N74F08D I74F08D SOT108-1
INPUT AND OUTPUT LOADING AND FAN-OUT TABLE
PINS DESCRIPTION 74F (U.L.) HIGH/LOW LOAD VALUE HIGH/LOW
Dna, Dnb Data inputs 1.0/1.0 20A/0.6mA
Qn Data output 50/33 1.0mA/20mA
NOTE: One (1.0) FAST unit load is defined as: 20A in the High state and 0.6mA in the Low state.
LOGIC DIAGRAM
D0a
D0b
D1a
D1b
D2a
Q0
D2b
D3a
D3b
Q1
Q2
Q3

V
CC
= Pin 14
GND = Pin 7
3
6
8
11
1
2
4
5
9
10
12
13
SF00052
FUNCTION TABLE
INPUTS OUTPUT
Dna Dnb Qn
L L L
L H L
H L L
H H H
NOTES:
H = High voltage level
L = Low voltage level
LOGIC SYMBOL
D0a D0bD1a D2a D2b D3a D3b D1b
Q0 Q1 Q2 Q3
3 6 8 11
1 2 4 5 9 10 12 13
V
CC
= Pin 14
GND = Pin 7
SF00040
LOGIC SYMBOL (IEEE/IEC)
1
2
4
5
9
10
12
13
&
3
6
8
11
SF00053
5-1
FAST AND LS TTL DATA
QUAD D FLIP-FLOP
The LSTTL/ MSI SN54/ 74LS175 is a high speed Quad D Flip-Flop. The
device is useful for general flip-flop requirements where clock and clear inputs
are common. The information on the D inputs is stored during the LOW to
HIGH clock transition. Both true and complemented outputs of each flip-flop
are provided. A Master Reset input resets all flip-flops, independent of the
Clock or D inputs, when LOW.
The LS175 is fabricated with the Schottky barrier diode process for high
speed and is completely compatible with all Motorola TTL families.
Edge-Triggered D-Type Inputs
Buffered-Positive Edge-Triggered Clock
Clock to Output Delays of 30 ns
Asynchronous Common Reset
True and Complement Output
Input Clamp Diodes Limit High Speed Termination Effects
NOTE:
The Flatpak version
has the same pinouts
(Connection Diagram) as
the Dual In-Line Package.
CONNECTION DIAGRAM DIP (TOP VIEW)
14 13 12 11 10 9
1 2 3 4 5 6 7
16 15
8
V
CC
MR
Q
3
Q
3
D
3
D
2
Q
2
Q
2
CP
Q
0
Q
0
D
0
D
1
Q
1
Q
1
GND
PIN NAMES LOADING (Note a)
HIGH LOW
D
0
D
3
CP
MR
Q
0
Q
3
Q
0
Q
3
Data Inputs
Clock (Active HIGH Going Edge) Input
Master Reset (Active LOW) Input
True Outputs (Note b)
Complemented Outputs (Note b)
0.5 U.L.
0.5 U.L.
0.5 U.L.
10 U.L.
10 U.L.
0.25 U.L.
0.25 U.L.
0.25 U.L.
5 (2.5) U.L.
5 (2.5) U.L.
NOTES:
a. 1 TTL Unit Load (U.L.) = 40 A HIGH/1.6 mA LOW.
b. The Output LOW drive factor is 2.5 U.L. for Military (54) and 5 U.L. for Commercial (74)
b. Temperature Ranges.
LOGIC DIAGRAM
D Q
CP
C
D
Q
CP D
3
D
2
D
1
D
0
Q
3
Q
3
Q
2
Q
2
Q
1
Q
1
Q
0
Q
0
D Q
CP
C
D
Q
MR
14
1
2 6 7 3
4 5 9
11
12
10
13
15
V
CC
= PIN 16
GND = PIN 8
= PIN NUMBERS
D Q
CP
C
D
Q
D Q
CP
C
D
Q
SN54/74LS175
QUAD D FLIP-FLOP
LOW POWER SCHOTTKY
J SUFFIX
CERAMIC
CASE 620-09
N SUFFIX
PLASTIC
CASE 648-08
16
1
16
1
ORDERING INFORMATION
SN54LSXXXJ Ceramic
SN74LSXXXN Plastic
SN74LSXXXD SOIC
16
1
D SUFFIX
SOIC
CASE 751B-03
LOGIC SYMBOL
V
CC
= PIN 16
GND = PIN 8
12
1
2 3 6 7 11 14 15 10
4 5 13
9 CP
D
0
D
1
D
2
D
3
MR
Q
0
Q
0
Q
1
Q
1
Q
2
Q
2
Q
3
Q
3
5-2
FAST AND LS TTL DATA
SN54/74LS175
FUNCTIONAL DESCRIPTION
The LS175 consists of four edge-triggered D flip-flops with
individual D inputs and Q and Q outputs. The Clock and
Master Reset are common. The four flip-flops will store the
state of their individual D inputs on the LOW to HIGH Clock
(CP) transition, causing individual Q and Q outputs to follow. A
LOW input on the Master Reset (MR) will force all Q outputs
LOW and Q outputs HIGH independent of Clock or Data
inputs.
The LS175 is useful for general logic applications where a
common Master Reset and Clock are acceptable.
TRUTH TABLE
Inputs (t = n, MR = H) Outputs (t = n+1) Note 1
D Q Q
L L H
H H L
Note 1: t = n + 1 indicates conditions after next clock.
GUARANTEED OPERATING RANGES
Symbol Parameter Min Typ Max Unit
V
CC
Supply Voltage 54
74
4.5
4.75
5.0
5.0
5.5
5.25
V
T
A
Operating Ambient Temperature Range 54
74
55
0
25
25
125
70
C
I
OH
Output Current High 54, 74 0.4 mA
I
OL
Output Current Low 54
74
4.0
8.0
mA
DC CHARACTERISTICS OVER OPERATING TEMPERATURE RANGE (unless otherwise specified)
S b l P
Limits
U i T C di i Symbol Parameter Min Typ Max Unit Test Conditions
V
IH
Input HIGH Voltage 2.0 V
Guaranteed Input HIGH Voltage for
All Inputs
V
IL
Input LOWVoltage
54 0.7
V
Guaranteed Input LOW Voltage for
V
IL
Input LOW Voltage
74 0.8
V
p g
All Inputs
V
IK
Input Clamp Diode Voltage 0.65 1.5 V V
CC
= MIN, I
IN
= 18 mA
V
OH
Output HIGH Voltage
54 2.5 3.5 V
V
CC
= MIN, I
OH
= MAX, V
IN
= V
IH
V
OH
Output HIGH Voltage
74 2.7 3.5 V
CC
,
OH
,
IN IH
or V
IL
per Truth Table
V
OL
Output LOWVoltage
54, 74 0.25 0.4 V I
OL
= 4.0 mA
V
CC
= V
CC
MIN,
V
IN
= V
IL
or V
IH
V
OL
Output LOW Voltage
74 0.35 0.5 V I
OL
= 8.0 mA
V
IN
= V
IL
or V
IH
per Truth Table
I
IH
Input HIGH Current
20 A V
CC
= MAX, V
IN
= 2.7 V
I
IH
Input HIGH Current
0.1 mA V
CC
= MAX, V
IN
= 7.0 V
I
IL
Input LOW Current 0.4 mA V
CC
= MAX, V
IN
= 0.4 V
I
OS
Short Circuit Current (Note 1) 20 100 mA V
CC
= MAX
I
CC
Power Supply Current 18 mA V
CC
= MAX
Note 1: Not more than one output should be shorted at a time, nor for more than 1 second.
Product specication
File under Integrated Circuits, IC04
January 1995
INTEGRATED CIRCUITS
HEF4017B
MSI
5-stage Johnson counter
For a complete data sheet, please also download:
The IC04 LOCMOS HE4000B Logic
Family Specifications HEF, HEC
The IC04 LOCMOS HE4000B Logic
Package Outlines/Information HEF, HEC
January 1995 2
Philips Semiconductors Product specication
5-stage Johnson counter
HEF4017B
MSI
DESCRIPTION
The HEF4017B is a 5-stage Johnson decade counter with
ten spike-free decoded active HIGH outputs (O
o
to O
9
), an
active LOW output from the most significant flip-flop (O
5-9
),
active HIGH and active LOW clock inputs (CP
0
, CP
1
) and
an overriding asynchronous master reset input (MR).
The counter is advanced by either a LOW to HIGH
transition at CP
0
while CP
1
is LOW or a HIGH to LOW
transition at CP
1
while CP
0
is HIGH (see also function
table).
When cascading counters, the O
5-9
output, which is LOW
while the counter is in states 5, 6, 7, 8 and 9, can be used
to drive the CP
0
input of the next counter.
A HIGH on MR resets the counter to zero
(O
o
= O
5-9
= HIGH; O
1
to O
9
= LOW) independent of the
clock inputs (CP
0
, CP
1
).
Automatic code correction of the counter is provided by an
internal circuit: following any illegal code the counter
returns to a proper counting mode within 11 clock pulses.
Schmitt-trigger action in the clock input makes the circuit
highly tolerant to slower clock rise and fall times.
Fig.1 Functional diagram.
HEF4017BP(N): 16-lead DIL; plastic (SOT38-1)
HEF4017BD(F): 16-lead DIL; ceramic (cerdip) (SOT74)
HEF4017BT(D): 16-lead SO; plastic (SOT109-1)
( ): Package Designator North America
Fig.2 Pinning diagram.
PINNING
FAMILY DATA, I
DD
LIMITS category MSI
See Family Specifications
CP
0
clock input (LOW to HIGH triggered)
CP
1
clock input (HIGH to LOW triggered)
MR master reset input
O
0
to O
9
decoded outputs
O
5-9
carry output (active LOW)
J
a
n
u
a
r
y

1
9
9
5
3
P
h
i
l
i
p
s

S
e
m
i
c
o
n
d
u
c
t
o
r
s
P
r
o
d
u
c
t

s
p
e
c
i

c
a
t
i
o
n
5
-
s
t
a
g
e

J
o
h
n
s
o
n

c
o
u
n
t
e
r
H
E
F
4
0
1
7
B
M
S
I
This text is here in white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here in
_white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader.This text is here inThis text is here in
white to force landscape pages to be rotated correctly when browsing through the pdf in the Acrobat reader. white to force landscape pages to be ...
Fig.3 Logic diagram.
January 1995 4
Philips Semiconductors Product specication
5-stage Johnson counter
HEF4017B
MSI
FUNCTION TABLE
MR CP
0
CP
1
OPERATION
H X X O
0
= O
5-9
= H; O
1
to O
9
= L
L H Counter advances
L L Counter advances
L L X No change
L X H No change
L H No change
L L No change
Notes
1. H = HIGH state (the more positive voltage)
2. L = LOW state (the less positive voltage)
3. X = state is immaterial
4. = positive-going transition
5. = negative-going transition
AC CHARACTERISTICS
V
SS
= 0 V; T
amb
= 25 C; C
L
= 50 pF; input transition times 20 ns
V
DD
V
SYMBOL MIN. TYP. MAX.
TYPICAL EXTRAPOLATION
FORMULA
Propagation delays
CP
0
, CP
1
O
0
to O
9
5 140 280 ns 113 ns + (0,55 ns/pF) C
L
HIGH to LOW 10 t
PHL
55 110 ns 44 ns + (0,23 ns/pF) C
L
15 40 80 ns 32 ns + (0,16 ns/pF) C
L
5 125 250 ns 98 ns + (0,55 ns/pF) C
L
LOW to HIGH 10 t
PLH
50 100 ns 39 ns + (0,23 ns/pF) C
L
15 40 80 ns 32 ns + (0,16 ns/pF) C
L
CP
0
, CP
1
O
5-9
5 145 290 ns 118 ns + (0,55 ns/pF) C
L
HIGH to LOW 10 t
PHL
55 110 ns 44 ns + (0,23 ns/pF) C
L
15 40 80 ns 32 ns + (0,16 ns/pF) C
L
5 125 250 ns 98 ns + (0,55 ns/pF) C
L
LOW to HIGH 10 t
PLH
50 100 ns 39 ns + (0,23 ns/pF) C
L
15 40 80 ns 32 ns + (0,16 ns/pF) C
L
MR O
1
to O
9
5 115 230 ns 88 ns + (0,55 ns/pF) C
L
HIGH to LOW 10 t
PHL
50 100 ns 39 ns + (0,23 ns/pF) C
L
15 35 70 ns 27 ns + (0,16 ns/pF) C
L
MR O
5-9
5 110 220 ns 83 ns + (0,55 ns/pF) C
L
LOW to HIGH 10 t
PLH
45 90 ns 34 ns + (0,23 ns/pF) C
L
15 35 70 ns 27 ns + (0,16 ns/pF) C
L
MR O
0
5 130 260 ns 103 ns + (0,55 ns/pF) C
L
LOW to HIGH 10 t
PLH
55 105 ns 44 ns + (0,23 ns/pF) C
L
15 40 75 ns 32 ns + (0,16 ns/pF) C
L
January 1995 5
Philips Semiconductors Product specication
5-stage Johnson counter
HEF4017B
MSI
AC CHARACTERISTICS
V
SS
= 0 V; T
amb
= 25 C; C
L
= 50 pF; input transition times 20 ns
Output transition
times 5 60 120 ns 10 ns + (1,0 ns/pF) C
L
HIGH to LOW 10 t
THL
30 60 ns 9 ns + (0,42 ns/pF) C
L
15 20 40 ns 6 ns + (0,28 ns/pF) C
L
5 60 120 ns 10 ns + (1,0 ns/pF) C
L
LOW to HIGH 10 t
TLH
30 60 ns 9 ns + (0,42 ns/pF) C
L
15 20 40 ns 6 ns + (0,28 ns/pF) C
L
V
DD
V
SYMBOL MIN. TYP. MAX.
Hold times 5 90 45 ns
CP
0
CP
1
10 t
hold
40 20 ns
15 20 10 ns
5 80 40 ns
CP
1
CP
0
10 t
hold
40 20 ns
15 30 10 ns
Minimum clock
pulse width: 5
t
WCPL
=
t
WCPH
80 40 ns
CP
0
= LOW; 10 40 20 ns see also waveforms
CP
1
= HIGH 15 30 15 ns Figs 4 and 5
Minimum MR 5 50 25 ns
pulse width; HIGH 10 t
WMRH
30 15 ns
15 20 10 ns
Recovery time 5 60 30 ns
for MR 10 t
RMR
30 15 ns
15 20 10 ns
Maximum clock 5 6 12 MHz
pulse frequency 10 f
max
12 24 MHz
15 15 30 MHz
V
DD
V
TYPICAL FORMULA FOR P (W)
Dynamic power 5 500 f
i
+ (f
o
C
L
) V
DD
2
where
dissipation per 10 2200 f
i
+ (f
o
C
L
) V
DD
2
f
i
= input freq. (MHz)
package (P) 15 6000 f
i
+ (f
o
C
L
) V
DD
2
f
o
= output freq. (MHz)
C
L
= load cap. (pF)
(f
o
C
L
) = sum of outputs
V
DD
= supply voltage (V)
V
DD
V
SYMBOL MIN. TYP. MAX.
TYPICAL EXTRAPOLATION
FORMULA
January 1995 6
Philips Semiconductors Product specication
5-stage Johnson counter
HEF4017B
MSI
Fig.4 Waveforms showing hold times for CP
0
to CP
1
and CP
1
to CP
0
. Hold times are shown as positive values,
but may be specified as negative values.
Fig.5 Waveforms showing recovery time for MR; minimum CP
0
and MR pulse widths.
Conditions: CP
1
= LOW while CP
0
is triggered on a LOW to HIGH transition. t
WCP
and
t
RMR
also apply when CP
0
= HIGH and CP
1
is triggered on a HIGH to LOW transition.
January 1995 7
Philips Semiconductors Product specication
5-stage Johnson counter
HEF4017B
MSI
Fig.6 Timing diagram.
January 1995 8
Philips Semiconductors Product specication
5-stage Johnson counter
HEF4017B
MSI
APPLICATION INFORMATION
Some examples of applications for the HEF4017B are:
Decade counter with decimal decoding
1 out of n decoding counter (when cascaded)
Sequential controller
Timer.
Figure 7 shows a technique for extending the number of decoded output states for the HEF4017B. Decoded outputs are
sequential within each stage and from stage to stage, with no dead time (except propagation delay).
Note
It is essential not to enable the counter on CP
1
when CP
0
is HIGH, or on CP
0
when CP
1
is LOW, as the this would cause
an extra count.
Fig.7 Counter expansion.

You might also like