You are on page 1of 9

Table of content

Acknowledgement Introduction Block diagram Circuit diagram Component used Circuit description Working References

INTERODUCTION
The objective of the project is to provide non-commercial and purely academic insight into microcontroller assembly programming. The over all goal of the project is to provide connectivity between a desktop computer, microcontroller and a HD44 compatible LCD. Gold Rates Boards are widely used to display listing of product list, price list in corporate sectors, hotels, provision stores. Currency Display Board are widely used for displaying various currency rates at real time and thus find wide applications in various banks and money exchange counters.interest rate boards are in extensive usage and constantly in demand by various banks and money exchange counters.The microcontroller validates the SMS and then displays the. message in the LCD display board. The end user will type the desired string on the desktop and the result can be displayed on the LCD, which is connected to the microcontroller on the circuit board. The end user also has access to attractive features to move the LCD display in a specified direction. The LCD comes with a 14pin interface, which includes pins to receive power supply and ground as well. These 14pins have to be interfaced with microcontroller output ports to send instructions, which initialize the LCD in appropriate modes, and also to send data from the microcontroller is intended for display on the LCD output screen. The microcontroller is interfaced with the desktop through a full-duplex serial port. The pins are utilized to send byte at a time. The byte sent from the desktop can consist of instructions for the LCD and the end user desired new string to be displayed on the LCD. The microcontroller is interfaced with the LCD with 11 pins. The pins are utilized to send byte at a time and three pins are utilized to set the instruction modes on the LCD. The details of their uses and the information they carry will be discussed in depth later on.

BLOCK DIAGRAM

COMPONENT USED
Semiconductors: IC1 - AT89C51 microcontroller IC2, IC3 - 74LS138 3-to-8 decoder IC4 - 7805 5V regulator T1-T16 - BC558 pnp transistor D1-D4 - 1N4007 rectifier diode DIS1-DIS16 - KLA51 common-anode alphanumeric display LED1 - 5mm LED Resistors (all -watt, 5% carbon): R1-R16 - 2.2-kilo-ohm R17-R32 - 120-ohm R33-R37 - 10-kilo-ohm R38 - 220-ohm Capacitors: C1, C2 - 33pF ceramic disk C3 - 2200F, 25V electrolytic C4 - 1F, 16V electrolytic C5 - 10F, 16V electrolytic C6 - 0.1F ceramic disk Miscellaneous: X1 - 220V AC primary to 9V, 500mA secondary transformer XTAL - 11.0592MHz crystal S0-S3 - 4-pin DIP switch S4 - Push-to-on switch

CIRCUIT DESCRIPTION
It comprises microcontroller AT89C51, three-to-eight decoder 74LS138, common anode alphanumeric displays, regulator 7805 and a few discrete components. At the heart of the moving-message display is Atmel AT89C51 microcontroller (IC1). It is a low-power, highperformance, 8-bit microcontroller with 4 kB of flash programmable and erasable read-only memory (PEROM) used as on-chip program memory, 128 bytes of RAM used as internal data memory, 32 individually programmable input/output (I/O) lines divided into four 8-bit ports, two 16-bit programmable timers/counters, a five-vector two-level interrupt architecture, on-chip oscillator and clock circuitry. Ports P0 and P2 of the microcontroller have been configured to act as a common data bus for all the 16 alphanumeric displays whose corresponding data pins have been tied together to make a common 16-bit data bus. Port-2 provides the higher byte of data, while port-0 provides the lower one to light up a characteron the display. Port pins P1.2-P1.4 and P1.5-P1.7 of the microcontroller have been used as address inputs for decoder IC3 and IC4 (74LS138) to enable one of the fourteen alphanumeric displays (DIS3 through DIS16) at a time, respectively. However, displays DIS1 and DIS2 are enabled or disabled directly by port pins P1.0 and P1.1. Pins 4 and 5 are grounded and pin 6 is made high to enable decoder 74LS138. Fig. 2 shows the pin configuration of the common-anode alphanumeric display. All the corresponding data pins Dis 1 through DIS16 of alphanumeric displays have been tied together, while the common anode of each display is separately powered via a BC558 transistor which switches on or off as required, through outputs of 74LS138 ICs and pins P1.0 and P1.1 of IC1. The higher nibble of port P3 (P3.4 through P3.7) is used as a selection bus to select one of the 16 previously stored messages using the 4-bit binary value present on these pins. This value can be changed through a 4-pin DIP switch (S0 through S3). Selection pins P3.4 through P3.7 are pulled high via resistors R36 through R33, respectively. When the switch connected to a given pin is open the value is high (1), and when it is closed the pin is held low and the value becomes 0. In this way, by using a 4-bit number you can select any of the 16 messages shown in the Table. Capacitor C5 and resistor R37 form the power-on reset circuit, while a push-to-connect switch has been used for manual reset. An 11.0592MHz crystal generates the basic clock frequency for the microcontroller. To change the message being displayed while the circuit is working, first change the number present at the selection bus, then press reset key. The 220V AC mains is stepped down by transformer X1 to deliver the secondary output of 9V, 500 mA. The output of the transformer is rectified by a full-wave bridge rectifier comprising diodes D1 through D4, filtered by capacitor C3 and then regulated by IC 7805 (IC4). Capacitor C4 bypasses any ripple present in the regulated power supply. LED1 acts as the power-on indicator.

Working
The source code movmsg.asm is written in Assembly language and assembled using crosscompiler. It is wellcommented and easy to understand. Timer 1 has been used to generate a delay of around 1 ms for the switching gap between two consecutive displays. Thus, each display is enabled for 1 ms while displaying a message. The length of this cycle depends upon the length of the message string. The cycle repeats after a 0 is encountered at the end of each message stored in the look-up table at the end of the program. Each time, to display a character at a given display, first two bytes (16 bits) of data are sent to Port-2 and Port-0, then the desired display is enabled by sending its address to Port-1. Thereafter, a delay of 1 ms (slightly more than that) is generated by timer 1. Upon timer overflow, the entire display panel is refreshed by passing FFFFH to the data bus. Then the next character at the next display is passed in the similar manner. The cycle frequency is variable (depending upon the length of the message) but always high enough so that the message appears continuous to the human eye. Timer 0, with its interrupt enabled, is used to change the starting address of the message in cyclic manner so that the characters scroll from left to right with a proper gap between each shift. Meanwhile, the interrupt service sub-routine also checks for the starting address of DIS16 (right-most display). As soon as the first character reaches DIS16, the message stays for a longer time so that the entire message (message length not longer than 16 characters) can be easily read. Thereafter, characters again start scrolling rightwards, so the entire message goes out and disappears after a while to reappear from left side. All the messages are stored in the form of a look-up table in the program memory (ROM) itself. When the circuit is switched on (or reset), the monitoring program first checks for the binary number present at the selection bus and according to that, the ROM address of the starting character of the selected message is loaded into the data-pointer. Thereafter, onchip ROM reading is used to read the entire message over there. Note that each character is represented in the look-up table of the source code by two byte For example, S is represented by Sh and Sl separated by a comma. In addition to the alphabets, Arabic numerals and a few special characters have been defined in the program. For instance, a blank space is represented by bsh, bsl. Thus, it is very easy to modify the program. Suppose you want to display HOUSE NO 401-H in place of message 0. First, open the source code in the editor. Delete the old string and write the new string as below: msg0: db Hh, Hl, Oh, Ol, Uh, Ul, Sh, Sl, Eh, El, bsh, bsl, Nh, Nl, Oh, Ol, bsh, bsl, fourh, fourl, zeroh, zerol, oneh, onel, msh, msl, Hh, Hl, 0

REFERENCES

You might also like