About the keyboard and VFD display interface technology of ARM7

Publisher:RainbowGardenLatest update time:2012-12-08 Source: 维库开发网Keywords:ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
introduction

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.

Keywords:ARM7 Reference address:About the keyboard and VFD display interface technology of ARM7

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

Development of a new embedded ECG monitor based on ARM7
1. Introduction Cardiovascular disease is currently the most harmful disease to humans, and electrocardiogram is the main means and basis for checking, diagnosing and preventing such diseases. Because traditional PC-based ECG monitors are expensive, bulky, inconvenient to move and mainly concentrated in lar
[Microcontroller]
Development of a new embedded ECG monitor based on ARM7
arm7 Litian Electronics lpc2148 GPIO pattern water light
The LPC2148 development board of Litian Electronics has four running lights. They are connected to the SN74HC595D and then connected to the 2148 processor. First light up the two on the sides (16, 19), then light up the two in the middle (17, 18). When turning off, turn off the two on the sides first, then the one in
[Microcontroller]
ARM7 Getting Started 11, IIC Communication
If D1 is lit, it is correct; if D1 is blinking, it is wrong. Main program: /******************************************************************************* *File: Main.C *Function: Use hardware I2C to operate EEPROM, and use interrupt mode to operate ***********************************************************
[Microcontroller]
ARM7 Getting Started 11, IIC Communication
Application of ARM7 Embedded System in Vehicle Dispatch
1. Overall design of vehicle dispatching system: The whole system consists of four parts: (1) communication master station; (2) vehicle-mounted slave station; (3) communication link; and (4) system monitoring part. The following is a brief introduction to the functions of each part. (1) Communication maste
[Microcontroller]
Application of ARM7 Embedded System in Vehicle Dispatch
Build a simple robotic arm using ARM7 LPC2148 microcontroller
  Robotic arms are one of those fascinating engineering creations, and it's always fascinating to watch these things tilt and translate to accomplish complex things just like a human arm. These robotic arms are commonly found in industries that perform high-intensity mechanical work such as welding, drilling, and pain
[Microcontroller]
Build a simple robotic arm using ARM7 LPC2148 microcontroller
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号