Design of electronic settlement terminal based on ARM processor and CAN bus

Publisher:PeacefulAuraLatest update time:2013-02-04 Source: 电子设计工程 Keywords:ARM7 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction
    The digital transaction terminal of the electronic transaction system for agricultural and sideline products is referred to as the IC card intelligent transaction integrated machine or POS machine. It is used in the transaction process of agricultural and sideline products. When the power supply and communication are normal, the system can provide a reliable, fast and convenient transaction platform for buyers and sellers. Buyers and sellers conduct transactions on the IC card transaction terminal. The digital transaction terminal can perform multiple cumulative weighing, peeling, preset peeling, and weighing by kilogram for the same variety by reading and processing the data of the electronic scale. The IC card digital transaction terminal automatically identifies the management fee rate of the buyer and seller during the transaction, automatically transfers the transaction amount of the two parties from the buyer's IC card to the seller's IC card, and automatically deducts the management fee receivable from the IC cards of both parties.

1 Overall structural design of the system
   
The electronic settlement system is a very real-time system. If there is a deviation in logic and timing, it will cause serious consequences. This paper builds a new electronic settlement terminal that integrates card reading, display, keyboard, weighing, printing and communication functions.
    In terms of hardware, Philips' LPC2292 is used as the central processor, and PCA82C251 is used to realize the interface between the CAN protocol controller and the physical bus, so that the POS machine has the ability of two-way communication. In terms of software, the embedded real-time operating system μC/OS-Ⅱ is transplanted to realize the advantages of multi-task scheduling. On the embedded platform, the control program is written to complete the control of each functional module to meet the requirements of the processing equipment with high processing speed and processing power, and has strong real-time task scheduling capabilities.

2 System hardware design
   
The hardware platform of this system is mainly composed of an embedded processor, power supply, CAN bus interface, and various external devices. The overall structure diagram of the system is shown in Figure 1.

a.JPG


2.1
   
The main control chip of the microprocessor is the ARM7 series microprocessor LPC2292. LPC2292 is a microprocessor based on a 32/16-bit ARM7TDMI-S core that supports real-time simulation and embedded tracing. It can use 16-bit Thumb mode to reduce the code size by more than 30% for applications that have strict control over the code size, while the performance loss is very small. It has 16 KB on-chip static RAM and 256 KB on-chip FLASH program memory. 128-bit wide interface/accelerator. Two interconnected CAN interfaces with advanced acceptance filters, up to 112 general IO ports (withstand 5 V voltage), and 9 edge or level triggered external interrupt pins. Multiple serial interfaces, including two 16C550 industrial standard UARTs, high-speed I2C interface (400 Kb/s) and two SPI interfaces. It has an internal integrated PWM unit, real-time clock and watchdog. The rich on-chip resources make LPC2292 particularly suitable for industrial production control, medical systems, access control and POS machines.
2.2 Power supply and reset circuit
   
In order to keep the power supply pure, the LPC2292 core and on-chip peripherals are powered by 1.8 V and 3.3 V respectively. The LDO chip uses SPX1117M3-1.8 and SPX1117M3-3.3, which are characterized by large output current and high output voltage accuracy. Since the LPC2292ARM7 controller has independent analog power supply and analog ground pins, in order to reduce noise and error probability, the analog power supply and digital power supply should be isolated, so a 10 mH inductor is used to achieve isolation, and a large area of ​​ground is used when designing the PCB to reduce noise. Figures 2 and 3 are 1.8 V and 3.3 V power interface circuits respectively.

b.JPG

[page]

    The reset circuit uses the MAX811 chip. The MAX811 is a 4-pin microprocessor voltage monitor with the characteristics of precise power supply monitoring and low power consumption. It can monitor the power supply voltages of 3 V, 3.3 V and 5 V. The operating voltage of the MAX811 is 1.0~5.5 V. The MAX811 is a low-level active reset. The MAX811 has a manual reset function, the power supply current is 6μA, the reset threshold voltage has five types: 4.63 V, 4.38 V, 3.08 V, 2.93 V and 2.63 V, and the minimum pulse width of the power-on reset is 140 ms. When the voltage VCC of the microprocessor is lower than the threshold voltage of the MAX811, the internal timer is reset to 0 and the reset output is kept at a low level. When VCC is higher than the threshold voltage, the internal timer starts counting, and when the count reaches a given value (the overflow period of the timer), the output becomes a high level. Figure 4 shows the interface circuit of the MAX811.

c.JPG


2.3 The CAN bus
   
uses an independent CAN protocol controller SJA1000. It is a replacement for the CA82CZOOCAN controller (BasleCAN) of Philips Semiconductor, and also adds a new operating mode - PeliCAN, which supports the CAN 2.0B protocol with many new features. It is mainly used for regional network control in mobile targets and general industrial environments. Figure 5 provides a preliminary understanding of the internal structure of the CAN controller and its position in the field bus system.

d.JPG


    The PCA82C251 is the interface between the CAN protocol controller and the physical bus. It is mainly used in applications with speeds up to 1Mbaud. This device provides differential transmit capability to the bus and differential receive capability to the CAN controller. It fully complies with the ISO "11898-24 V" standard. A current limiting circuit prevents the transmitter output stage from shorting the positive and negative terminals of the battery voltage. Although power consumption will increase when this fault condition occurs, this feature prevents damage to the transmitter output stage. Figure 6 is a diagram of the internal structure of the PcA82C251, and Figure 7 is the interface circuit between the CAN protocol controller and the physical bus.

e.JPG


    The interface between PCA82C251 and CAN bus also adopts certain safety and anti-interference measures. The CANH and CANL pins of PCA82C251 are connected to the CAN bus through a resistor respectively. The resistor can play a certain current limiting role and protect PCA82C251 from overcurrent impact. Two 30 pF small capacitors are connected in parallel between CANH and CANL and ground, which can filter out high-frequency interference on the bus and have a certain ability to prevent electromagnetic radiation.
[page]

3. Design of terminal software structure of electronic trading system
   
Due to the particularity of electronic settlement, the terminal control system needs to process a large amount of transaction data in a short time and respond to external events in a timely manner. The open source embedded operating system μC/OS-Ⅱ is selected. μC/OS-Ⅱ has the characteristics of small scale, scalability, good real-time performance and easy portability. For electronic settlement systems with high requirements for real-time and stability, the introduction of μC/OS-Ⅱ will undoubtedly greatly improve its performance. In programming, ARM and Thumb instruction sets are used for mixed programming to optimize code density.
3.1 Porting of the operating system μC/OS-Ⅱ
    The μC/OS-Ⅱ operating system has good portability. If the composition of the hardware platform changes, only the hardware-related content in the operating system code needs to be modified, and the application code that is not related to the hardware does not need to be modified.

f.JPG


    The software and hardware architecture of μC/OS-Ⅱ is shown in Figure 8. It can be clearly seen from the figure that the transplantation of μC/OS-Ⅱ is actually to rewrite or modify the processor-related code. The transplantation work mainly includes three parts: modification of OS_CPU.H file, modification of OS_CPU_A.ASM file, and modification of OS_CPU_C.C file.
3.2 System main process
   
The system software adopts modular design, including main program, initialization program, card reading subroutine, keyboard scanning subroutine, display subroutine, transmission subroutine, etc. The software part of the system adopts modular design. Several small programs or modules are independently designed, programmed, tested and checked for errors, and finally connected to form a complete application. There are corresponding routines for each peripheral, which can be easily transplanted. The main process of the system is shown in Figure 9.

g.JPG


    The sample code (IC card password input section) is as follows:
    h.JPG

4 Conclusion
   
The system uses the combination of LPC2292 and CAN bus to realize the rapid real-time collection of market information stored in the database in the electronic settlement system, and realizes real-time settlement and deduction of transaction fees. The configured LCD and key modules enable the system to have a certain independent working ability. The μC/OS-Ⅱ operating system is used in the software design, which gives the system a powerful multi-task management capability and greatly improves the stability and reliability of the system. Good performance, low cost and excellent scalability make this terminal have great promotion value in the field of electronic settlement.

Keywords:ARM7 Reference address:Design of electronic settlement terminal based on ARM processor and CAN bus

Previous article:Multi-mode buoy shore-based data transceiver platform based on ARM9260
Next article:Stepper Motor Control System Based on ARM

Recommended ReadingLatest update time:2024-11-16 18:07

LPC2292 pseudo interrupt and pseudo interrupt processing
Introduction Industrial Ethernet has better performance than fieldbus and is in the process of continuous development and improvement. Therefore, the development of equipment based on industrial Ethernet has a good market prospect. The embedded controller designed in this paper adopts the microcontroller LPC2292
[Microcontroller]
Design of bidirectional converter based on ARM7 core LPC2119 chip
In these applications, switching power supplies are often required to not only control the two-way flow of energy, but also to achieve low-voltage, high-current output. When the switching frequency is not too high, as the output voltage decreases and the output current increases, rectification loss becomes the main fa
[Microcontroller]
Design of bidirectional converter based on ARM7 core LPC2119 chip
Technical Analysis of ARM7 & ARM9 Dual-core Platform
The leading products in the embedded system teaching platform market are based on ARM7 or ARM9 architecture. It is generally believed that ARM7 is a low-end product and ARM9 is a high-end product. There is also a so-called "ARM7 & ARM9 covering high-end & low-end teaching platform". It is advertised that "both sets of
[Microcontroller]
ARM7 Getting Started 15, Watchdog Timer
Main program: /**************************************************************************** * File name: main.c * Function: Run WDT and control LED1--LED4 to display output. The program starts by controlling the flashing of LED1--LED4 and * feeding the dog; then only LED1 is lit and enters an infinite loop, wa
[Microcontroller]
ARM7 Getting Started 15, Watchdog Timer
Design of ARM7 Acceleration Data Acquisition System
Introduction Accelerometers have always been an important component in acceleration testing. With the increasing application of micro-accelerometers, data signal acquisition and storage of micro-accelerometers have become extremely important. Most traditional data acquisition methods are completed using single-c
[Microcontroller]
Design of ARM7 Acceleration Data Acquisition System
Design of street lamp monitoring communication terminal based on ARM7
0 Introduction For urban street lamp management departments, anti-theft and energy saving have always been a headache, requiring a lot of manpower, material and financial resources. Because there are a large number of street lamps and their geographical locations are scattered, it brings great difficul
[Microcontroller]
Design of street lamp monitoring communication terminal based on ARM7
The beginning of ARM7 study notes
Today I saw the record of learning ARM in Baidu blog http://hi.baidu.com/ch314156/blog/category/lpc2000 arm7 ��� ѧϰ�ʼ�/index/1.  I think this method of electronic notes is very good. In addition, I am currently learning ARM, and electronic notes are convenient for my own reference. I wrote it using KEIL4 for ARM, an
[Microcontroller]
The beginning of ARM7 study notes
Design and implementation of weak signal acquisition system based on ARM7
For most data acquisition systems, the acquisition object is generally a large signal, that is, the amplitude of the useful signal is much larger than the noise. However, in some special occasions, the acquired signal is often very weak and is often drowned by random noise. In this case, only using amplifiers and filt
[Microcontroller]
Design and implementation of weak signal acquisition system based on ARM7
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
Guess you like

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号