introduction
In modern intelligent instruments and equipment, graphic dot matrix liquid crystals that can display Chinese characters and small keyboards that can input information have become indispensable components of the human-machine interface of intelligent equipment. At the same time, the low power consumption feature also runs through the design of the Chinese human-machine interface. In recent years, with the emergence of low-price, high-performance DSP chips, DSP has been increasingly used in fields such as digital motor control, high-speed signal acquisition, voice processing, image analysis and processing, and increasingly shows its huge advantages. sex. The LCD screen is used as the display front-end of various portable systems because of its intuitive display and easy operation. Traditional LCD displays are often controlled by microcontrollers. However, when the system has a large amount of high-speed real-time data, the single-chip microcomputer becomes unable to do so due to the limitation of processing speed. In order to solve these problems, this article proposes a design of an LCD screen controlled by the high-speed and low-power DSP chip TMS320LF2407, which effectively solves the above problems.
In the design, the author uses TMS320LF2407 as the system control chip, and builds a low-power Chinese human-machine interface at the 3V level by selecting an appropriate liquid crystal display module. This Chinese human-machine display interface is an important part of the motion control system with TMS320LF2407 as the core.
1. TMS320LF2407 DSP
TMS320LF2407 is a 16-bit fixed-point DSP launched by Texas Instruments (TI). It has the basic functions of TMS320 series DSP and also has the following features:
1. Using high-performance static CMOS technology, the power supply voltage is reduced to 3.3V, reducing the power consumption of the controller.
2. It contains up to 32K×16-bit Flash program memory, up to 2.5K×16-bit data/program RAM, 544×16-bit dual-port RAM (DARAM), and 2K×16-bit single-port RAM (SARAM).
3. Two event management modules EVA and EAB. The event management module is suitable for controlling AC induction motors, brushless DC motors, switched reluctance motors, stepper motors, multi-stage motors and inverters.
4. The scalable external memory has a total of 192K×16 bits, of which the program memory space, data memory space, and I/O addressing space are each 64K×16 bits.
5. Contains watchdog timer (WDT), 10-bit ADC converter, controller area network module CAN2.0 B, serial communication interface module (SCI), 16-bit serial external device interface module (SPI), Phase locked loop based clock generator.
6. 5 external interrupts (two motor drive protection, reset and two maskable interrupts); 3 low-power power management modes, which can independently transfer peripheral devices into low-power working modes.
In addition, the chip has up to 41 general-purpose I/O pins (GPIO) that can be individually programmed or multiplexed. Users can set the software according to their own needs, giving it great flexibility in applications. In summary, TMS320LF2407 has extremely low power consumption, powerful processing capabilities, rich on-chip peripheral modules, and convenient and efficient development methods.
2. LCD module and interface circuit
In order to achieve a friendly Chinese human-computer display interface, the LCD module uses Truly's MG-12232. The typical supply voltage of this module is 3V, the typical operating current is 0.3μA, and its display range is 122×32 dot matrix. Its controller is two pieces of SED1520F0A. SED1520F0A can work normally at 3.3V voltage, thus avoiding the problem of logic level mismatch with TMS320LF2407.
A SED1520F0A can control an 80×16 dot matrix display. Its display RAM has a total of 16 lines, divided into 2 pages, with 8 lines per page. The data registers of each page correspond to 8 lines of points on the LCD screen. When setting the page address and column After the address, a certain unit of the display RAM is determined. Each column on the screen corresponds to a byte content of the display RAM, and the bottom bit of each column is the highest bit, and the top bit is the LSB, that is, the byte data of the RAM unit is from low to high, and each data bit corresponds to the display The 8 data bits from high to low in a column on the screen. Assigning a value to a byte unit of the display RAM is to control whether the pixels of the 8 rows (page) of the current column are displayed. When the data bit is "1", it is displayed, and when it is "0", it is not displayed.
The interface signals between SED1520F0A and TMS320LF2407 are (using M6800 timing):
DB0~DB7: Data bus; A0: Data/command selection signal, A0=1 means data appears on the data bus, A0=0 means instructions or read status appears on the data bus; : Interface timing type selection, =1 is M6800 timing, its operating signals are E, R/W, =0 is Intel8080 timing. In M6800 timing, R/W=1 is for reading and R/W=0 is for writing. When E1=1, the E1 block is selected, that is, the left half of the LCD module works. When E2=1, the E2 block is selected, that is, the LCD module works on the right half of the screen.
The interface circuit between TMS320LF2407 and MG-12232 module is shown in Figure 1. The corresponding control pins of TMS320LF2407 are set to I/O port mode, and software is used to simulate the M6800 operation sequence. In Figure 1, V0 is the negative voltage driving power input terminal required by the LCD. Its external resistor should be debugged with an adjustable resistor first to avoid inappropriate driving voltage and invisible display.
3. Keyboard interface
Based on the consideration of low power consumption requirements of the system, the keyboard input response program should be designed to run in interrupt mode. That is, when a key is pressed, the DSP external interrupt 1 (XINT1) generates an interrupt (can wake up from the sleep state), and starts a 20ms timer to eliminate jitter and eliminate interference, and then the DSP enters the sleep state. When the 20ms timer generates an interrupt, the DSP is woken up from the sleep state again. At this time, the keyboard is scanned to determine whether a key is pressed. If a key is pressed, the key value is read from IOPB0 to IOPB7 and the corresponding key value is executed. function program. After executing this program, the DSP can enter sleep again and be in a low power consumption state.
4. Software design
The main program flow chart is shown in Figure 2.
Before the LCD module displays information, the LCD module must be initialized. The initialization flow chart is shown in Figure 3.
The DSP system initialization program and key scanning program are given below.
DSP system initialization program:
SYS: SETC INTM; disable maskable interrupts
CLRC CNF; B0 is configured as data storage space
SPLK? #81FEH, SCSR1; clock multiplied by 4
;CLKIN=6MHZ, CLKOUT=24MHZ
SPLK #0E8H, ; disable watchdog
LDP? #0
SPLK? #0001H, IMR; enable interrupt level 1 INT1
SPLK #0FFFFH, IFR; clear all interrupt flags
CLRC INTM; enable interrupt
RET
LCD initialization procedure:
LDP #0E1H; DP (7080H~70FFH)
LACL MCRA
AND #000FH? ;Configure IOPA[4~7], IOPB[0~7] is
;General I/O port function
SACL PADATDIR
OR #0F000H; IOPA[4~7] is the output mode
AND #0FF0FH; IOPA[4~7]=0
SACL PADATDIR
LDP #5H
SPLK #00E2H, LCDCMD; reset command E2H
CALL COMWE
SPLK #0A4H, LCDCMD; normal display driver command A4H
CALL COMWE
SPLK #0A9H, LCDCMD; duty cycle is 1/32
CALL COMWE
SPLK #0A0H, LCDCMD;
CALL COMWE
SPLK #0C0H, LCDCMD; display the starting line
CALL COMWE
CALL CLEAR
SPLK #0AFH, LCDCMD; open display command AFH
CALL COMWE
RET
After external interrupt 1 response and 20ms timer interrupt debounce, read key value subroutine:
LDP #0E1H; DP (7080H~70FFH)
LACL PBDATDIR; retrieve key value
SACL KEYDATA; send the key value to KEYDATA to save
RET
5. Conclusion
This system uses TMS320LF2407 DSP, MG-12232 graphic dot matrix LCD module and keyboard to build a low-voltage, low-power Chinese human-machine interface based on 3V level. In the actual test, the current consumption of this Chinese human-machine interface was less than 1mA. This design scheme achieved good low-power consumption effects.
references
1. TMS320LF240X DSP structure, principle and application, Liu Heping, et al. Beijing University of Aeronautics and Astronautics Press, 2002.
2. Liquid crystal display application technology, Li Weiti, Guo Qiang. Electronic Industry Press, 2000.
3. DSP controller principle and its application in motion control systems, Han Antai, et al. Tsinghua University Publishing, 2003.
Previous article:Inkjet printer control technology based on microcontroller
Next article:Design and implementation of LPT-USB printer driver based on CH375 interface circuit
Recommended ReadingLatest update time:2024-11-16 19:46
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- Borrowing a power bank for 99 yuan a day is really a rip-off? Have you ever used a shared power bank?
- KiCad 5.1.7 was officially released on September 30th
- C2000 Real-time Control MCU Application in Electric Vehicles
- Qorvo's Zhou Ting: Towards an ideal ultra-broadband provider
- I still don't understand the problem of using PNP npn as a switch. 8050 is used as a switch and it keeps turning on and off.
- Msp430 learning notes interrupt processing function
- "It's OK as long as it works, what else do you need?" ST Industry Summit 2019 answer sheet completed and sent a mouse disassembly diagram
- Smart electric car seesaw
- How to use STM32 to read Windows vector fonts
- Recruiting part-time DSP and other related professional lecturers or technical support personnel