Design and Simulation of LED Display Based on Mobile Data

Source: Internet
Author: User

15:15:56 Source: and non-network
Keywords: LED display TC35I Single Chip Microcomputer Proteus
As an information display device, the LED electronic display screen is mainly used to play advertisements, news, notifications, weather forecasts, time, stock information, flight information, ticket sales information, etc, more and more applications have been made in stations, intersections, buses, ticket sales halls, business halls, waiting halls, securities companies, airports, sports, meteorology, traffic control, and other places, it has broad application prospects.

However, the traditional LED display uses wired communication to transmit data, which is severely restricted by regions and wiring. If a large number of LED display screens work at the same time, it is very troublesome to transmit updated data for the LED display, and without other additional control devices, the management department of the LED display cannot monitor the actual operation of the LED display.

Mobile Data-Based LED display displays use the most widely used and stable GSM, GPRS, CDMA, and PHS networks, the content of the LED display can be easily updated in real time in any place with mobile network coverage by means of short messages, effectively solving the trouble of updating the LED display data and the difficulty of monitoring, reduces the workload of management departments. With the development of mobile communication technology and the further promotion of the application scope of LED display screen, this kind of LED display screen based on mobile data has great application value.
1. system composition and principles
The mobile data-based LED display screen system consists of GSM wireless transceiver module, MCU (Single Chip Microcomputer), LED driving circuit, and LED display screen. The schematic diagram 1 is shown in.

The control center of the system is MCU (single-chip microcomputer). This design uses the AT89C51 chip of ATMEL, which controls the GSM wireless module to send and receive mobile data through the serial port, and control the LED drive circuit and display screen to display the content in an appropriate way. The GSM wireless transceiver module uses the TC35I provided by Siemens and is equipped with a common SIM card on the market. It is responsible for receiving the display content sent by legal users over mobile networks, the status data of the LED display is sent back to the user through the mobile network. The LED driving circuit and display screen are basically the same as those in the traditional mode [1, 2]. The led unit board with "16 pin 08 interface" can be spliced into the desired screen size.

During use, you only need to edit the content displayed on the LED screen on your mobile phone or computer in text message format, then, the phone number is sent to the SIM card inserted in the TC35I module like a normal text message. After receiving a text message, the TC35I module with a SIM card first checks whether the sender of the text message is a valid user. If it is not a legal user, TC35I discards the text message. If it is a legal user, take out the content to be displayed and control the LED screen to display the information as required. At the same time, TC35I can send the status data of the LED screen to a valid user in text message format. In this way, two-way real-time transmission of display content and status data is realized using the mobile communication network.

Considering the simplicity, this paper uses a 32x64 dot matrix LED unit board to display 16x16 Dot Matrix Chinese characters as an example to describe the system principle. For larger LED screens, you only need to cascade multiple similar led unit boards through the "16 pin 08 interface.
2 hardware implementation
2.1 hardware interface circuit of TC35I module and Single Chip Microcomputer
In this system, China Mobile's data is sent and received by the TC35I module. The TC35I module integrates the RF circuit and baseband processing. It can work in GSM 900 MHz and DCS 1 800 MHz. It is connected to MCU (Single Chip Microcomputer) through RS232 serial port, the RS232 data interface complies with the specifications of gsm07.05 and gsm07.07 and uses a standard at command set. The module connects the antenna through a 50Ω antenna connector and a 40-pin zif connector to connect the power supply to the SIM card holder, and bidirectional transmission of commands, data, voice signals, and control signals [3].
Figure 2 shows the key components of the single-chip microcomputer and TC35I interfaces.

Note that after the system is powered on, in order to enable TC35I to enter the working state, you must add a low pulse with a latency greater than 100 ms, and the Level descent duration cannot exceed 1 ms. After the device is started, the system maintains a high level (3.3 V ). The supply voltage of the TC35I cannot be lower than 3.3 V when the drive is impaired. Otherwise, the TC35I cannot be activated. In addition, the simpres pin of the zif connector is used to check whether the SIM card is properly inserted. If the connection is correct, the simpres pin outputs a high level; otherwise, it is a low level.

2.2 single-chip microcomputer and LED display drive circuit
Because Mobile Network Short Messages only obtain the internal code of Chinese characters, and the LED screen shows the dot matrix information of Chinese characters, the system must store the gb2312 Chinese Character dot matrix font, in addition, the LED screen display requires a large amount of display data, so the 64 kB RAM (62256) and 512 KB flash memory (29f040) are extended in the peripheral of the single chip microcomputer AT89C51 ). 29f040 stores the dot matrix font (hzk16, asc16) and Unicode conversion gb2312 code table, 62256 as the display cache. After receiving the short message, the microcontroller converts the information to be displayed to gb2312, and then reads the corresponding dot matrix information from 29f040 and stores it in 62256.

The P1 port of the single chip microcomputer is used to control the display of the LED screen, where p1.0 ~ P1.3 outputs four line selection signals A, B, C, and D respectively, ABCD changes from 0000 to 1111, and 1-2 scans ~ The data will be displayed in turn at 16 rows. The p1.4 foot outputs the shift clock signal shclk so that the display data can enter the LED unit board in sequence. The p1.5 foot outputs the lock signal STB, the display data can be output stably. The display data of 16 rows on the LED unit board is output on the p1.6 foot, and the display data of the next 16 rows on the LED unit board is output on the p1.7 foot.

32*64 dot matrix LED unit board is used to display 16 Dot Matrix Chinese characters, two lines can be displayed, 4 Chinese characters per line. It consists of circuit 3. Two 74hc138 chips are used as the driving circuit, and eight 74hc595 chips are used as the driving circuit for the upper and lower 16 lines. Dynamic scanning is used for specific display. The four line selection signals A, B, C, and D output by single-chip microcomputer are decoded by two 74hcl38 chips and scanned by line for 1 ~ of the LED unit board ~ 16 rows and 17 ~ 32 rows; the display data of the last 16 rows R1 and the display data of the next 16 rows R2 go to their respective 74hc595 respectively under the same shift clock signal shclk, finally, stable output is at the parallel output end of 74hc595 under the action of STB.
In actual production of LED unit boards, 4953 chips are often added to the line scanning line output by 74hcl38 chip to increase the drive capability.
3 Program Design
3.1 short message sending and receiving Control
The single-chip microcomputer uses the AT command to control the TC35I module for initialization and sending and receiving of Short Messages. There are three modes to control Short Messages: block mode, PDU mode, and text mode. The text mode does not support Chinese characters, while the block mode requires the mobile phone manufacturer to provide driver support. The system uses the PDU mode to receive and send short messages.
After the system is powered on, initialize TC35i. The content mainly includes:
(1) set the SMS center number at + csca = "+ 8613800250500"
<CR> (This number is set differently for different regions ).
(2) set the Short Message format at + cmgf = 0 <CR> (0 indicates the PDU format ).
(3) set the location where the short message is stored at + CPMS = "SM" <CR> (SM indicates that the short message is stored in the SIM card ).
(4) set the SMS Arrival notification at + cnmi =, 1 <CR>. This command allows the module to send the command <CR> + cmti: "SM", index (information storage location) <CR> to the microcontroller after the short message arrives.
During system operation, the single-chip microcomputer controls the TC35I module to receive or send short messages through the AT command. The command format is as follows:
(1) read the short message command at + cmgr = index <CR>.
(2) Send the short message command at + cmgs = <length> <CR>.
(3) Delete the short message command at + cmgd = index <CR>.
(4) SIM card status query command at ^ scks.
The received and sent short messages are processed by Single-Chip Microcomputer in the form of PDU string data "~ "9" and the letter ""~ "F" is a hexadecimal number or BCD decimal number. The PDU string contains not only the displayed message, but also many other information, such as the SMS service center number, target number, reply number, encoding method, and service time. The structure of the PDU string sent and received is not exactly the same. The following two instances describe the structure and orchestration of the PDU string.
Example 1: receive. SMSC number: + 8613800-
250500, the recipient's number is 13851872468, and the message content is "Hello !". The PDU string read from the TC35 module is -- 08 91 68 31 08 20 05 05 F0 84 0d 91 68 31 58 81 27 64 F8 00 08 30 30 21 80 63 54 80 06 4f 60 59 7d 00 21.
Example 2: Send. SMSC number: + 8613800-
250500, the recipient's number is 13851872468, and the message content is "Hello !". The PDU string sent by the single-chip microcomputer to the TC35 module is -- 08 91 68 31 08 20 05 F0 11 00 0d 91 68 31 58 81 27 64 F8 00 08 00 06 4f 60 59 7d 00 21.
3.2 LED Display Control Program
The dynamic scanning function of the LED is realized by using the timer of the single-chip microcomputer for 0 interruptions. If the initial value of the timer 0 count is set to interrupt more than times per second, a row is displayed for each interruption scan, so that each row is scanned at least 60 times per second. Based on the visual effect of the human eye, the display effect is satisfactory.
Timer 0 interrupt service program:
Void int0 (void) interrupt 1
{
Tr0 = 0; // turn off the timer T1
Tl0 = 0x80; // set the low 8 bits of the initial value
Th0 = 0xff; // set the height of the initial value to 8 bits
Tr0 = 1; // enable timer T1

If (I <16) // I indicates the scanned row number. The value ranges from 0 ~ 15,
// Scan 1 ~ 16 rows
{
P1_5 = 0; // turn off the hc595 lock

While (z <8) // Z is the upper and lower each 8 pieces hc595 Press
// Number from left to right. value range: 0 ~ 7.
// Each hc595 is cyclically performed eight times,
// Implement 8-bit data string/and conversion
{A = disp [I * 2 + k]; // obtain the 8-bit display data of the last 16 rows.
B = disp [I * 2 + K + 128]; // remove the 8 bits of 16 rows
// Display data B

If (Z % 2! = 0) K + = 32-1;
Else K ++;

While (j <8) // loop for 8 times, pass a through p1.6
// Move your feet to the preceding hc595 in sequence,
// Route B to p1.7
// Move to the following hc595
{
P1_4 = 0; // lower the p1.4 port,
// Generates the shift pulse shclk

If (A & Au)> 0) // false serial port p1.6, output 16 rows
// Display data
P1_6 = 1;
Else
P1_6 = 0;

If (B & Au)> 0) // false serial port p1.7, output the next 16 lines
// Display data B
P1_7 = 1;
Else
P1_7 = 0;

P1_4 = 1; // set the p1.4 port to a high value to generate a shift
// Pulse shclk
Au = au <1;
J ++;
}
J = 0;
Au = 0x01;

Z ++;
}
K = 0;
Z = 0;
}
P1 = (P1 & 0xf0) | I; // use p1.0 ~ P1.3 generates 4 bits
// ABCD
P1_5 = 1; // enable 595 lock
I ++;
If (I = 16) I = 0;
}

4. Proteus simulation implementation
This design uses Keil μ vision2 and Proteus software to realize the software design and hardware simulation debugging of the system.
Proteus can simulate a variety of commonly used single-chip microcomputer and peripheral circuits (such as LCD, Ram, Rom, keyboard, motor, led, etc.) including 51 series ), it is currently the best tool to simulate the peripheral devices of single chip microcomputer. During simulation, you only need to draw the peripheral control of the microcontroller and the LED display drive circuit in the Proteus software, and then set the crystal oscillator frequency in the properties of the microcontroller chip, which will be generated using the source program compiled by Keil C51. when the Hex file is saved to the chip, you can simulate and debug it [4, 5]. If any hardware problem occurs during the simulation, you can directly modify it in proteus Isis. If any software problem occurs, you can directly modify it in Keil μ vision2. Through the joint debugging of Keil and Proteus, satisfactory results can be obtained, avoiding the direct production of physical objects at the beginning, thus shortening the development cycle of the system and reducing the development and debugging costs.
The GSM module TC35I is not available in the Proteus software, but the serial port simulation function provided by Proteus can be used to simulate and debug the communication between the single-chip microcomputer and the TC35I module. Circuit 4. The serial ports (p3.0 and p3.1) of single-chip microcomputer are connected to the TC35I module through the serial interface device compim (the TC35I module is not shown in the figure ). First, use the virtual serial port software vspdxp (virtual serial port driver XP) on the simulation host to set up two interconnected virtual serial ports com3 and com4, and then start the "Serial Port debugging assistant" software, set the serial port to com4 and the baud rate to 4 800 B/S, and set the serial port of the compim device in the Proteus simulation circuit to com3, the baud rate is also set to 4 800 B/S. Note that the baud rate setting value in com3 and com4 must be the same as the baud rate setting value in the single chip microcomputer software. Here, both are set to 4 800 B/S, and finally run the Proteus simulation, in this case, you can use the "Serial Port debugging assistant" software to simulate the data format output by TC35I to send data to the microcontroller. For example, under normal circumstances, if you send a hexadecimal data string "08 91 68 31 08 20 05 05 F0 84 0d 91 68 31 58 81 27 64 F8 00 08 30 30 21 80 63 54 80 06 4f 60 59 7d 00 21 ", "Hello!" is displayed on the LED screen of the simulation circuit! ". The at command string sent by the single-chip microcomputer to the TC35I module is displayed in the Receiving Window of "Serial Port debugging assistant" in real time. If it is incorrect, you can use the virtual serial port terminal in the Proteus software and other virtual instruments and charts for code-level tracking and debugging.

After a slight modification is made to the circuit, the program is solidified into the chip of the microcontroller. The actual running result is exactly the same as that of Proteus.

The mobile data-based LED display screen uses the mobile communication network to update the content of the LED display screen in real time, avoiding the trouble of laying lines in the original system or building a dedicated wireless transceiver, effectively reducing the system cost, it provides a new idea for the design of LED display screens that are far away from office spaces, especially outdoor ones. At the same time, in the process of developing this system, we make full use of the powerful functions of the embedded system software and hardware design simulation platform Proteus software for System Virtual development, and then make the actual production after the success, this greatly improves development efficiency, reduces development costs, and is of practical significance for the development of single-chip microcomputer and embedded systems.
References
[1] The principle and Engineering Technology of the LED Display System [M]. Chengdu: University of Electronic Technology Press, 2002.
[2] Zhang mingbo. Design of dot matrix LED Display System Based on Single Chip Microcomputer [J]. Microcomputer Information, 2007,2 (2): 85-86.
[3] Siemens TC35i terminal user guide [dB/0l]. http://www.siemens.com/wm.
[4] Yan shengyue. Proteus-A Software Integrating Single-chip Computer Simulation and spice analysis [J]. Electronic World, 2004 (12): 38-39.
[5] joint use of Huang Xianyi. Proteus and ultra edit and Keil [J]. Radio, 2005 (7): 36-37.
(This article from the world of Electronic Engineering: http://www.eeworld.com.cn/wltx/2011/0210/article_3669.html)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.