original project

59
ACKNOWLEDGEMENT My profound gratitude goes to my parents Mr and Mrs ………… for their invaluable contribution to my educational pursuit and every others sector of life. My warm regards goes to my elder brother, ---------. for his support and various suggestions during the writing of this project, and to my younger siblings, Eunice and Prosper for their love and understanding. I also want to appreciate the efforts of my friends and well wishers who in one way or the other contributed to my happiness and sustenance during my stay in school. To my supervisor, Engr……………….. for his instructions, my lecturers; Engr……., Engr…………….., Engr................, Engr........... for their numerous teachings and impartation in my life, while an undergraduate. And not forgetting Engr Jude Ogbunachi of Daystar Electronix Consort for providing me with some of the materials needed for the write up of this project and for his coaching. Thanks to you all.

Upload: stephen-achionye

Post on 20-Jan-2017

42 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: ORIGINAL PROJECT

ACKNOWLEDGEMENT

My profound gratitude goes to my parents Mr and Mrs ………… for their invaluable contribution to my educational pursuit and every others sector of life.

My warm regards goes to my elder brother, ---------. for his support and various suggestions during the writing of this project, and to my younger siblings, Eunice and Prosper for their love and understanding.

I also want to appreciate the efforts of my friends and well wishers who in one way or the other contributed to my happiness and sustenance during my stay in school.

To my supervisor, Engr……………….. for his instructions, my lecturers; Engr……., Engr…………….., Engr................, Engr........... for their numerous teachings and impartation in my life, while an undergraduate.

And not forgetting Engr Jude Ogbunachi of Daystar Electronix Consort for providing me with some of the materials needed for the write up of this project and for his coaching.

Thanks to you all.

Page 2: ORIGINAL PROJECT

ABSTRACT

This project focuses on the design and construction of a micro controller based moving message display. However, since the dot matrix technology is inevitably the underlying principle of the display system, much attention is focused on it and emphasis is centered on its streaming effect which employs the scanning method of displaying information under the hard wired system using the dot matrix arrangement of light emitting diodes in rows and columns. These light emitting diodes which form a hardware part of the system, provide a suitable way of displaying the information, radiating light in a specific color (red). The hard ware structure is interfaced with a programmed microcontroller in order to achieve the desired information.

Page 3: ORIGINAL PROJECT

CHAPTER ONE

INTRODUCTION

1.1 BRIEF OVER VIEW

Recently there has been major advancement in technology. Thee advancement have

spurred to virtually every sector of life. The advertisement industry is no exclusion.

Today sign boards and even bill boards have been gradually replaced by electronic

displays which are more attention catching and flexible.

The moving message display is an electronic system which uses a series of LEDs (light

emitting diodes) to display messages in a moving pattern. Generally, such messages were

scrolled so that they move either from the left to right or vice versa.

However, the LEDs cannot do that alone, thus for full functionality of the moving display

system, the LEDs are connected to either computer or micro – controller which is the

major brain behind the formation and movement of message letter or figures. Moreover,

the computer or micro – controller needs the aid of line decoders, crystal oscillators, semi

conductors components such as transistors, resistors and switches and the power supply

unit for proper implementation.

In this work, I shall be focusing in the design and construction of a moving message

which will display 5 characters at a time, each consisting of 5 x 7 LEDs.

The messages display system will then display the message, “WELCOME TO

ELECTRICAL/ ELECTRONICS ENGINEERING DEPARTMENT OF MICHEAL

OKPARA UNIVERSITY OF AGRICULTURE….. DESIGNED BY KINGSLEY”

1.2 AIMS AND OBJECTIVE

The aims and objectives of these projects are as follows:

Page 4: ORIGINAL PROJECT

To realize an electronic display system which has some level of flexibility in its

operations that is erasing and re – programming the content stored in the memory

to vary the display output is possible.

To implement in system, whose materials and components used in the design of

the hardware are sample and cheap and easily available in the local market, thus

making the whole system to be simple or design and reducing cost.

To implement open module architecture that can be easily upgraded to suit the

specification of producers and manufacturers.

To make a system operations more appreciable by making the system re –

programmable.

To employ dot matrix arrangement on the display unit so as to allow ease in

expansion of both width and length of the display board.

To design a system which has human – machine inter – face in the operations,

completing transparent and applicable to end – users

1.3 STATEMENT OF PROBLEM

Despite the previous efforts and methods in building moving message displays, development problems still exist in the realization of ideal electronic displays that is one that possesses the qualities such as high intensity, contrast, response, resolution, full color, large capacity, flat form, light weight, low power consumption, low cost and life time reliability.

In time past, electronic moving message displays were achieved electromagnetically by the use of relays and these led to a lot of problems with high cost of materials, flexibility in the way information were presented.

Due to these, I decided to design a project that overcame the above mentioned limitations.

Page 5: ORIGINAL PROJECT

1.4 WORK ORGANIZATIONThis work presents the design and construction of a re-programmable electronic moving message display system using dot matrix arrangements of LEDs. This is presented through hard wiring which gives a faster response when arranged in modular configuration, which introduces some level of convenience to the designer. Chapter one discusses the background information of micro re-programmable digital display. Chapter two tells the literature review, chapter three describes the design and methodology, discusses the system software. Chapter five is the concluding chapter which also proffers future recommendations.

Page 6: ORIGINAL PROJECT

CHAPTER TWO

LITERATURE REVIEW

2.1 HISTORY OF MOVING MESSAGE DISPLAY SYSTEM

The advent of MMDSs began in the entry twentieth century by countries like the United

State of America, Germany, Japan and Soviet Union, but huge successes did not

materialize till the 1920s. Still a major problem encountered was how to produce less

bulky MMDSs, However in the 1950s, with the advent of integrated circuit, switches and

large scale integration lower voltage and power consumption, coupled with reduction in

size and weight was achieved.

This contribution to the full construction and usage of MMDS began in the 1960s. AS a

result, there were higher demands for MMDSs in the commercial industry, domestic,

sporting and aesthetic sectors. At this time, passive display technology for liquid crystal

displays (LCDs) and electrochemical display (ECDs) arose at approximately the same

time and active displays for the vacuum florescent display (VFD) and the light emitting

diode (LED) were first implemented for small capacity MMDS.

Series of researches followed as Wolf wt al in 1954, implemented that observation of

Gallium phosphate (Gal) lighting emitting phenomena and the injection

electroluminescence effect of Gallium Arserdie Phosphide (Ga Ar P) red LED in 1968

subsequently colours of LED were introduced, these include orange, yellow and green

types. In the early 1970s, however, the use of programmable dot matrices LCDs or LEDs

were made possible. These could be implemented with the use of keyboard.

Today, the advanced electronic message display system can present multiple view and

objects that have realistic motions.

2.2 SCOPE OF WORK

The scope of this project is to design moving message display system of the type

commonly used in shop windows, airports, fast food venues and other public buildings

Page 7: ORIGINAL PROJECT

The display will be required to be able to scroll a message of at least 300

characters from right to left, with at least five characters on screen at any instant

A dot matrix style of LED display will be used that is capable of displaying the

ASCII character set

To achieve a moving message display with these features: single color, one brightness level, 7.5 cm by 4.5 cm character size, 5 by 7 dot-matrix module, 1 LED per pixel.

Other display features (such as flashing) will not be added, since it would be

extremely difficult to add these using ordinary logic ICs

2.3 SOFTWARE CONTROLLED MESSAGE DISPLAY SYSTEM

This kind of display system uses a computer to control the nature and movement of messages. There is no need for a microcontroller since the control basically comes from the computer’s microprocessor, which has powerful processing powerful capability. The message system is controlled with the aid of application software that drives it.

The message board is usually connected to the computer with the aid of a serial or parallel interface. This interface could be a virtual or physical link between the computer and its peripherals through which compatibility is achieved.

2.4 MICRO-CONTROLLER BASED MESSAGE DISPLAY SYSTEM

In this kind of display system, a micro-controller is used to control the display of messages on the dot-matrix LEDs which it is interfaced with. They are usually costumed made or designed to carry about the logic needed to generate required lighting sequences and output them to the display. The logic is usually available as a firmware in the Erasable Programmable Read Only Memory (EPROM), which is then interfaced to the appropriate display.Advantages of a micro controller based display system include: greater flexibility, ability to implement very complex logic at no extra hardware cost ability to receive inputs dynamically and displays them. Cheap, memory can be erased and reprogrammed.

This is the method employed in this project, the versatility was adequately employed.

2.5 COMPONENTS AND FEATURES

List of components part Quantity

Page 8: ORIGINAL PROJECT

Resistors

R1 1

R2 1

R3.1 – 8 8

CAPACITORS

C1 1

C2 1

C3 1

C4 1

TRANSISTORS

T1 – 8 8

LEDs 210

DECODER

DEC 74138 8

MICRO – CONTROLLER

AT89C51 Micro – controller 1

RESISTORS

A resistor is a two terminal electronic component that produces a voltage across its terminals that is proportional to the electric current passing through it in accordance to ohms law.

TRANSISTOR

This is a semi – conductor device commonly used to accomplish or switch electronic signals. A voltage or current applied to one pair of the transistor’s terminals changes the current following through another pair of terminals changes the current following through another pair of terminal. The transistor provides an amplification of signal.

LIGHT EMITTING DIODES (LEDs)

LEDs from the numbers on digital clock transmission from remote controls, light up

watches, etc. They are tiny bulbs, but unlike ordinary incandescent bulb, they don’t

Page 9: ORIGINAL PROJECT

filament that will burn off and they don’t get hot. They are illuminated solely by the

movement of electron in a semi – conductor material and they last just as long as a

standard transistor.

LINE DECODERS

Decoders are collection of logical gates, which are arranged in a specific way so as to break down any combination of inputs to a set of terms that are all set to 0 apart from 1 term.

MICR-CONTROLLER

This is a single programmable chip that is designed to control circuits that are interfaced with it. They usually consist of ports and other activation pins having specific functions. There are of various families including the 8086, 8088, 8951 series.

CHAPTER THREE

DESIGN METHODOLOGY AND ANALYSIS

Page 10: ORIGINAL PROJECT

MICROCONTROLLER

LINEDECODERS

DISPLAYUNIT

CRYSTALOSCILLATOR

3.1 INTRODUCTION

This project is designed so as to realize an efficient, maintainable, and most importantly, affordable electronic re-programmable display system using dot matrix technology. The moving message display system is designed in modules, which involves the techniques of modularity. For simplicity, the suitability and compatibility of a stage to conform to the changing circuit parameters in other stages were considered. Another important step taken was early identification of hazards and the development of appropriate steps to isolate and control them in the design phase. The different section/modules that make up the whole system are shown below.

Block diagram of a Micro programmable moving message display system showing

its principle of operation.

3.2 THE POWER SUPPLY UNIT

The power supply unit is a system that supplies electrical or other types of energy to an

output or group of loads.

POWERSUPPLYUNIT

Page 11: ORIGINAL PROJECT

TRANSFORMER RECTIFIER FILTER REGULATOR

The power supply unit is a system that supplies voltage to all parts of a circuitry. There

are basically two main types of power supplies – linear power supply and switched mode

power supply.

In this project, the linear power supply was used principally the linear power supply

consists of four sections. Complete implementation. They include:

1. Transformation

2. Rectification

3. Filtration

4. Regulation

A typical block diagram of the linear power supply unit is as shown below.

Block diagram of the power supply unit

THE TRANSFORMER

In this project, a 240/12V, 500MA based transformer is used based on the fact that the

means supply is rated at 240V and the actual voltage required by the circuit components

(micro – controller, line decoder LEDs etc.) is a regulated 5V

Page 12: ORIGINAL PROJECT

However, a 7805 regulator is used which required a minimum of 8V. The back drop

voltage from the regulator is 1.4v given a total of 9.4V. The 12V transformers are

available. A current of 500mA is sufficient to drive all the circuit components.

THE RECTIFIER

A rectifier is an electrical device that converts alternating current (AC) to direct current

(DC), a process known as rectificatioin.

Rectification can either be half wave or full wave.

Half – Wave Rectification

In half – wave rectification, either the positive or negative half of the AC wave is passed,

while the half of the other is blocked.

Full – Wave Rectification

A full wave rectifier converts the whole of the input form if the inputs wave form to

constant polarity at its output.

In this project, full wave bridge rectifier is used because it provides a better efficiency

compared to half wave and bridge rectifier, because the transformer used not center

tapped.

FILTER

Filters are electronic circuit which perform signal processing functions, specifically to

remove unwanted frequency component from the signal to enhance wanted ones or both.

They consists of a capacitor connected across the rectified output for the purpose of

smoothening out the unwanted ripple in the output. The capacitors basically store charges

temporarily and the stored charges are measured in farad, micro – farad and pico – farad.

The Regulator

Page 13: ORIGINAL PROJECT

A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. It may use an electromechanical mechanism, or passive or active electronic component. Depending on the design, it may be used to regulate one or more AC or DC voltages.

The voltage regulator used in this project is 78HC05 integrated circuit. It has three terminals and is capable of supplying 5+ 10% at 100Ma

]

1 3

2

Circuit symbol of a voltage regulator with pin out indicator

Terminal 1 serves as the input. 2 serves as ground and 3 as the input terminal.The 7805 used takes 12V from the transformer and gives output of 5V± 0.2%.

Power Indicator

Diode D5 is a light emitting diode used as power on indicator. This glows once power is on. Resistor R1 is a circuit-limiting resistor, which helps to limit the amount of current flowing through the diode D5.

The value of the limiting resistor is gotten by the expression.

Resistor R1 = (Vdc – Vd) Imax

Where: Vdc = the calculated dc voltage which is given byVdc = Vac √2 = 12* √2Vdc = 16.97

U 1

78105

Page 14: ORIGINAL PROJECT

Vd = Diode voltage drop = 1.7V

I2 = Maximum circuit rating of the LED (D5) = 20Ma

Value of the limiting resistor becomes

R1 = 16.07 - 1.7 20 * 10

R1 = 763.5Ω

Therefore for safety reasons, a value of 1000Ω or 1KΩ which is a little higher than 763.5Ω is used to take care of inconsistencies.

3.3 THE CONTROL UNIT

The control unit is made up of a single micro controller chip that can execute a user program, normally for the purpose of controlling the device; the transistors serve as switches and the line decoders.

ATMEI 8951

The ATMEI 8951 is a single chip micro-controller that has random access memory (RAM) and read only memory (ROM). It has instruction set and is compatible with any other MC51 controller family.

The RAM (Random Access Memory) – This consists of 128 byte arranged as four register bank, each containing 8 registers given the label R0 to R7.

The ROM (Read Only Memory) – The 8951 has 4K bytes ROM. This portion of the 8951 is made available for the storage of program written by the system designer. The operation of the 8951 depends on the program. Serial Communication Ports/Pin Configuration- The 8951 micro-controller is a 40 pin IC with basically four communication ports with pin 20 and 40 as ground and voltage supply respectively. The four communication ports are ports are port 0, port 1, port 2 and port 3. This is illustrated in the fig below.

Page 15: ORIGINAL PROJECT

Diagram of 8951

ALE/PROG: Address latch enable output pulse latching the low byte of the address

during accessory to external memory. ALE is emitted at a constant rate of 1/6 of the

oscillator frequency for external timing or clocking purposes even when there are no

accesses to external memory. This pin is also the program pulse input (PROG) during

EPROM programming.

PSEN: Program store Enable is the read strobe to external program memory. When the

device is executing out of external program memory, PSEN is activated twice each

machine cycle (except that two PSEN activation are skipped during access to external

Data Memory). PSEN is not activated when the device is executing out the internal

program memory.

EA/VPP: When EA is held high, the CPU executes out of external program memory.

Holding EA low forces the CPU to execute out of external memory regardless of the

program counter value.

XTAL1: Input to the inventing oscillator amplifier

XTAL2: Output from the inverting oscillator.

Page 16: ORIGINAL PROJECT

PORT 6: Port is an 8 bit drawn bi – directional port. As as open drawn output port, it can

sink eight LS TTL loads. Port ) pins that have 1s written to them float and in that state

will function as high impedance inputs. Ports 0 is also the multi plexed lower – order and

data bus during access program and data memory.

PORT 1: Port 1 is also 8 bit bi – directional I/O port with internal pull – ups. The port 1

output buffers can drive TTL inputs. Port 1 pins that have 1s written to them are pulled

high by the internal pull – ups, and in that state can be used as inputs, ports 1 pins that are

externally being pulled low will source current because of the internal pull – ups.

PORT 2: Port 2 is an 8 bit bi – directional I/O port with pull – ups. Port 2 emits the high

order address byte during accesses to external memory that use 16 bit addresses.

PORT 3: Port 3 is an 8 bit bi – directional I/O port with internal pull ups.

VCC: Supply voltage

VSS: Circuit grounded potential

LINE DECODERS

Binary Decoder

It is basically, a combinational type logic circuit that converts the binary code data at its input into one of a number of different output lines, one at a time producing an equivalent decimal code at its output. Binary Decoders have inputs of 2-bit, 3-bit or 4-bit codes depending upon the number of data input lines, and a n-bit decoder has 2n output lines. Therefore, if it receives n inputs (usually grouped as a binary or Boolean number) it activates one and only one of its 2n outputs based on that input with all other outputs deactivated. A decoder’s output code normally has more bits than its input code and practical binary decoder circuits include 2-to-4, 3-to-8 and 4-to-16 line configurations.

A binary decoder converts coded inputs into coded outputs, where the input and output codes are different and decoders are available to "decode" either a Binary or BCD (8421 code) input pattern to typically a Decimal output code. Commonly available BCD-to-Decimal decoders include the TTL 7442 or the CMOS 4028. An example of a 2-to-4 line decoder along with its truth table is given below. It consists of an array of four NAND gates, one of which is selected for each combination of the input signals A and B.

Page 17: ORIGINAL PROJECT

2-to-4 Binary Decoders

A binary decoder converts coded inputs into coded outputs, where the input and output codes are different and decoders are available to "decode" either a Binary or BCD (8421 code) input pattern to typically a Decimal output code. Commonly available BCD-to-Decimal decoders include the TTL 7442 or the CMOS 4028. An example of a 2-to-4 line decoder along with its truth table is given below. It consists of an array of four NAND gates, one of which is selected for each combination of the input signals A and B.

2-to-4 Binary Decoders

In this simple example of a 2-to-4 line binary decoder, the binary inputs A and B determine which output line from D0 to D3 is "HIGH" at logic level "1" while the remaining outputs are held "LOW" at logic "0" so only one output can be active (HIGH) at any one time. Therefore, whichever output line is "HIGH" identifies the binary code present at the input, in other words it "de-codes" the binary input and these types of binary decoders are commonly used as Address Decoders in microprocessor memory applications.

Some binary decoders have an additional input labelled "Enable" that controls the outputs from the device. This allows the decoders outputs to be turned "ON" or "OFF" and we can see that the logic diagram of the basic decoder is identical to that of the basic demultiplexer. Therefore, we say that a demultiplexer is a decoder with an additional data line that is used to enable the decoder. An alternative way of looking at the decoder

Page 18: ORIGINAL PROJECT

circuit is to regard inputs A, B and C as address signals. Each combination of A, B or C defines a unique address which can access a location having that address.

In this simple example of a 2-to-4 line binary decoder, the binary inputs A and B determine which output line from D0 to D3 is "HIGH" at logic level "1" while the remaining outputs are held "LOW" at logic "0" so only one output can be active (HIGH) at any one time. Therefore, whichever output line is "HIGH" identifies the binary code present at the input, in other words it "de-codes" the binary input and these types of binary decoders are commonly used as Address Decoders in microprocessor memory applications.

Some binary decoders have an additional input labelled "Enable" that controls the outputs from the device. This allows the decoders outputs to be turned "ON" or "OFF" and we can see that the logic diagram of the basic decoder is identical to that of the basic demultiplexer. Therefore, we say that a demultiplexer is a decoder with an additional data line that is used to enable the decoder. An alternative way of looking at the decoder circuit is to regard inputs A, B and C as address signals. Each combination of A, B or C defines a unique address which can access a location having that address.

Sometimes it is required to have a Binary Decoder with a number of outputs greater than is available, or if we only have small devices available, we can combine multiple decoders together to form larger decoder networks as shown. Here a much larger 4-to-16 line binary decoder has been implemented using two smaller 3-to-8 decoders.

4-to-16 Binary Decoder ConfigurationInputs A, B, C are used to select which output on either decoder will be at logic "1" (HIGH) and input D is used with the enable input to select which encoder either the first or second will output the "1".

Page 19: ORIGINAL PROJECT

Binary Decoders are most often used in more complex digital systems to access a particular memory location based on an "address" produced by a computing device. In modern microprocessor systems the amount of memory required can be quite high and is generally more than one single memory chip alone. One method of overcoming this problem is to connect lots of individual memory chips together and to read the data on a common "Data Bus". In order to prevent the data being "read" from each memory chip at the same time, each memory chip is selected individually one at time and this process is known as Address Decoding.

In this application, the address represents the coded data input, and the outputs are the particular memory element select signals. Each memory chip has an input called Chip Select or CS which is used by the MCU to select the appropriate memory chip and a logic "1" on this input selects the device and a logic "0" on the input de-selects it. By selecting or de-selecting each chip, allows us to select the correct memory device for a particular address and when we specify a particular memory address, the corresponding memory location exists ONLY in one of the chips.

In this project the work of 74ls138 is working as a master for chip selection its input is come from microcontroller and its output is used for chip selection its output is active low so as a low signal is applied on the 18 or 19 pin of 4*16 decoder it activated and get start working. When a port 1 value is 16 then first 74ls154 is disabled and other is enabled.

Page 20: ORIGINAL PROJECT

Here A0, A1, A2 and A3 are the inputs of the 74ls154. Its output is active low .E0 and E1 are two inputs for enabling the ic. I ground a pin 19 and pin 18 is controlled by the 74ls138 to enable it at a specific time. It should not be on at every time.

The 74138 line decoder is a high performance memory decoding or data-routing IC that requires a very short propagation delay times. The 74138 decodes one of the seven lines depending on the conditions at the three binary SELECT INPUTS and the three ENABLE INPUTS.

3.5 FORMATION OF CHARACTER FONT ON THE DISPLAY

Page 21: ORIGINAL PROJECT

Use of fonts.exeThis exe files can be used to generate a 7*5 (7 rows*5 column) fonts size pattern in hardware..In the above diagram row 6,7 and 8 has code 00h mean no display by using 8*8 just one 00h is used if use three 00h the gap is seems too much between two characters.Below is the screen shot of fonts.exe that how I use it, it has many formats and option to do as I check three boxes and then generate a font’s pattern code.

Page 22: ORIGINAL PROJECT

Dot matrix internal structure:

In the above diagram rows are supplied by 5 volt and ground provided at column then led glow.I am using the same pieces it is called common cathode configuration.

3.6 CONSTRUCTION AND OPERATION

Page 23: ORIGINAL PROJECT

3.3.1 CONSTRUCTION

The construction of the moving message display system was don in such a way that connections followed the circuit diagram. The LEDs were connected anode to anode and cathode to cathode in a 7 by 25 format so that the system can display 5 characters at a time, each comprising of 7 by 5 LEDs. Thus each letter is typified with 7 LEDs on the vertical axis and 5 LEDs on the horizontal axis.

The connection of LEDs is interfaced with the micro controller and four line decoders which control the display and movement of messages.The system’s internal circuit is connected in such a way that every unit except the transformer is mounted on the same circuit board. This was done to minimize the weight of the message display system. The casing is 2.5 ft by 6 ft. and a total number of 210 LEDs were used in order to display five letters at a time. A reddish translucent glass was used in order to make the display visible and attractive.

3.3.2 OPERATION

Page 24: ORIGINAL PROJECT

When the system is powered on, the powered supply unit provides the voltage (5V)

necessary to power the micro controller, the LEDs and other circuit element. The micro –

controller receives 5V from pin 1 with pin 20 grounded, begins to execute programmes

from its internal memory. As a result of this, data signals are sent from the micro –

controller port 1 to the input pins of the eight line decoders and clock signals are sent to

their clock input pin from port of the micro – controller. At the same time, base biased

signals are sent to the bases of the transistors from the micro controller’s port 2.

Immediately the line decoder receives the clock signals from micro – controller, the

decoders transfers their data to other output pins, which are connected to the cathode of

the LEDs. Also when the transistors receive their base bias currents from the micro

controller they switch power to the LEDs, since they are wired to the anode of the LED

array. At this time, LED will only grow if its anode is positive with respect to the

cathode. Thus, by controlling the system sent to the decoders and transistors, the micro –

controller controls LED which needs to be on/off for the device to achieve the display.

Page 25: ORIGINAL PROJECT

CHAPTER FOUR4.1 SYSTEM SOFTWARE

Micro- controllers Program

In this project, the program used is assembly language. Assembly language is a low key programming language that makes use of mnemonics or symbols to program the computer. This makes the assembly language user-friendly, since it is easier for a user to remember programming symbols which are far easier than complex machine codes. However, it employs a utility program that translates its symbols into a form that is readable by the computer’s machine. The assembly language is usually employed in the programming of computers, microprocessors, microcontrollers and even integrated circuits. They implement a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture.

The utility program called the assembler is used translate assembly language into the target computer machine code. In this project however, the assembler used is the A51 Macro Assembler.

4.2 A51 MACRO ASSEMBLER

The A51 assembler is an Intel ASM51-compatible macro assembler for the 8051 family of microcontrollers. The A51 assembler translates symbolic assembly language mnemonics into relocatable object code where utmost speed, small code size, and hardware control are critical. The macro facility speeds development and conserves maintenance time, because common sequences need be developed only once. The assembler supports symbolic access to all features of the 8051 and is configurable for each 8051 derivative.

The A51 assembler translates an assembler source file into a relocatable object module. If the DEBUG control is used, or if the “Include debugging information” option is checked, this object file will contain full symbolic information for debugging with the WinSim-51 debugger/simulator or an in-circuit emulator. The A51 assembler generates a list file, optionally with symbol table and cross references. The A51 assembler is fully compatible with Intel ASM51 assembly programs.

4.3 Assembling with A51

This chapter explains how to use the A51 assembler to assemble 8051 assembly source files and discusses the assembler controls that you may specify on the command line and within the source file.

Using the controls described in this chapter, you can specify which operations are performed by A51. For example, you may direct the A51 assembler to: generate a listing

Page 26: ORIGINAL PROJECT

file, produce cross reference information, and control the amount of information included in the object file. You may also conditionally assemble sections of code using the conditional assembly controls.

Running the Assembler

First the ASSEMBLER is invoked by selecting TRANSLATE, MAKE, or BUILD ALL from the Project menu in preview. The TRANSLATE command will assemble only the source file that is selected in the project window. The MAKE command will compile and link all changed files in the project. The BUILD ALL command will compile, assemble and link all of the files in the project.

To invoke the Assembler, you enter A51 at the DOS prompt. The command line must contain the name of the 8051 assembly source file to be assembled as well as any required command-line controls. The format for the A51 assembler command line is:

A51 sourcefile controls…

where sourcefile is the name of the source program you want to assemble. The A51 assembler controls are used to direct the operation of the assembler. Refer to the “Assembler Controls” section later in this chapter for more information.

SYSTEM PROGRAM

org 00hcall gap

call shiftcall shiftcall shift

call shift call shift

call shiftstart: call capw

call shiftcall capecall shiftcall caplcall shiftcall capccall shiftcall capocall shiftcall capmcall shiftcall capecall shiftcall gap

Page 27: ORIGINAL PROJECT

call shift call capt

call shift call capo call shift call gap call shift

call capdcall shiftcall capecall shiftcall cappcall shiftcall captcall shiftcall gapcall shiftcall capocall shiftcall capfcall shiftcall gap

call shift call capc call shift call capo call shift call capm call shift call capp call shift call capu call shift call capt call shift call cape call shift call capr call shift

call gapcall shift

call cape call shift call capn call shift

call capg

Page 28: ORIGINAL PROJECT

call shiftcall capicall shiftcall capncall shiftcall capecall shiftcall shiftcall caprcall shiftcall capicall shiftcall capncall shiftcall capgcall shift

call gap call shift

call shiftcall shiftcall shiftcall shiftcall capmcall shiftgren

call capi call shiftgren call capc call shiftgren call caph call shiftgren call capa call shiftgren call cape call shiftgren

call caplcall shiftgrencall gapcall shiftgrencall capocall shiftgrencall capkcall shiftgrencall cappcall shiftgrencall capacall shiftgren

Page 29: ORIGINAL PROJECT

call caprcall shiftgrencall capacall shiftgrencall gapcall shiftgrencall capucall shiftgrencall capncall shiftgrencall capicall shiftgrencall capvcall shiftgrencall capecall shiftgrencall caprcall shiftgrencall capscall shiftgrencall capicall shiftgrencall captcall shiftgren

call capycall shiftgrencall gapcall shiftgrencall capocall shiftgrencall capfcall shiftgrencall gapcall shiftgrencall capacall shiftgrencall capgcall shiftgrencall caprcall shiftgrencall capicall shiftgrencall capccall shiftgrencall capucall shiftgren

Page 30: ORIGINAL PROJECT

call caplcall shiftgrencall captcall shiftgrencall capucall shiftgrencall caprcall shiftgrencall capecall shiftgrencall gapcall shiftgrencall capucall shiftgrencall capmcall shiftgrencall capucall shiftgrencall capdcall shiftgrencall capicall shiftgrencall capkcall shiftgrencall capecall shiftgrencall gap

call shiftgrencall shiftgrencall shiftgren

call shiftgren call shiftgren

call shiftgrenjmp start

shift:mov 60,48call scrollmov 60,49call scrollmov 60,50call scrollmov 60,51call scrollmov 60,52call scrollmov 60,#00h

Page 31: ORIGINAL PROJECT

call scrollret

scroll:mov 90,89mov 89,88mov 88,87mov 87,86mov 86,85mov 85,84mov 84,83mov 83,82mov 82,81mov 81,80mov 80,79mov 79,78mov 78,77mov 77,76mov 76,75mov 75,74mov 74,73mov 73,72mov 72,71mov 71,70mov 70,69mov 69,68mov 68,67mov 67,66mov 66,65mov 65,64mov 64,63mov 63,62mov 62,61mov 61,60call shiftdelayret

shiftdelay:call screencall screencall screenret

screen:mov p1,61mov p3,#0call leddelaymov p1,62mov p3,#1call leddelay

Page 32: ORIGINAL PROJECT

mov p1,63mov p3,#2call leddelaymov p1,64mov p3,#3call leddelaymov p1,65mov p3,#4call leddelaymov p1,66mov p3,#5call leddelaymov p1,67mov p3,#6call leddelaymov p1,68mov p3,#7call leddelaymov p1,69mov p3,#8call leddelaymov p1,70mov p3,#9call leddelaymov p1,71mov p3,#10call leddelaymov p1,72mov p3,#11call leddelaymov p1,73mov p3,#12call leddelaymov p1,74mov p3,#13call leddelaymov p1,75mov p3,#14call leddelaymov p1,76mov p3,#15call leddelaymov p1,77mov p3,#16call leddelaymov p1,78

Page 33: ORIGINAL PROJECT

mov p3,#17call leddelaymov p1,79mov p3,#18call leddelaymov p1,80mov p3,#19call leddelaymov p1,81mov p3,#20call leddelaymov p1,82mov p3,#21call leddelaymov p1,83mov p3,#22call leddelaymov p1,84mov p3,#23call leddelaymov p1,85mov p3,#24call leddelaymov p1,86mov p3,#25call leddelaymov p1,87mov p3,#26call leddelaymov p1,88mov p3,#27call leddelaymov p1,89mov p3,#28call leddelaymov p1,90mov p3,#29call leddelayret

leddelay:mov 40,#04h scdelaya:mov 41,#9fh scdelayb:nop djnz 41,scdelayb djnz 40,scdelaya

Page 34: ORIGINAL PROJECT

ret

num1:MOV 48,#00H MOV 49,#0c2h MOV 50,#0ffH MOV 51,#0c0H MOV 52,#00H ret num2:MOV 48,#0c2H MOV 49,#0e1H MOV 50,#0d1H MOV 51,#0c9H MOV 52,#0c6H ret num3:MOV 48,#0c9H MOV 49,#0c9H MOV 50,#0c9H MOV 51,#0c9H MOV 52,#0b6H ret num4:MOV 48,#18H MOV 49,#14h MOV 50,#12H MOV 51,#7fH MOV 52,#10H ret

num5:MOV 48,#0cfH MOV 49,#0c9h MOV 50,#0c9H MOV 51,#0c9H MOV 52,#0b1H ret num6:MOV 48,#0beH MOV 49,#0c9H MOV 50,#0c9H MOV 51,#0c9H MOV 52,#0baH ret num7:MOV 48,#81H

Page 35: ORIGINAL PROJECT

MOV 49,#0f1H MOV 50,#89H MOV 51,#85H MOV 52,#83H ret num8:MOV 48,#0b6H MOV 49,#0c9h MOV 50,#0c9H MOV 51,#0c9H MOV 52,#0b6h retnum9:MOV 48,#0a6H MOV 49,#0c9h MOV 50,#0c9H MOV 51,#0c9H MOV 52,#0beH ret

cap?:mov 48,#02h mov 49,#01h mov 50,#51h mov 51,#09h mov 52,#06h ret

capb:mov 48,#7fh mov 49,#49h mov 50,#49h mov 51,#49h mov 52,#36h ret

capn:mov 48,#7fh mov 49,#04h mov 50,#08h mov 51,#10h mov 52,#7fh ret

capc:MOV 48,#3eh MOV 49,#41h MOV 50,#41h MOV 51,#41h

Page 36: ORIGINAL PROJECT

MOV 52,#22h ret

capa:mov 48,#7eh mov 49,#09h mov 50,#09h mov 51,#09h mov 52,#7eh retcapf:mov 48,#7fh mov 49,#09h mov 50,#09h mov 51,#09h mov 52,#09h ret capg:MOV 48,#3eh MOV 49,#41h MOV 50,#49h MOV 51,#49h MOV 52,#3ah ret capH:mov 48,#7fh mov 49,#08h mov 50,#08h mov 51,#08h mov 52,#7fh ret capi:MOV 48,#00h MOV 49,#41h MOV 50,#7fH MOV 51,#41h MOV 52,#00H ret capj:MOV 48,#31h MOV 49,#41h MOV 50,#41h MOV 51,#41h MOV 52,#3fh ret capk:mov 48,#7fh mov 49,#08h mov 50,#08h mov 51,#14h

Page 37: ORIGINAL PROJECT

mov 52,#63h ret capl:MOV 48,#7fh MOV 49,#40h MOV 50,#40h MOV 51,#40h MOV 52,#40h ret capm:MOV 48,#7fh MOV 49,#02h MOV 50,#0ch MOV 51,#02h MOV 52,#7fh ret capo:MOV 48,#3eh MOV 49,#41h MOV 50,#41h MOV 51,#41h MOV 52,#3eh ret capr:MOV 48,#7fh MOV 49,#09h MOV 50,#09h MOV 51,#09h MOV 52,#76h ret caps:MOV 48,#26h MOV 49,#49h MOV 50,#49h MOV 51,#49h MOV 52,#32h ret capt:MOV 48,#03h MOV 49,#01h MOV 50,#7fh MOV 51,#01h MOV 52,#03h ret capw:mov 48,#7fh mov 49,#20h mov 50,#10h mov 51,#20h mov 52,#7fh ret capy:MOV 48,#03H MOV 49,#04h

Page 38: ORIGINAL PROJECT

MOV 50,#78h MOV 51,#04h MOV 52,#03h ret

capp:mov 48,#7fh mov 49,#09h mov 50,#09h mov 51,#09h mov 52,#06h retcapv:mov 48,#0fh mov 49,#10h mov 50,#60h mov 51,#10h mov 52,#0fh ret capx:mov 48,#63h mov 49,#14h mov 50,#08h mov 51,#14h mov 52,#63h ret

capd:mov 48,#7fh mov 49,#41h mov 50,#41h mov 51,#22h mov 52,#1ch ret capE:mov 48,#7fh mov 49,#49h mov 50,#49h mov 51,#49h mov 52,#49h ret

capu:MOV 48,#3fh MOV 49,#40h MOV 50,#40h MOV 51,#40h MOV 52,#3fh ret

GAP:MOV 48,#00H

Page 39: ORIGINAL PROJECT

MOV 49,#00H MOV 50,#00H MOV 51,#00H MOV 52,#00H ret

end

SYSTEM INTEGRATIONUsually before a system is developed, other subsystems are brought together in such a way as to achieve a singular purpose. In this piece of work, the case is not different. Subsystems were designed and integrated to each other. The hardware and the software are interwoven to realize a desired result. They must be compatible for there to be a smooth protocol or receiving and processing of the information.

TEST PLANTo verify the functionality of various subsystems, a test plan is adopted. Here, we are using a module by module testing plan. This is necessary to ensure the smooth operation of the project work. The plan helps to detect any abnormality should there be any malfunctioning.MODULE BY MODULE TESTING

1. POWER UNIT TESTING: this unit comprises the transformer, bridge rectifier,

filtering capacitor and a voltage regulator. All electronic gadgets use a DC voltage

source. In this work, TTL (Transistor Transistor Logic) was used, hence the need

to use 5Volt source. The regulator 7805 stabilizes the DC voltage to +5V. At the

end of the construction, the test was ok. This unit is very vital in any electronic

circuit in that it supplies the required energy to each module.

2. DEMULTIPLEXERS AND LINE DECODERS

It operates on a principle of causing the output that correspond to the binary input

to go LOW. At each binary input, the output pins respond only if the enable pins

are activated. The line decoders has a tristate capability. Therefore its operation is

dependent on the activation pins and the supply of the binary codes at the input

pins.

3. PROCESSING UNIT TEST

This is tested based on its connection to other subsystems. It is the unit that

establishes control over all other subsystems. The test has to include the software

Page 40: ORIGINAL PROJECT

programs written to drive the hardware. More still, simulation software could be

used to debug the program to verify its workability and compatibility to other

modules.

CONTROL SYSTEM TESTING

The control is provided by a microcontroller based on the software program

burned into it. It is expected to switch each lamp at appropriate time and also

switch them OFF when it is desired. After the design, the software drives the

hardware as expected and is working quite well.

USER MANUAL AND PRECAUTION

It is expected that the user must have read this manual before operating this

system.

Operation procedure:

1. Connect the mains plug to the mains.

2. Switch ON the system

3. Change the direction of the traffic by pressing the appropriate button. Do

not press any if you wish not to change the direction of traffic.

4. Do not open the casing to avoid electric shock. For services, take to a

registered service personnel.

5. Switch OFF the system when it is not in use.

PROBLEMS ENCOUNTERED

In the course of carrying out this project, several problems were encountered

First, sourcing for materials was pretty difficult as most of the circuit elements could not be found in neighboring markets. Traveling out town to get them was the only solution.

Page 41: ORIGINAL PROJECT

Second, during the course of building, some components got damaged. Such damage could be allotted to over-heating during soldering, careless handling, environmental distortions and even incompetence of manufacturing.

Third, due to wrong connection on one occasion, a fault arose, leading to the demand for trouble shooting which was time consuming and stressful.

Fourth, due to my non conversance with this project, a lot of errors where registered in programming which had to be debugged for the program to run accurately.

Page 42: ORIGINAL PROJECT

CHAPTER FIVECONCLUSION AND RECOMMENDATION

5.1 CONCLUSION The digital electronic message display system has been modernized with sophisticated electronic devices, which center on the urgent needs in our advertising industry. They provide various applications in different aspects of our economy such as banks, airports, restaurants, superstores, institutions, entertainment, stock exchange market and directional venue guides.

The light emitting diodes which constitute of the hardware system is mainly used to display alphanumeric characters and symbols in various systems such as digital clocks, microwave ovens, stereo tuners and calculators.

The design of moving massage display systems have a single micro- controller chip which provides 8 kilobytes of flash, 256 of ram, 31 input/output lines, three 16 bit timer counters, six vector two-level interrupt architecture, full duplex serial port, on chip oscillator and clock that provides the necessary control and flexibility of display.

5.2 RECOMMENDATIONSThe design of a micro controller based moving message display system has characters showing five pages at a time. There is a great need for future design and implementations to cater for animations and symbols.

Page 43: ORIGINAL PROJECT

Again, plasma display panels may be used in place of light emitting diodes to accommodate certain areas of our economy that may require large display board for advertisement.

There is significant need for future design to include a universal serial bus of a serial interface that was used for the same purpose.

REFERENCESB. Bahadur, Liquid Crystals: Applications and Uses. London: World Scientific, 1990

Coship. (n.d.) LED Basic Information. [Online]. Available: www.coshipled.com/english/downloads/basic%20concepts.pdf August 8, 2008 [date accessed]

Page 44: ORIGINAL PROJECT

C. Kuhnel, BASCOM Programming of Microcontrollers with Ease. Berlin: Universal-Publishers, 2001.

Focon Engineering. (n.d.) LED Colour Display Matrix Controller. [Online]. Available: www.fuse-network.com/fuse/demonstration/34_35/22918/FL_22918.pdf August 8, 2008 [date accessed]

National Research Council (U.S.). Panel on Impact of Video Viewing on Vision of Workers, Video Displays, Work and Vision. Washington: National Academies Press, 1983. The Decoder. (n.d.). [Online]. Available: http://www.electronics-tutorials.ws/combination/comb_5.html September 2, 2008 [date accessed]

R.K. Jurgen, Automotive Electronics Handbook. New York: McGraw-Hill Professional, 1999

Page 45: ORIGINAL PROJECT

Steven F. Barrett and Daniel J. Pack, Atmel AVR Microcontroller Primer: Programming and Interfacing. London: Morgan & Claypool Publishers, 2007.

Viscomm Solutions. (n.d.). VS-4000 Next Generation LED Flexible Process Control Boards. [Online]. Available: http://chris-hutchings.com/VS4000_LED_Display_Brochure.pdf August 8, 2008 [date accessed]