Abstract: The ATM system uses the highly reliable AT89C52 microcontroller as the core control chip, and uses the FM24C02 chip with an I2C bus interface to store passwords and amounts. The operating status and operation steps are displayed on a 128x64 LCD. The software design uses the C51 language with good portability and readability to write programs, so as to modify and add or remove functions. The simulation process of the ATM is successfully implemented through Proteus software. The simulation shows that using Proteus software for simulation design can greatly simplify the debugging of the microcontroller program on the target hardware.
introduction
Automatic teller machine, referred to as ATM (Automatic Teller Machine), uses modern technology to realize automatic withdrawal, password change, balance inquiry and other operations. It is a kind of machine equipment for electronic business, and is favored by people because of its convenience and practicality. This paper designs an automatic teller machine system to simulate the basic functions of the automatic teller machine (withdrawal, balance inquiry, password change, card withdrawal), so that people can understand the use of Proteus software to realize the simulation process of the automatic teller machine.
1 Overall system design
The system is mainly composed of microcontroller module, LCD module, keyboard input module, storage module and buzzer circuit. The system structure is shown in Figure 1.
The microcontroller module mainly controls the entire system operation process; the LCD display module simulates the human-computer interaction interface of the ATM; the keyboard input module completes the password input and modification functions; the storage module completes the storage function of the simulated bank card password and amount.
2 System Hardware Circuit Design
The system hardware circuit simulation diagram is shown in Figure 2. The microcontroller uses Atmel's AT89C52, the memory uses the FM24C02 chip with an I2C bus interface, and the liquid crystal display uses an LCD 128x64 module.
The LCD module is a 128x64 dot Chinese graphic LCD module that can display Chinese characters and graphics. It has 8,192 Chinese characters (16×16 dot), 128 characters (8×16 dot) and 64x256 dot display RAM (GDRAM). It can be directly connected to the microprocessor and provides two interfaces to connect to the microprocessor: 8-bit parallel and serial connection. Using the flexible interface mode of this module, a full Chinese human-computer interactive graphical interface can be constructed.
FM24C02 is a 2 048-bit serial electrically erasable read-only memory with an internal structure of 256 B. Its function is to store the password and amount of the simulated bank card.
As shown in Figure 2, the P0 port of AT89C52 is connected to the data port DB0~DB7 of LCD 128x64 through the pull-up resistor RPt, so that the read or written data is displayed on the LCD module. P1.0~P1.5 realizes the operation of simulated bank cards, such as password input and modification, balance query, withdrawal, card withdrawal, etc.; P2.0, P2.1, P2.2 are respectively connected to the enable end of LCD 128x64, read/write data control port and chip select port; P2.5, P2.6 ports are used as the input ends of the simulated bank card "CARD1", "CARD2" buttons. When the LCD 128x64 liquid crystal display interface shows "Please insert the card", pressing the corresponding button indicates that the bank card has been inserted; P3.0~P3.6 ports realize the scanning of the keyboard, and realize the functions of password input and modification; P3.7 is connected to the buzzer circuit. When the simulated bank card is operated, a sound will be emitted to prompt that the operation has been completed.
3 System Software Design
The system software includes the main program module, keyboard input scanning module, LCD display module, etc. C51 language is used to program each module of the system. The system program flow is shown in Figure 3.
3.1 Main program module
The main program is mainly used to define global variables, assign initial values to global variables, initialize E2PROM, read or write passwords from FM24C02, drive the display, etc., to provide data for the entire program. The subroutines for reading/writing data from FM24C02 are as follows:
3.2 Keyboard input scanning module
The module has the functions of scanning the keyboard to determine the specific position of the pressed key, judging whether any key is pressed, eliminating jitter, and judging whether the closed key is released.
3.3 LCD Module
This module includes LCD initialization, command input, and display data input.
The subroutine for writing data to LCD 128x64 is as follows:
4 System Simulation Results
This paper uses Proteus software with powerful EDA simulation function for simulation, and the simulation test results are shown in Figure 4.
When the "play" button in the running Proteus software is pressed, the system is started, and the LCD screen displays the interface shown in Figure 4(a). Press the "CARD1" button or the "CARD2" button in the simulation circuit, and the screen shown in Figure 4(b) appears. Enter the bank card "CARD1" or "CARD2" password in the keyboard input interface. If an error occurs during the password input process, press the "key0" key to modify it. After the password is entered, press the "key1" button in the simulation circuit diagram to confirm. If the password is entered incorrectly, the interface shown in Figure 4(c) appears. After 3 seconds, it turns to the interface shown in Figure 4(d) and re-enters the password. If the password is entered incorrectly 3 times or more, the interface shown in Figure 4(e) appears, prompting "This card has been frozen". Press the "key1" button again to take the card; if the password is correct, the interface shown in Figure 4(f) appears. In the interface shown in Figure 4(f), press the "key0" button to select the "Change Password" function, and the interface in Figure 4(g) will appear. Enter the new password. After the change is successful, jump to the interface in Figure 4(h); press the "key2" button to select the "Check Balance" function, and the interface in Figure 4(i) will appear; press the "key3" button to select the "Withdraw" function, and the interface in Figure 4(i) will appear. Select the corresponding amount button and press it (key0 button represents 1,000, key2 button represents 2,000, and key3 button represents 3,000). Then the interface in Figure 4(k) will appear. Press the "key4" button to withdraw money, and the interface will jump to Figure 4(1) to complete the withdrawal operation. If you want to continue to select business functions, press the "key5" button, and the interface will jump back to the interface in Figure 4(f); if you want to withdraw a card, press the "key1" button, and the interface will jump back to Figure 4(a), and operate the reinserted bank card.
5 Conclusion
This paper uses Proteus and Keil μVision3 software to simulate and implement the ATM system. From the simulation results, it can be seen that using Proteus software for simulation design can greatly simplify the debugging of the microcontroller program on the target hardware, and it can also intuitively display the system's operating interface, realize the basic functions of the ATM, and prove the feasibility and correctness of this design.
Previous article:Research on the Application of C8051F020 in LCD Control System
Next article:Improved keyboard circuit for P1 port
Recommended ReadingLatest update time:2024-11-16 12:24
- Popular Resources
- Popular amplifiers
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Single-chip microcomputer C language programming and simulation
- 100 Examples of Microcontroller C Language Applications (with CD-ROM, 3rd Edition) (Wang Huiliang, Wang Dongfeng, Dong Guanqiang)
- Single chip microcomputer control technology (Li Shuping, Wang Yan, Zhu Yu, Zhang Xiaoyun)
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
- Electric mask solutions
- 【Project Source Code】FPGA-based Ethernet design tutorial and program source code
- [ESP32-Audio-Kit Audio Development Board Review] Part 3: Comments on the Installation of the Development Environment
- Caibo International Customer Service Life Quotes
- Are there any good high current sensor chips now?
- Tesla's 60G millimeter wave radar image inside a car
- EEWORLD University ---- Electronic Materials (University of Electronic Science and Technology of China)
- For NPN tubes, the c and e poles of U(br)ceo are both N-type, so where does the reverse statement come from?
- AWR1642: Add I2C driver support to the existing mmWave SDK demo
- 【GD32E503 Review】+ Littlefs Porting