The instrumentation industry and industrial production processes have higher requirements for real-time performance, processing speed, intelligence, etc. ARM microprocessors have the characteristics of low power consumption, high instruction throughput, real-time interrupt response, and high cost-effectiveness of processor macro units. Therefore, it has become an inevitable trend to introduce ARM microprocessors into the development and design of products and industrial production.
In industrial control and product design, it is generally required to have a keyboard and a visual interface for operation. The design of traditional display modules is generally connected by I/O port external expansion drive circuits, and the display generally uses LED or LCD, which is either low cost but complex to implement, or simple to implement but high cost. The author comprehensively considered the requirements of cost, ease of implementation, function and stability, and proposed a VFD display method that is easier to implement and has high contrast and accuracy.
1 Implementation of Hardware Circuit
Considering that the future market will have higher requirements for power consumption, processing speed, real-time, multi-function, multi-tasking, etc., this design uses the M2020-FNU20 embedded core board (microprocessor is LPC2220) based on Zhou Ligong's MiniARM and its M22A development board. The on-board resources of the M22A development board are:
◆μC/OS-II real-time operating system;
◆TCP/IP protocol, FAT32 file management system;
◆UART, I2C, SPI communication interface;
◆JTAG interface supports online debugging;
◆Industrial grade 10M Ethernet control interface CSB900A-IQ;
◆2 MB NOR Flash program memory, etc.
In addition, modern industrial control and product production mostly require an operable keyboard and a visual interface. This design uses the HTl6511 chip to drive the keyboard and display. Considering the impact of various adverse environments in industrial production, this design uses a VFD (vacuum fluorescent display) with high contrast, good reliability and environmental adaptability for display. HTl6511 is a typical VFD driver chip, consisting of 5 LED output ports, 1 control circuit, 1 display memory (internal) and 1 key scanning circuit. The microprocessor inputs and outputs serial data to the HTl6511 through a three-wire serial interface. Figure 1 is a block diagram of the system hardware circuit, which mainly includes the connection between LPC2220 and the driver chip HTl6511. The connection between the HTl6511 and the VFD display uses the 12×4 key scanning circuit and indicator light and switch circuit expanded by the HTl6511.
2 Software Design
The software adopts modular design method and uses priority-based system scheduling method to implement each module. Each module is set as a task, such as task0 is a key value reading module, task1 is a display module, etc. A fixed priority is set for each module. When the task is executed, it will automatically suspend. The suspension time can be set by yourself. After the task is suspended, it enters the waiting state. When the suspension time is up, the task automatically enters the ready state.
The development board is embedded with μC/0S-II real-time operating system. This design uses a preemptive kernel. If the system is executing a task with a lower priority and one or more tasks with a higher priority are ready, the task with the lower priority will be interrupted to execute the task with the highest priority. After the execution is completed, the system will not return to the interruption point immediately, but will execute the task with the highest priority among the currently ready tasks; when there is no higher priority task ready, the system will return to the original interruption point. If some modules in the program (such as reading key values, push display, etc.) do not want to be interrupted, it is necessary to turn off the interrupt at the beginning of entering the module and turn on the interrupt after execution. The following is the implementation of each functional module.
2.1 HT16511 Read/Write Program
Figure 2 shows the data read/write timing of HT16511. Among them, tcw is the clock pulse width, the minimum value is 400 ns; tsu is the data upload time, the minimum value is 100 ns; th is the data hold time, the minimum value is 100 ns; tcs is the clock adjustment time, the minimum value is 1μs; tph1 and tplh are data transfer delay times, the maximum value of tph1 is 300 ns, and the maximum value of tplh is 100 ns.
As can be seen from Figure 2, CS must be set low when reading/writing data; during the data writing process (D1), the data is sent to the data line at the falling edge of the clock (CLK), and after the data is sent, CLK needs to be set high and maintained for a tcw time; when reading data, CLK needs to be set high for a period of time, and then pulled low for a period of time before starting to read data from the data line. [page]
The following program is to write a character to HTl6511:
2.2 Main driver
The driver mainly includes display driver and key driver.
Figure 3 shows the general command sequence of the HT16511 display driver. In the figure, command 1 sets the display mode; command 2 sets the read/write data mode; command 3 sets the start address of the read/write data; data 1 to n are the data to be read/written; command 4 sets the display brightness of the VFD.
The display driver mainly includes writing commands to the HT16511 and writing data to control the display; while the key driver mainly reads the key values from the HT16511 and then splices them into valid key values. From the timing sequence in Figure 3, we can see that we should first set the display mode, then set the read/write data mode and the start address of the read/write data, then send the data, and finally set the display brightness. A delay is required after each command or data is sent. [page]
The display driver is:
Conclusion
In practical applications, it is only necessary to define HTCS, HTCLK, HTD0, and HTDI as general bidirectional I/O ports of the microprocessor. Determine the glyph code for displaying data or letters according to the VFD truth table used. Use an array disp port to store these glyph codes, and use the above update_disp() function to send the array to the HTl6511 driver chip to complete the display. For key scanning, use the read_key() function to read the key value and put it in the data register.
This design uses an ARM microprocessor to realize a multi-function keyboard display, which has the advantages of easy implementation, high cost performance, high display accuracy, high display contrast, and fast response speed. Therefore, this design is suitable for many industrial applications with high requirements. The driver module of HTl6511 is suitable for various types of microprocessors. This design uses an ARM7 microprocessor to achieve this, mainly considering the high requirements for power consumption, processing speed and functions in modern product and industrial process design. This design has a certain degree of versatility and adapts to the general trend of industrial production development.
Previous article:Decoding and playing of MP3 in embedded GPS voice navigation system
Next article:Analysis of the implementation of Spinlock in Linux on ARM and X86 platforms
Recommended ReadingLatest update time:2024-11-16 19:42
- Popular Resources
- Popular amplifiers
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- ARM Embedded System Principles and Applications (Wang Xiaofeng)
- ARM Cortex-M4+Wi-Fi MCU Application Guide (Embedded Technology and Application Series) (Guo Shujun)
- 3D display technology and devices (Wang Qionghua)
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
- About JLink automatic firmware update problem
- On the feasibility of the traditional brake transformation of stepper motor
- Isolated Buck Converter PCB Layout Tips
- How GaN helps cable providers find the balance
- TI DaVinci Technology
- Award-winning review: Mir Allwinner automotive-grade CPU development board MYC-YT507
- [Evaluation of Anxinke Bluetooth Development Board PB-02-Kit] A/D data acquisition and testing
- MSP430 and ATK-NEO-6M GPS module
- LCD Double Buffering Implementation on S3C2410 Bare Metal
- Electromagnetic compatibility principles and design