Abstract: Based on the main issues in the current teaching of the “Principles and Applications of Microcontrollers” course, this article introduces the application of virtual simulation technology in microcontroller education. Taking the application of a seven-segment display as an example, the specific process of simulating a single-digit stopwatch using Proteus and Keil software is described. Practical teaching shows that introducing virtual simulation technology into microcontroller education significantly improves teaching effectiveness.
Keywords:Microcontroller; Virtual Simulation Technology; Proteus; Keil; Seven-Segment Display
0 Introduction
The “Principles and Applications of Microcontrollers” course is a very important core course for majors in electrical engineering and automation, computer science, and electronic information at universities. It is also a course that students must master to participate in university subject competitions and technological innovation activities. Learning and mastering embedded system design with microcontrollers as controllers helps students face the challenges of China’s Manufacturing 2025 and the Industry 4.0 era after graduation[1-2]. Microcontroller technology involves knowledge in many areas such as digital electronics, communication, microcomputer interfaces, and programming, making it a technology that combines software and hardware. Traditional teaching generally follows a theory-first, practice-later approach, leading to a disconnect between theory and practice. Additionally, the limited class hours for practical experiments result in students finding theoretical knowledge obscure, circuits, and programs not intuitive enough, and too few hands-on training opportunities, causing them to lose interest in learning about microcontrollers, leading to unsatisfactory teaching outcomes. Therefore, traditional microcontroller education can no longer meet the needs for cultivating high-quality applied professionals. By using Proteus and Keil software, virtual simulation technology can be applied to various aspects of microcontroller course teaching, cultivating students’ design capabilities in hardware and software, and enhancing their practical and innovative skills. This article uses the commonly used seven-segment display in microcontroller systems as an example to detail the specific applications of virtual simulation technology. Practice shows that virtual simulation technology visualizes and makes the abstract content of microcontroller teaching intuitive, transforming dull theoretical knowledge into lively and interesting content, thereby stimulating students’ interest in learning and improving teaching outcomes.
1 Current Status and Problems of Microcontroller Teaching
1.1 Classroom Teaching is Abstract and Not Intuitive
The traditional microcontroller course mainly uses a combination of blackboard writing and multimedia presentations for theoretical teaching in the classroom, followed by verification experiments in the laboratory using microcontroller experiment boxes and computers. This model often leads to a disconnect between classroom learning of theoretical knowledge and practical operations in the lab[3-4]. In classroom theoretical teaching, the internal principles of microcontrollers and software programming are mainly explained, often resulting in abstract content that is difficult for students to understand. Classroom examples cannot verify whether the interface circuits are feasible, whether the programmed software is effective, or whether the results of the program in the circuit are correct, leading to a lack of intuitive experience and understanding for students, making them feel bored and less motivated to learn. In the laboratory experiments, the experiment boxes and programs are ready-made, and most experiments are verification experiments that only require simple connections, preventing students from understanding the specific working principles of microcontroller interface circuits, thus diminishing their interest in learning.
1.2 Limitations of Practice Due to Time and Resources
The practical requirements of microcontrollers are relatively high. Compared to traditional teaching modes, after theoretical teaching, students enter the laboratory for practice, where they often can only conduct verification of microcontroller application systems within the experiment boxes, limiting their ability to design for specific functions. Moreover, during the connection of computers, power supplies, and experiment boxes, any operational errors can damage circuit boards and simulation interfaces, preventing students from seeing experimental results[5]. Due to time and resource constraints, students have limited contact hours with experiment boxes, leading to fewer hands-on training opportunities, restricting their ability to fully exert their initiative and limiting their comprehensive design capabilities and innovative awareness.
2 Application of Virtual Simulation Technology in Microcontroller Teaching
In the teaching process of microcontrollers, Proteus and Keil software can be used to establish a virtual experimental platform for microcontrollers, applied to classroom teaching and experimental practice.
Proteus[6] is a simulation platform software developed by Labcenter Electronics in the UK, designed for the design and development of microcontroller systems, featuring a rich array of device resources. It also provides a large number of analog and digital components and external devices, including various virtual instruments such as voltmeters, ammeters, oscilloscopes, and signal generators, which can be used to simulate and analyze various analog circuits and integrated circuits, enabling interactive simulation of integrated systems composed of microcontrollers and their peripheral circuits. Keil[6] software, produced by the German company Keil, is a commercial software tool that is currently the most popular development tool for the 80C51 series microcontrollers. Using Keil software, executable HEX files for microcontrollers can be compiled and generated, which can then be loaded into the microcontroller in the hardware circuit diagram drawn in Proteus for simulation.
Proteus software and Keil software can create a fully equipped virtual microcontroller laboratory that requires only one computer, allowing for hardware design, software design, and system debugging of microcontrollers. In the classroom, students can intuitively observe the simulation process and experimental results of the microcontroller system through the virtual laboratory, deepening their understanding of theoretical knowledge. In experimental practice, students can design microcontroller systems anytime and anywhere through simulation software, simulating and verifying the rationality of circuit designs, thus saving the process of creating actual circuit boards and allowing for flexible and efficient modifications to circuit designs without component wastage[7]. The application of virtual simulation technology in microcontroller teaching can compensate for the shortcomings of traditional teaching, improve classroom efficiency and learning interest, and enhance students’ innovative practical abilities.
Below, we will introduce the detailed process of simulating a microcontroller application system using Proteus and Keil software, taking the application of a seven-segment display as an example.
3 Teaching Example of Seven-Segment Display Application
The seven-segment display is a commonly used digital display device, known for its low power consumption, long lifespan, and compact size, and is widely used in microcontroller control systems[8]. The teaching content of the seven-segment display is usually placed in the application of microcontroller parallel ports. After teaching the basic working principles of the seven-segment display, simulation can be conducted using Proteus software to assist classroom instruction, helping students gain a deeper understanding of microcontroller control of the seven-segment display. This article illustrates this with the design of a single-digit stopwatch.
3.1 Design Requirements
Using a microcontroller and a seven-segment display to design a single-digit stopwatch, it should initially display 0, then increment the display every second, cycling from 0 to 9. Design the Proteus simulation circuit, write the program, and validate the simulation circuit.
3.2 Hardware Design
The AT89C51 microcontroller serves as the main control core of the single-digit stopwatch. It first forms the minimum application system of the microcontroller with an oscillator circuit and a reset circuit, and then drives a common cathode seven-segment display to dynamically show the time, connecting any of the microcontroller’s P0, P1, P2, or P3 ports to the seven-segment display, while a latch is needed to hold the output values. Open the ISIS 7 Professional interface of Proteus software, add the corresponding electronic components from the rich electronic component library using keyword searches, and connect them to draw the circuit schematic as shown in Figure 1. The names, keywords, and parameter attributes of the electronic components used are detailed in Table 1. The circuit schematic built in Proteus closely resembles the real circuit, making it very intuitive and easy for students to understand the hardware composition of the system.
3.3 Software Design
This example uses C language for program design. To display the corresponding numbers on the seven-segment display, the microcontroller must output the corresponding segment code values from its P0 port. To achieve a cyclic display from 0 to 9, the corresponding segment code values can be output through the P0 port using a lookup table, cycling every second. We can store the segment code values for the common cathode seven-segment display from 0 to 9 in the external program memory of the microcontroller, defining the array as: unsigned char codeLED_CODE[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}.
Table 1 Component Information
If the timer/counter of the microcontroller has been taught, students can be guided to use the interrupt method of the timer/counter to generate an accurate 1-second timer; if the timer/counter has not yet been covered, students can be guided to use software delay methods to achieve a non-precise 1-second delay.
3.4 Simulation Debugging
Using the Keil software compiler to write the C language program, the final executable HEX file for the microcontroller is generated. In the simulation circuit of Proteus software, double-click the AT89C51 microcontroller, load the executable HEX file into the chip, and click the Play button to run. By observing the results, the correctness of the hardware and software design can be determined. After running the example in this article, the seven-segment display can be seen cycling through numbers 0 to 9, along with the voltage levels at each circuit port. Additionally, the step execution and pause buttons can be clicked to observe the execution status at a specific moment in the circuit. The simulation result at a certain moment in this article’s example is shown in Figure 2, where the common cathode of the seven-segment display is grounded, indicating it is a common cathode display. The latch’s one end shows the output voltage level from the microcontroller’s P0 port, while the other end connects to the seven-segment display.
3.5 Extended Practice
After achieving a single-digit stopwatch through the above virtual simulation, students can be encouraged to create a physical version of the validated circuit and program, either using the laboratory’s microcontroller experiment box or by soldering their own circuit boards. Students can even be encouraged to think divergently, expanding from a single-digit stopwatch to multi-digit stopwatches, perpetual calendars, and other systems, promoting various innovative practices outside of class, thereby mastering the interface circuits of the seven-segment display and microcontroller.
The seven-segment display is a commonly used display device in microcontroller systems. Through the simulation practice of a single-digit stopwatch, students can master the interface circuits of the seven-segment display and microcontroller as well as software programming, aiding and promoting their future development and application of microcontroller systems.
4 Conclusion
In the classroom and practical aspects of microcontrollers, using virtual simulation technology allows students to fully engage with and utilize modern information technology’s hardware and software, visualizing abstract theoretical knowledge through simulation technology, thus helping students gain an in-depth understanding of the structure, principles, applications, and programming of microcontrollers. Additionally, virtual simulation technology can overcome the limitations of hardware experimental resources, allowing students to use their computers to obtain more hands-on practice opportunities anytime and anywhere. They can also choose components and instruments that are not accessible in the laboratory, actively completing various project tasks under the guidance of teachers, thereby enhancing teaching effectiveness, encouraging self-directed learning, and developing students’ practical abilities, thus stimulating their innovative thinking and microcontroller development and application capabilities.
References
[1] Zhou Ji. Intelligent Manufacturing: The Main Direction of “China Manufacturing 2025” [J]. China Mechanical Engineering, 2015, 26(17):2273-2284.
[2] He Zhengchu, Pan Hongyu. Germany’s “Industry 4.0” and “China Manufacturing 2025” [J]. Journal of Changsha University of Science and Technology (Social Science Edition), 2015, 30(3):103-110.
[3] Liu Qing, Ren Xiaofang. Application of Proteus Simulation Software in the Course of Principles and Applications of Microcontrollers [J]. China Educational Technology Equipment, 2016(20):52-54.
[4] Lou Junjun, Cheng Qiming, Huang Yunfeng, et al. Application of PROTEUS Simulation Software in Innovative Teaching Reform of Microcontroller Courses [J]. Journal of Lanzhou Petrochemical Vocational Technology College, 2017, 17(1):64-66.
[5] Liu Xingwang. Reform Methods for Microcontroller Experimental Teaching Based on Proteus and Keil [J]. Electronic World, 2016(17):37-38.
[6] Zhang Lanhong, Zou Hua, Lu Guangping. Principles and Applications of Microcontrollers [M]. Beijing: Mechanical Industry Press, 2012.
[7] Zhang Yingping, Wang Lizhong, Wang Chunwu, et al. Application of Proteus Simulation Software in the Reform of Microcontroller Course Teaching [J]. Journal of Langfang Normal University (Natural Science Edition), 2016, 16(2):120-122.
[8] Xu Wei. 51 Microcontroller Comprehensive Learning System: Principles and Applications of the Digital Tube [J]. Electronic Production, 2007(1):26-27.
Fund Project: Henan Provincial Key Research Project Plan (17A416005); Nanyang Normal University Doctoral Special Project (ZX2016011); Nanyang Normal University Teaching Research Project (2016-JXYJYB-07, 2016-JXYJYB-03); Nanyang Normal University Classroom Teaching Model Reform Project (2016-KTJX-19); Henan Provincial Teacher Education Curriculum Reform Research Project (2016-JSJYZD-043, 2018-JSJYZD-030); Nanyang Normal University 2015 Annual Teaching Research Key Project.
Author Profile:Cheng Yiyuan (1985—), female, from Nanyang, Henan, PhD, mainly engaged in research on the design and development of medical instruments, image processing, artificial intelligence, etc.
Classification Number: G 642.0