Portable human-machine interface system based on STM32

Abstract : A portable human-machine interface system based on STM32 processor is designed for total station measurement and calculation. The processor IO port analog bus timing and the external SPI interface Flash memory font library are used to store the word library in the external SPI interface Flash, and then query and recall from the font library during use, thereby effectively reducing the internal memory consumption. Completed the hardware circuit design and software program design based on ARM's latest Cortex-M3 processor Chinese character display system. A human-machine interface system that can customize the Chinese character font is implemented.

In the measurement process of total station instrument used in aircraft, it often involves calculation to meet different application environments and measurement requirements. The previous method is to realize the post-editing software on the computer. Modern measurement urgently needs a portable handheld computing system. To complete real-time measurement requirements, and the Chinese human-machine interface in this system becomes a de facto industry standard. A TFT LCD that displays Chinese characters and a keypad that can input numbers have become an integral part of smart devices. At the same time, the low power consumption characteristics of the basic requirements of portable devices are also throughout the design of the Chinese human-machine interface. This low-power Chinese human-computer interaction interface requires special considerations in selecting processors and specific components. Micropower and high performance should be the primary requirements for selecting related devices. In this paper, STMicroelectronics' STM32F103RB based on ARM's latest Cortex-M3 core is selected as the main control chip. By selecting the appropriate LCD module, a high-performance and low-power Chinese human-machine interface system is constructed.

1 How the system works

The system uses STM32F103RBT6 as the core, and uses the AM240320TFT LCD screen of Crystal Color Optoelectronics as the display to complete the content display. Since the internal flash of STM32F103RBT6 is 128 K, if it is used to store Chinese character font, it is a great waste to the chip resources. In this paper, the design idea of ​​the external SPI interface Flash of the microcontroller is adopted, and the Chinese character inventory without repeated changes is placed in the external Flash chip, and then transferred to the processor through the SPI port when needed. Since the STM32F103RBT6 does not have an FSMC, the software is used to simulate the bus to complete the driving of the liquid crystal module.

2 system hardware design

2.1 Power supply part circuit

Since the entire system is powered by 3.3 V, an external voltage regulator circuit must be used to stabilize the voltage to 3.3 V. In this design, the three-terminal regulator chip LM1117-3.3 is used to stabilize the external battery voltage to 3.3 V. The bit system provides power supply for the processor, liquid crystal display, and SPI Flash. The diode IN4007 is connected in series to the positive pole of the power supply to provide reverse power protection for the system. The schematic diagram of the power supply part is shown in Figure 1.

Power supply part schematic

2.2 LCD display part of the circuit design

The liquid crystal display part is mainly driven by the microcontroller to drive the liquid crystal display module to complete the display of the human-machine interface state, and the initialization of the liquid crystal module and the display of the Chinese characters are completed by sending a command word.

2.2.1 Features of STM32F Series ARM Microcontrollers

The STM32 processor uses ARM's latest V7 architecture core Cortex-M3, which is one-third faster than ARM7 and consumes three-quarters less power. It also integrates branch prediction, single-cycle multiplication, hardware division and other functions. , greatly improve the processor's data processing capabilities, while using the latest Thumb-2 instruction set, effectively reducing the density of the code, improving the efficiency of the program, through the analysis of power consumption and performance, used in this paper The processor is STM32F103RBT6, which operates at 72 MHz, has built-in high-speed memory (up to 128 Kbytes of flash memory and 20 Kbytes of SRAM), a rich set of enhanced I/O ports and is connected to two APB buses. Assume. The supply voltage is 2.0 to 3.6V. A series of power-saving modes ensure the requirements of low-power applications and achieve a balance between performance and power consumption.

2.2.2 Characteristics of TFT liquid crystal display module

The TFT liquid crystal display is a thin film transistor type liquid crystal display. The TFT liquid crystal is provided with a semiconductor switch for each pixel, and each pixel can be directly controlled by a dot pulse, so each node is relatively independent and can be continuously controlled. Not only does it improve the response speed of the display, but also the display level can be precisely controlled, so the color of the TFT liquid crystal is more true.

Since most ARM processors with LCD controllers do not have internal program memory and data memory, the general Cortex-M3 core microcontrollers do not have a dedicated LCD controller for those without an LCD controller. The system generally uses the Intel 8080 interface or the Motorola 6800 interface. In this system, the STM32 high-speed IO port is used to simulate the 8080 interface timing. In summary, the selected TFT liquid crystal must meet two conditions, first, with independent memory. Second, with the 8080 interface. The design uses the AM2403 20TFT LCD screen of Taiwan using Crystal Color Optoelectronics. Its main control chip is ILI9320, with its total size of 172 820 (24Ox320x18/8) memory, the 16-bit data line of the module and the corresponding inch For the 565 mode, it supports a variety of control input signals including the 8080 interface.

STM32 uses an external 8 MHz crystal as the input clock. The internal phase-locked loop multiplies the clock to 72MHz as the system clock. It uses GPIO port to simulate 8080 sequential parallel drive of 2.8-inch TFT screen, showing part of the processor and LCD hardware. The circuit interface circuit is shown in Figure 2.

Hardware circuit interface circuit

2.3 SPI interface Flash storage stack features

Since the entire Chinese character font needs to be stored in the external Flash in this system, it is necessary to select a Flash memory chip, and the Flash chip selection needs to meet the following requirements. First, try to occupy as few IO ports, because the LCD has adopted a parallel interface. If you continue to use the parallel interface Flash, the IO consumption of the chip is large, so it is necessary to select more IO chips. For portable devices. This is unreasonable, so the Flash used in the design process of this system is SST's SST25VF080B, which uses SPI interface. SPI is a high-speed, full-duplex, synchronous communication bus, and the pin of the chip. It only takes up four wires, which saves the pins of the chip. At the same time, it saves space and facilitates the layout of the PCB. It is because of this simple and easy to use feature that more and more chips are integrating this communication. Protocol, the SPI Flash in this article uses SST25VF080B chip of SST Company of USA, the capacity is 8 M bit, its working voltage range is 2.7~3.6 V, it works in SPI mode 0 or mode 3, the highest working at 50MHz, the minimum The sector is erased in units of 4K bytes and can be erased 100,000 times. The data is kept for more than 100 years. The STM32F103RBT6 has a high-speed hardware SPI interface that makes it easy to communicate with the SST25VF080B. Therefore, we use SPI Flash to complete the storage of Chinese character fonts. The hardware circuit interface diagram of the word library storage part is shown in Figure 3.

Hardware circuit interface diagram of the word library storage part

Big Water Tank Vacuum Cleaner

Big Water Tank Vacuum Cleaner,Vacuum Cleaner,Vacuum Cleaner With Socket,Vacuum Cleaner For Roads

NingBo CaiNiao Intelligent Technology Co., LTD , https://www.intelligentnewbot.com

This entry was posted in on