Embedded Data Acquisition System Based on ARM7 Processor LPC2104

Publisher:NexusDreamLatest update time:2010-09-12 Source: 计算机工程与应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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!

Reference address:Embedded Data Acquisition System Based on ARM7 Processor LPC2104

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

Clock mechanism of ARM Linux system
1. There are two types of clocks under Linux: 1.1 Real-time clock RTC It is driven by the onboard battery "Real Time Clock" also called RTC or CMOS clock, hardware clock. When the operating system is shut down, it uses this to record the time, but it does not use this time for the running system. 1.2 System Cloc
[Microcontroller]
Looking back at the 15 years of Arm TechCon, how Arm has changed technology development
The annual Arm TechCon developer conference is about to be held, and Arm staff wrote a blog to review some of the highlights of Arm TechCon in the past 15 years. In October 2004, the first Arm TechCon was held. At that time, Google was paying attention to an unknown startup Android, and Mark Zuckerberg had just launc
[Semiconductor design/manufacturing]
Looking back at the 15 years of Arm TechCon, how Arm has changed technology development
Talk about the difference between ARM7 and ARM9
Due to my job, I often answer questions from ARM beginners. Although the questions are varied, the following two questions are definitely representative. What are the differences between ARM7 and ARM9? I am planning to learn ARM, but I don’t know whether to choose ARM7 or ARM9? Maybe these problems are no longer a p
[Microcontroller]
The latest progress of Arm Star Processor: 30 customers have authorized it, and 7 projects have been taped out
Liu Shu, vice president of product development at Arm China, disclosed the latest progress of the launch of its first and currently only self-developed 32-bit embedded processor IP "Star (STAR-MC1)": 30 customers have obtained the IP license of "Star", of which 21 customers have started projects, and 7 projects have b
[Embedded]
The latest progress of Arm Star Processor: 30 customers have authorized it, and 7 projects have been taped out
Application of floating point unit in ARM processor under Linux
1). Introduction to Floating Point Unit (FPU) Float Point Unit, floating point unit is a coprocessor dedicated to floating point operations. In the field of computing, such as trigonometric functions and time domain and frequency domain transformation, floating point operations are often used. When the CPU executes a
[Microcontroller]
【ARM】2440 bare metal series-Image display
Function LCD display Chinese characters, characters and pictures illustrate Chinese characters, characters and pictures need to use the corresponding module software to get the corresponding c file, and then include it in the project Main code 1) Draw the background 1 2 3 4 5 6 7 8 9 10 11 void Brush_ U32  c) {
[Microcontroller]
【ARM】2440 bare metal series-Image display
Design of ADSL2+ Tester Based on ARM
  introduction   In recent years, Asymmetric Digital Subscriber Line (ADSL) has been widely used around the world as an ideal solution to the "last mile" problem of the network. In China, ADSL services have become one of the main sources of revenue for operators. However, since the existing telephone lines are designe
[Test Measurement]
Design of ADSL2+ Tester Based on ARM
Ming-Chi Kuo on the dispute between Arm and Qualcomm: The probability of canceling the authorization is extremely low, and if it happens, both sides will suffer
On October 24, Bloomberg reported yesterday that Arm plans to cancel the license that allows its long-term partner Qualcomm to use Arm intellectual property to design chips. Today, analyst Ming-Chi Kuo wrote, "I think the chances of ARM cancelling Qauclomm's license are extremely low. If it happens, both
[Semiconductor design/manufacturing]
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号