1 Introduction
无忧电子开发网 http://www.51kaifa.comIn some public places such as stations, shopping malls, stock exchanges, factories and mines, it is often necessary to use LED (light-emitting diode) electronic display screens to release real-time and changing information or conduct advertising. LED electronic display screens are required to have functions such as easy modification, real-time mixed dynamic display of graphics and characters, and adjustable brightness. It is very important to use a computer to operate it and set it with a keyboard.
In order to solve the problems of slow speed, complex structure, difficult program design and single function of LED dot matrix driver based on 8-bit single-chip microcomputer, this system adopts high-speed SPCE061A single-chip microcomputer, which not only improves the scanning speed, but also ensures the realization of dynamic screen character display, graphic display, voice broadcast and voice control. In particular, after the system adds the adjustable screen brightness function, the average current passing through the LED is limited; and because the power supply of SPCE061A is 3.3~5.0V, it can reduce power consumption, protect LED, and extend the service life of dot matrix electronic display screen.
2Electronic display function
The dot matrix electronic display screen designed in this paper based on SPCE061A realizes Chinese characters, characters, numbers, real-time time
Dynamic display of information, such as the ability to scroll the screen left and right, up and down, and set the display speed. Manual or photosensitive automatic adjustment of LED display brightness.
The system display mode can be set at any time through the computer human-machine interface and control screen keyboard.
This system has the function of saving information after power failure. After power failure, the main controller can save information such as display content and display mode in Flash, and can continue to display after power is turned on again.
In addition, the system has voice function, which can regularly announce the time and display real-time content; simple voice control can be performed using voice recognition technology.
3. Display screen hardware circuit design
The LED dot matrix display consists of 8*8, a total of 64 light-emitting diodes. When controlling, the 8 row control ports of the anode and the 8 column control ports of the cathode are controlled separately. When displaying, the font is sent to the anode and the selection signal is sent to the cathode. Send out a row of fonts, then send the selection signal, and then send the font and selection signal of the second row. After scanning 8 times in a cycle, a character can be displayed on a dot matrix. 16*16 LEDs are used to display Chinese characters, so a display unit consists of 4 8*8 dot matrices. Send two bytes of fonts and 16 column selection signals at a time.
The dot matrix display system uses the Lingyang 16-bit single-chip microcomputer SPCE061A as the control core, and consists of an LED dot matrix electronic display, power supply, current drive circuit, address decoding circuit, serial interface circuit, keyboard, clock module and computer control interface. The system block diagram is shown in Figure 1.
Figure 1 Block diagram of dot matrix electronic display system
3.1 Main controller function
This design uses a 16-bit SPCE061A microcontroller. The main frequency of this microcontroller can reach up to 49MHz, the processing speed is very fast, and the main frequency can be adjusted by software, which can effectively solve the problem of screen flickering. It has rich hardware resources, with 32KB flash memory and 2KB RAM inside, which can complete large data storage without external memory expansion, greatly simplifying the peripheral interface circuit; 32 general I/O ports are designed for low power consumption. In power saving mode, the clock stops and the power consumption is only 2uA/3.6V. In addition, the chip supports online simulation and programming interface, which can facilitate online debugging.
SPCE061A has rich voice functions. It has a 10-bit DAC (digital-to-analog converter), a built-in microphone amplifier and automatic gain control (AGC) function for the microphone input channel [1] ; its integrated development environment is also equipped with a rich voice interface function API. It provides a rich software and hardware environment for expanding the voice function of this system.
3.2 Driving Circuit
The driving circuit is divided into a row driving circuit and a column driving circuit. The row driving circuit is shown in FIG2 .
Figure 2 Row drive circuit
The row driver is the anode of the LED. Its principle is to send out current to make the diode light up. It is composed of 74HC595 and driver chip ULN2803. The main controller sends the font to the serial-to-parallel device 74HC595 that controls the anode in a serial manner. 74HC595 is a CMOS TTL device with low power consumption and a speed of up to 100MHz, which is suitable for LED display driver [2] . Each display unit is controlled by two 74HC595 cascades. One display unit requires two 74HC595s. The font data signal is sent out by the main controller separately, and the clock and other control signals are sent out simultaneously through the same I/O port. This can avoid mutual interference and enable flexible control. The driving capacity of the TTL level is limited and can only drive 8 TTL devices. When there are more display units, the driving capacity is insufficient and the signal may be mistransmitted. The solution is to add a 74HC245 to convert one signal into 8 outputs, which improves the driving capacity and ensures the accuracy of the signal. Since the scanning speed of dynamic scanning must reach above 60HZ, otherwise flickering will occur, it is very important to increase the scanning speed. In the program, the fonts of each unit in the buffer are integrated into a number and sent out in parallel to increase the scanning speed. 74HC595 sends the font to the anode of ULN2803 to drive the LED. ULN2803 is an 8-way Darlington tube with strong driving ability. The maximum input current of a single channel can reach 500mA; since ULN2803 cannot output high level, a suitable pull-up resistor must be added when driving to obtain a suitable driving current.
The column driver controls the cathode of the LED. The principle is that the input current also uses ULN2803 as the column driver. The dot matrix display must be displayed dynamically. Only one column can be selected at any time. The corresponding columns of each display unit are specially designed to be connected together. In this way, the cycle of scanning one display unit completes the scanning of the entire display screen, which improves the scanning speed. The 16-channel selection signal of a display unit is first sent by the 4-16 decoder 74154 and then sent to the column driver. Since ULN2803 is a reverse drive, 7406 is added between 74154 and ULN2803 as a reverse.
3.3 Brightness adjustment circuit
The brightness of the display is adjusted by changing the voltage of VCC to adjust the current flowing through the LED. Automatic brightness adjustment uses a photoresistor or phototransistor to detect the external light intensity and automatically adjusts the LED brightness according to the light intensity. The brightness adjustable circuit is shown in Figure 3.
Figure 3 Brightness adjustable circuit
The first part is the automatic brightness adjustment circuit. RW1/RW2 controls the highest/lowest output voltage of automatic adjustment. RW3 controls the sensitivity to external light. R2 and C2 form a first-order low-pass filter to filter out the high-frequency interference of external interference light (such as fluorescent lamps) on the system. The second part is the manual brightness adjustment circuit. RW5 provides an adjustable voltage for the subsequent LM317 adjustment segment. The third part is the maximum output voltage protection circuit to adjust RW4 to set the highest output voltage. A three-state switch SW1 is used to switch between two working modes. When working mode 1 is selected, the brightness can be adjusted manually; when working mode 2 is selected, the clamping circuit works, and the LM317 outputs the maximum voltage, and the brightness is brightest at this time; when working mode 3 is selected, the brightness is automatically adjusted.
3.4 Clock Module
The clock module uses DS1302. This is a high-performance, low-power, real-time clock chip with RAM. It provides information such as seconds, minutes, hours, days, weeks, months, and years (including leap years). It can work in 24-hour or 12-hour mode and provide AM/PM indication. It communicates with the microcontroller through a simple serial interface, and only three wires are needed to communicate with the microcontroller in synchronous serial mode. The chip also provides the ability to trickle charge the backup power supply [3] , which can save time when the power is off.
4. Programming
The whole software is divided into three parts, namely the display part, the control part and the communication part. The communication part adopts Visual C++ programming language. VC provides a powerful communication control MSCOMM in standard serial communication. This control can set the data transmission and reception of serial communication, set the serial port status and the information format and protocol of serial communication, and directly use the RS-232 serial port of PC to send data. In order to realize reliable communication between the microcontroller and the PC, it is necessary to ensure that both parties have the same data format and baud rate. Here the baud rate is set to 115200bps.
The program composition block diagram is shown in Figure 4.
Figure 4 Program composition diagram
The display circuit part program is as follows:
void display(unsigned int key)
{ unsigned int i,k,temp[4],dd,
data_high[4],data_low[4];
for(k=0;k<10;k++)
{*P_Watchdog_Clear=0x01;
for(i=0;i<16;i++) // "i" represents the column
{switch(key)
{case 0:
temp[0]=encoding_00[i]; //The font exists in the array encoding_00[]
temp[1]=encoding_01[i];
temp[2]=encoding_02[i];
temp[3]=clear_00[i];
break;......} //Omitted
data_high[0]=temp[0]&0xff00; //The following four sentences are the fonts of a word
data_high[0]=data_high[0]>>8;
data_low[0]=temp[0]&0x00ff;
shiftbit(data_high[0]); //8-bit data serial output to 74595
shiftbit(data_low[0]);
oe154=1;
latch0=1; //74595 data parallel output enable
latch0=0;
dd = *P_IOA_Data;
dd=dd&0xff0f;
*P_IOA_Data=(i<<4)ⅆ //74154 decoding program
oe154=0;} //Open the enable of 74154
}
oe154=1; //return to main,close 74154 display
} // end of display
5 Conclusion
This electronic dot matrix display screen uses the superior performance SPCE061A single chip microcomputer as the control core, realizes the pre-stored display of Chinese characters, characters and numbers, and completes the multi-function switching of the key, realizes the left and right scrolling control, and displays the pre-stored data. It has the functions of continuously adjustable brightness, adjustable brightness sensitivity, computer control, power-off protection and voice recognition. When displaying 8 Chinese characters, the display scanning frequency can reach 120Hz, and the display quality is good. In the system design, the reliability and stability of the driver are also strengthened, which can effectively protect the system operation.
The author's innovation: Using the single-chip microcomputer SPCE061A as the control core and a cheap and reliable driving circuit, a display system with multiple functions such as mixed dynamic display of graphics and characters is realized, which can be voice controlled, and a circuit with adjustable screen brightness is designed and implemented.
References:
[1] Huang Tao, Hu Bin. Design of speaker-independent speech recognition based on SPCE061A microcontroller [J]. Microcomputer Information, 2005, 8:19-21.
[2] Zhai Zhen, Zhang Chunling. Circuit design of driving LED with 74HC595 chip [J]. Machine Tool and Hydraulics, 2004, 151(12):151-152.
[3] Zhu Lu, Zhu Qinghui. Continuous supplementary charging real-time clock chip DS1302 and its application [J]. Modern Electronic Technology, 2006, 234(19):116-118.
Previous article:Optimizing Algorithm Design with Customizable Microcontrollers
Next article:Signal Acquisition System of Multi-wavelength Meter Based on ADμC842
Recommended ReadingLatest update time:2024-11-16 21:29
- Popular Resources
- Popular amplifiers
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- Modern Product Design Guide
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Share an ARM OS project package (based on STM32F103 on-chip resources).
- MSP-EXP430F5529LP Development Board 005-PWM Library Function + Clock Configuration
- Power Engineer!!! Click here
- Analog Electronics Simulation
- EEWORLD University ---- RF Circuit Basics
- EEWORLD University ---- ARM Programming
- [RVB2601 Creative Application Development] 5. Using NTP Timer RTC Clock
- EEWORLD University Hall----Electrical Engineering and Electronic Technology (China University of Mining and Technology)
- Where is the best place to place the ESD on the PCB?
- 【EasyARM-RT1052 Review】+ MQTTClient transplantation