28-08-2012, 10:23 AM
Microcontroller-Based Moving-Message display
Microcontroller.docx (Size: 239.84 KB / Downloads: 99)
Abstract:
LED-based moving-message displays are becoming popular for transmitting information to large groups of people quickly. These can be used indoors or outdoors. We can find such displays in areas like rail -way platforms, banks, public offices, hotels, training institutes, nightclubs and shops. Compared to LEDs, liquid-crystal displays (LCDs) are easy to interface with a microcontroller for display-in information as these have many built-in functions. But these can’t be observed from a distance and large-size LCDs are very costly. LED-based displays can be of two types: dot-matrix and segmental. If you implement a moving-message display with multiplexed dot-matrix LEDs, it will be very costly for displaying 16 characters or more at a time. Moreover, programming will require a lot of data memory or program memory space. An external RAM may be needed to complement a microcontroller like AT89C51. However, if you use alphanumeric (16-segment LED) displays for the above purpose, programming burden is reduced and also it becomes highly cost-effective. You can make your own display panel consisting of 16 alphanumeric characters at a much lower cost. The circuit presented here uses 16 common-anode, single-digit, alpha -metric displays to show 16 characters at a time. Moreover, programming has been done to make the characters move in a beautiful manner. A message ape -pears on the panel from the right side, stays for a few seconds when the first character reaches the leftmost place and then goes out from the left side . It displays 16 different messages to depict different occasions, which can be selected by the user through a DIP switch.
Circuit description:-
Fig.1 shows the circuit of the micro -controller-based moving-message display. It comprises microcontrollerAT89C51, three-to-eight decoder 74LS138, common anode alphanumeric displays, regulator 7805 and a few disses -Cretecomponents. At the heart of the moving-mess-sage display is Atmel AT89C51 mi -crocontroller (IC1). It is a low-power, high-performance, 8-bit micro control -leer with 4 kobo 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 arch -texture, on-chip oscillator and clock circuitry.
Construction:-
Fig. 3 shows an actual-size, single-side PCB layout for the micro control -leer-based moving-message display circuit, except displays DIS1 through DIS16, transistors T1 through T16 and resistors R17 through R32. Com -ponent layout for this PCB is shown in Fig. 4. Fig. 5 shows the PCB for displaysDIS1 through DIS8, transistors T1 through T8 and resistors R17 throughR24. Component layout for this PCBis shown in Fig. 6. You need to use an additional PCB as shown in Fig. 5 for DIS9 through DIS16, so as to configure 16 alphanumeric displays. For this PCB, the corresponding components will be transistors T9 through T16 and resistors R25 through R32 in addition to displays DIS9 through DIS16. Cur -Fig. 2: Pin configurations of alphanumeric display corresponding connector are provided to make a proper connection. ConnectorsCON2, CON4 and CON6 of Fig. 3 areconnected to CON2, CON4 and CON6of Fig. 5, respectively, through external wires to interface DIS1 through DIS9Connectors CON3, CON5 and CON7of Fig. 3 are connected to CON2, CON4and CON6 of Fig. 5, respectivelythrough external cable to interface DIS9through DIS16.
Software and its working
The source code ‘movmsg.asm’ is writ -ten in Assembly language and assembled using cross-compiler. It is well-commented 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 ‘FFH’ 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. There -after, 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 monitor -in program first checks for the binary number present at the selection bus and according to that, the ROM ad -dress of the starting character of the selected message is loaded into the data-pointer. Thereafter, on-chip ROM reading is used to read the entire message over there.Note that each character is rep-resented in the look-up table of the source code by two bytes.
Microcontroller.docx (Size: 239.84 KB / Downloads: 99)
Abstract:
LED-based moving-message displays are becoming popular for transmitting information to large groups of people quickly. These can be used indoors or outdoors. We can find such displays in areas like rail -way platforms, banks, public offices, hotels, training institutes, nightclubs and shops. Compared to LEDs, liquid-crystal displays (LCDs) are easy to interface with a microcontroller for display-in information as these have many built-in functions. But these can’t be observed from a distance and large-size LCDs are very costly. LED-based displays can be of two types: dot-matrix and segmental. If you implement a moving-message display with multiplexed dot-matrix LEDs, it will be very costly for displaying 16 characters or more at a time. Moreover, programming will require a lot of data memory or program memory space. An external RAM may be needed to complement a microcontroller like AT89C51. However, if you use alphanumeric (16-segment LED) displays for the above purpose, programming burden is reduced and also it becomes highly cost-effective. You can make your own display panel consisting of 16 alphanumeric characters at a much lower cost. The circuit presented here uses 16 common-anode, single-digit, alpha -metric displays to show 16 characters at a time. Moreover, programming has been done to make the characters move in a beautiful manner. A message ape -pears on the panel from the right side, stays for a few seconds when the first character reaches the leftmost place and then goes out from the left side . It displays 16 different messages to depict different occasions, which can be selected by the user through a DIP switch.
Circuit description:-
Fig.1 shows the circuit of the micro -controller-based moving-message display. It comprises microcontrollerAT89C51, three-to-eight decoder 74LS138, common anode alphanumeric displays, regulator 7805 and a few disses -Cretecomponents. At the heart of the moving-mess-sage display is Atmel AT89C51 mi -crocontroller (IC1). It is a low-power, high-performance, 8-bit micro control -leer with 4 kobo 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 arch -texture, on-chip oscillator and clock circuitry.
Construction:-
Fig. 3 shows an actual-size, single-side PCB layout for the micro control -leer-based moving-message display circuit, except displays DIS1 through DIS16, transistors T1 through T16 and resistors R17 through R32. Com -ponent layout for this PCB is shown in Fig. 4. Fig. 5 shows the PCB for displaysDIS1 through DIS8, transistors T1 through T8 and resistors R17 throughR24. Component layout for this PCBis shown in Fig. 6. You need to use an additional PCB as shown in Fig. 5 for DIS9 through DIS16, so as to configure 16 alphanumeric displays. For this PCB, the corresponding components will be transistors T9 through T16 and resistors R25 through R32 in addition to displays DIS9 through DIS16. Cur -Fig. 2: Pin configurations of alphanumeric display corresponding connector are provided to make a proper connection. ConnectorsCON2, CON4 and CON6 of Fig. 3 areconnected to CON2, CON4 and CON6of Fig. 5, respectively, through external wires to interface DIS1 through DIS9Connectors CON3, CON5 and CON7of Fig. 3 are connected to CON2, CON4and CON6 of Fig. 5, respectivelythrough external cable to interface DIS9through DIS16.
Software and its working
The source code ‘movmsg.asm’ is writ -ten in Assembly language and assembled using cross-compiler. It is well-commented 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 ‘FFH’ 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. There -after, 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 monitor -in program first checks for the binary number present at the selection bus and according to that, the ROM ad -dress of the starting character of the selected message is loaded into the data-pointer. Thereafter, on-chip ROM reading is used to read the entire message over there.Note that each character is rep-resented in the look-up table of the source code by two bytes.