1 Overview
Embedded processors are the core of embedded systems, and the choice of processors is key. At present, ARM processors have spread across various product markets such as industrial control, consumer electronics, and communication systems. Microprocessor applications based on ARM technology account for more than 75% of the market share of 32-bit RISC processors. ARM processors include ARM7, ARM9, ARM9E, ARM10E, SecurCore, Intel's Xscale, Intel's StrongARM, and other series. ARM7, ARM9, ARM9E, and ARM10E are four general-purpose processor series.
The ARM7 series microprocessor is a low-power 32-bit RISC processor suitable for product applications with high price and power requirements. The ARM7 microprocessor series has the following features:
(1) Extremely low power consumption;
(2) Provides a three-stage pipeline structure (fetch, decode, execute) with 0.9 MIPS/MHZ;
(3) The maximum main frequency can reach 130 MIPS;
(4) High code density and support for 16-bit Thumb instruction set;
(5) Wide range of operating system support, including Windows CE, Linux, Palm OS, etc.
ARM7 series microprocessors include ARM7TDMI, ARM7TDMI-S, ARM720T, ARM7EJ and other four types. T stands for support for 16-bit Thumb instruction set, D stands for support for on-chip debug, M stands for built-in hardware multiplier, and I stands for support for embedded ICE. According to the requirements of low power consumption, low cost, small size, multi-function and real-time performance, Philips' LPC2104 is a very good choice. The LPC2104 processor is a type of ARM processor belonging to the ARM7TDMI-S series.
The content of this paper is organized as follows: Section 2 is an introduction to the LPC2104 processor, Section 3 is the design of the system hardware, Section 4 is the design of the software, and Section 5 is the conclusion.
2 LPC2104 Processor Introduction
The LPC2104 microcontroller is a 16/32-bit ARM7TDMI-S CPU launched by Philips Semiconductors, and is equipped with 128/256K bytes of high-speed Flash memory. The 128-bit wide memory interface and unique acceleration structure enable 32-bit code to run at the maximum clock rate. Applications that have strict control over code size can use the 16-bit Thumb mode to reduce the code size by more than 30%, while the performance loss is very small. Since the LPC2104 microcontroller uses a very small 64-pin package, extremely low power consumption, multiple 32-bit timers, and up to 9 external interrupts, they are particularly suitable for miniaturized applications such as industrial control, medical systems, remote access control, and electronic cash registers. Due to the built-in wide range of serial communication interfaces, they are also very suitable for communication gateway protocol converters, embedded software modems, and various other types of applications.
LPC2104 has an ARM7TDMI-S CPU that supports real-time simulation and tracing. It also embeds 128KB of high-speed Flash memory, an ARM7 local bus that interfaces with the on-chip memory controller, an AMBA high-performance bus (AHB) that interfaces with the interrupt controller, and a VLSI peripheral bus that connects on-chip peripheral functions.
AHB peripherals are allocated a 2M-byte address range, which is located at the top of the 4G-byte ARM memory space. Each AHB peripheral is allocated a 16K-byte address space. The peripheral functions of LPC2104 (except the interrupt controller) are all connected to the VPB bus. The AHB to VPB bridge connects the VPB bus to the AHB bus. VPB peripherals are also allocated a 2M-byte address range. Starting from the 3.5G address point. Each VPB peripheral is allocated a 16K-byte address space in the VPB address space. The internal memory space of LPC2104 is shown in Figure 1:
The main features are as follows:
Very small package: TQFP48 (7 7mm2);
128K bytes on-chip Flash program memory with ISP (In-Syste Programming) and IAP (In-Application Programming) functions; 16K static RAM;
Dual UARTs. One with full modem interface; I2C, S serial ports:
Two timers. PW unit with 4 capture/compare channels; 6 outputs: real-time clock; watchdog timer;
32nd place general use I/0 outlets;
CPU operating frequency can reach 60MHz; dual power supply (CPU operating voltage range 1.65V ~ 1.95V. I/O voltage range: 3.0V ~ 3.6V); two low power consumption modes (idle and power-off).
The core structure of LPC2104 is shown in Figure 2.
3 System Design
3.1 System Function Overview
This system adopts modular structure design concept, and divides the equipment into main control module and various functional modules. As shown in Figure 3. There is a unified or specific interface between the main control module and each functional module. Users can choose different functional modules according to different needs. Various types of data can be transmitted at the same time without interfering with each other. Other functional modules can also be expanded according to market demand, such as optoelectronic communication modules. Such a design structure is not only convenient for use, but also conducive to future system upgrades.
The main control module is mainly responsible for human-computer interaction, communication with functional modules, data storage and data transmission. Users operate the functional modules and other functions of the system by controlling the main control module. Data is stored in the main control module. Then, the main control module can dial up to the Internet through a telephone line or connect to a networked PC through a USB port to send data to a server or communicate with a handheld computer through an infrared module. These three data transmission methods can meet the needs of most users.
The main control module plays a very important role in the entire system, which is equivalent to the central nervous system of a person. The following is a detailed introduction to the hardware and software design of the main control module.
3.2 System Hardware Design
According to the design concept of the whole system, the choice of processor is the key issue when designing the hardware circuit of the main control module. According to the requirements of low power consumption, low cost, small size and multi-function, Philips' LPC2104 is a very good choice.
As can be seen from the functional block diagram 4, only a few components and circuits need to be added around the LPC2104 to design a circuit for a more powerful and satisfactory main control module.
3.3 LPC2lo4 pin assignment and analog bus
LPC2104 has only 64 pins and no external bus controller. Therefore, it has no external bus, and it is not very convenient to connect an external expansion chip. However, because they are very fast, even if software is used to simulate the bus, the external expansion chip is much faster than ordinary microcontrollers. Therefore, we use the analog bus external expansion chip of LPC2104 to meet the design requirements.
In addition to the power, reset, crystal oscillator and other pins, LPC2104 has 32 programmable general I/O ports (P0.0-P0.31) with multiple functions. In system design, UART0 occupies P0.0 and P0.1; I2C occupies P0.2 and P0.3; UART1 occupies P0.8 and P0.9; buttons occupy P0.14 and P0.15. Among the remaining pins, the eight consecutive I/O ports P0.17-P0.24 are used to simulate the eight-bit data/address bus, P0.4 simulates the address latch signal ALE, P0.5 simulates the read signal RD, and P0.6 simulates the write signal WR, as shown in Figure 5.
The analog bus is designed to make up for the disadvantage of LPC2104 without external bus. Because the bus operation cannot be interrupted, the interrupt must be turned on and off before and after the bus access. The analog bus must be initialized.
3.4 Human-computer interaction
The design of the human-computer interaction part is based on the principle of minimal use, using a combination of a dot matrix LCD display module and 3 buttons. The LCD uses the MG12864-7 dot matrix LCD module from Truly, which has a display capacity of 128x64 dots and a volume of only 54cmx50cmx6.5cm. It has a 10v voltage generator and an EL backlight inverter inside. It uses a single 5V power supply, which is very suitable for portable product applications.
Since the working voltage of the LCD module is 5V and the I/O port voltage of LPC2104 is 3.3V, it is necessary to add a bus transceiver 74LVC4245 between the processor and the LCD module. As shown in Figure 6. 74LVC4245 is a dual-power bus transceiver that works under two power supplies at the same time: the A end uses a 5V power supply as VCCA, and the I/O port is connected to the digital logic circuit of the 5V device; the B end uses a 3.3V power supply as VCCA. The I/O port is connected to the digital logic circuit of the 3.3V device: the DIR pin can control the transmission direction of the bus. In this way, the 74LVC4245 can be used to easily realize the logic level conversion between the 3.3V and 5V systems. As can be seen from the circuit diagram, when LPC2104 operates the LCD module through the analog bus, P0.7 is used to control the direction of the data bus. In addition, the LCD module does not use the backlight function according to the need for power saving.
The three buttons are connected to the two external interrupt pins of LPC2104 through a logic AND gate. The button part can use the interrupt input mode, reducing the workload of the processor to poll the buttons. More importantly, the power-down wake-up function of these two external interrupts can be used. In this way, when the processor is not working, it can enter the power-down state. Only when the processor needs to respond to the button, the interrupt input of the button will wake up the processor from the power-down mode, which greatly reduces the power consumption of the processor.
3.5 Communication part
The communication of the main control module is divided into three parts: USB, UART0, and UART1. USB is used to connect the main control module and the PC. Its driver chip D12 uses the address/data bus connection method, and LPC2104 uses external interrupt 0, as shown in Figure 7. UART0 is used to communicate with various functional modules, including the infrared communication module. Except that the infrared module requires an additional L/O port (P0.25) as a control signal for selecting the baud rate, other modules only need to be connected to the three wires of UART0: TXD0, RXDO, and GND. UART1 is used to communicate with the Modem. The interface of the external Modem is the RS232 interface. In this way, the TXD1 and RXD1 of UART1 need to be converted to the level through MAX3232 and then connected to the Modem, as shown in Figure 8
3.6 Other functional components
LPC2104 has an I2C bus, which can easily expand some I2C functional devices. In order to store user personal information and a small amount of physiological data, the main control module expands a 1K E2PROM chip CSI24WC08 on the I2C bus of LPC2104. It can work under 3.3V power supply. Its I2C bus address is: Read: 0xA1, o)(A3, o)(A5, o)(A7. Write: o)(A0, o)(A2, 0xA4, 0xA6.
The LCD panel consists of a main interface and a message area. The main interface displays the currently selected function parameter settings and the current status (proceeding/failed/cancelled), and the message area displays the current online status, error cause, etc. The entire panel design is closely integrated with the button design, which is easy to use. All functions can be completed in 1-3 button presses, as shown in Figure 10.
4 System Software Design
The embedded real-time operating system PC/OS-II is used, and the mixed compilation of ARM and Thum instruction sets is used to optimize the code density.
4.1 Task Allocation and Software System Architecture
The embedded real-time operating system PC/OS-II is used. There are six tasks at the user level.
(1) Responsible for the response to the start-task button. Priority 6;
(2) Responsible for the system's working status. Priority 5;
(3) LCD module display, priority 4;
(4) Responsible for the communication task of accessing the Internet through modem dial-up, priority 3;
(5) Responsible for USB communication tasks, priority 2;
(6) Communicate with each functional module to collect and store data signals, with priority 1. The software system structure is shown in Figure 11 (a).
6 Conclusion
Based on object-oriented technology, the plastic door and window CAD system WinDoor is no longer a simple "drawing" system, and fundamentally surpasses the traditional low-level door and window design method that combines points, lines, and surfaces. Users can directly use the concepts of various components of doors and windows in the real world to design in the corresponding computer model, which conforms to the characteristics of human thinking. The dimension-driven parametric design concept is conducive to users' convenient and quick design and modification of window types, and the correctness of the design is fundamentally guaranteed, which greatly improves the efficiency and quality of doors and windows. At the same time, the design concept of this system has promotion value, and with a little modification, it can be applied to the drawing and calculation of aluminum alloy doors and windows, curtain walls, etc. in the construction industry. Figure 5 shows 6 typical window types drawn by this system!
Previous article:Design of ultrasonic emission and control circuit based on ARM
Next article:Design of X86 decoding SOC architecture based on ARM embedded platform
Recommended ReadingLatest update time:2024-11-16 22:33
- Popular Resources
- Popular amplifiers
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
- Sub-library: BlueCoin Development Platform
- [Atria AT32WB415 Review] 4. Implementation of printf under AT32 IDE (printf redirection)
- Power amplifier driving capacitive load case sharing
- Power supply zero and live wire detection
- RSL1 Bluetooth characteristic value reading and writing
- Sapphire on PCB---DFM about optical positioning points
- How to choose between different chips in TI's Sub-1GHz product line?
- Design of optimal horn antenna based on HFSS
- How to connect several cameras to a 100M switch
- Nvidia is said to acquire Arm for 40 billion pounds. Will the situation of domestic chips get worse?