The Design of OBE Blended Teaching Case Based on Rain Classroom—Taking MCS-51 Microcontroller External Interrupt Teaching as an Example

: In view of the current situation that most students have difficulty in understanding and mastering the interrupt system in the teaching of MCS-51 microcontroller C language, a teaching case based on the OBE concept is designed with the teaching of external interrupt of microcontroller as the carrier and the rain classroom as the platform. The teaching case organically integrates online and offline teaching, uses project teaching method, guides students to know interrupts through analogy, understand and master the role and setting of interrupt control registers, learn to program interrupt functions, and lay a solid foundation for embedded system design learning.


Introduction
With the development of technology, artificial intelligence is penetrating into all aspects of society. As the door knocker of artificial intelligence, although it has been nearly 50 years since the MCS-51 microcontroller appeared, the application of microcontroller is still very wide. However, since most students have not been exposed to microcontroller in high school, they do not understand the basic process of program control machine hardware, therefore, the learning of microcontroller has become a problem for most students, especially the understanding and application of interrupt is like a fog, they feel unable to grasp the main points, not to mention the application. This requires teachers to carefully analyze and scientifically study the teaching methods and design, so that students can naturally accept the learning and progress smoothly, thus achieving the teaching effect with half the effort. This paper takes "MCS-51 microcontroller" external interrupt as an example, and uses the rain classroom as a learning platform to design a hybrid teaching case of modern digital technology based on the OBE concept, and explores for the teaching reform.
Blended teaching means that teachers design the teaching process carefully, students use online resources for learning outside the classroom, and teachers and students use offline classes for interaction and discussion to enhance learning, so that students can engage in blended learning and train their sense of innovation and teamwork [1].

OBE-based External Interruption Hybrid Teaching Case Design
OBE refers to the goal of instructional design and implementation as the final learning outcomes that students achieve through the educational process [2].OBE emphasizes three core concepts that require a focus on student development, outcomes (i.e., students' problem-solving skills) oriented education, and a sound system of continuous improvement (i.e., feedback based on systematic evaluation and improvement based on assessment) [3]. To do this, the teacher first determines the goal of the 51 microcontroller external interrupt learning, i.e., the learning outcome that the students want to achieve. After the goal is determined, the project or task to achieve the goal should be designed according to the goal. The realization of the project will lead to the realization of the goal, which will have an immediate effect on the students' learning, and the application will drive the learning more convincingly. It will help to increase students' interest and confidence in learning.

Establishment of external interrupt learning objectives for microcontrollers
The ultimate goal of learning microcontrollers is to apply them, and to achieve the freely use of external interrupts is the main goal of this case.

Design of a teaching project on external interrupt of microcontroller
First, in order to make students understand interrupts, the task of the main function needs to be designed. In the absence of interrupts, the main function is always doing its job. The task of the main function is designed to output a segment code at the P0 port and connect a digital tube to display ten numbers from 0-9. The external interrupt 0 is used to control the LED diode on the P1.0 pin of the P1 port. The external interrupt is introduced using the P3.2 pin key ground. The project takes over the previous course with applications, simple principles and easy classroom implementation, more conducive to student acceptance and learning objectives.

Establishment of student-centered blended teaching resources based on the Rain Classroom platform
In the context of "Internet+", it is the development trend of blended teaching in the curriculum to combine independent learning in online courses with classroom seminars and challenging courses, and to carry out student-centered reform of the blended teaching mode in the curriculum to achieve the goal of improving the level and quality of teaching in the curriculum [4]. Using the Rain Classroom platform, teachers can publish discussions, learning courseware, pre-study assignments, and post-class assignments to guide students to understand and accept key knowledge points, and through the completion of pre-study assignments and post-class assignments, knowledge points will be transformed from theory to practice, and finally achieve the learning goal of application.

Post a discussion and introduce the concept of interruptions and the processing flow by analogy
Analogical pedagogy is actually the application of the principles of analogy to specific teaching practices [5]. The essence of learning is to "make connections", especially between previous experiences and external information. The most important and effective way to " make connections " is this: the concept of analogous microcontroller interrupts and processing flow is a difficult point of learning, in order to make students understand and accept easily, to achieve the learning effect of water, analogous schedule life in the rain classroom discussion topics. "If you were studying and the phone rang and interrupted your study, what would you do?" And the microcontroller is a machine, if you do a similar comparison, it must be an interrupt source to interrupt its work, we have to consider what kinds of interrupt sources? What does each interrupt signal look like? How to notify the CPU, and whether the CPU allows interrupts? How to set the priority level of interrupts after allowing them? How to respond to interrupts after allowing them, i.e., how to handle them? Through discussion, students are guided to think independently and to solve thinking problems, thus students are driven to look at the courseware and complete the pre-test and post-test assignments, thus mastering the concept of interrupt, learning the process of interrupt processing -setting of interrupt registers TCON, SCON, IE, IP, and writing of interrupt functions.

Posting of externally interrupted pre-study assignments
The preview assignment is based on the previous teaching project and requires students to use their own computers to design the following tasks using the Proteus simulation software. The 51 microcontroller is being connected to the P0 port digital tube is taking turns to display from 0-9, and the external interrupt 0 level trigger method is implemented through the key ground to interrupt its current work and control the LED light connected at P1.0. It is required to complete the circuit design on Proteus and use Keil software to edit and compile the program to achieve the above tasks. The pre-study assignment has a score setting to drive students to learn independently and realize the student-centered teaching concept.

Posting of externally interrupted post-class assignments
In order to achieve the gradual improvement of the learning effect and the consistency of the task learning, the post-class homework is based on the preview homework, and the task is upgraded by using two external interrupt triggering methods to realize the preview homework, and the interrupt task is changed to control the P1 port 8-bit digital tube with the same light and the same off. The students will be able to analyze and master the difference between the register settings and the interrupt functions in the two triggering methods.

Implementation of classroom teaching cases for external interruption segments
3.1 Analyze students' discussion of pre-reading, point out problems with pre-reading, and lead them to discuss Since the external interruptions were really difficult, only about half of the students completed the pre-reading assignment. Based on the discussion statements posted in the Rain Classroom, most of the students were relatively active and were able to analyze and understand the problems based on the questions and prep for the lesson. However, the level of understanding needs to be deepened and the application skills need to be improved. Figure 1 shows the screenshots of the students' design of the pre-study project program, circuit and simulation run. Figure 1 The screenshots of the students' design of the pre-study project program, circuit and simulation run.

Seize the core and carefully organize teaching based on the project
3.2.1 Take the interrupt system structure diagram as the core, and guide students to grasp the key aspects of interrupt register setting Figure 2. Structure of interrupt system Figure 2 is the interrupt system structure diagram, students must thoroughly understand the interrupt system structure diagram, especially the role and settings of the three registers TCON, IE, IP, in order to thoroughly understand and master and learn to apply interrupts. From Figure 2, it is clear that the 51 microcontroller has a total of INT0, INT1 two external interrupt sources, T0, T1 two timer interrupt sources and a serial interrupt, a total of five interrupt sources. and IE1 are the interrupt request flag bits. When IT0 value is 0, it means the interrupt request will be triggered when the input from 51 MCU P3.2 goes low; when IT0 value is 1, it means the interrupt request will be triggered when the input from 51 MCU P3.2 changes from high level 1 to 0 falling edge, at this time the system will automatically set IE0 to 1 to notify the CPU of the interrupt request. IT1 and IE1 correspond to the corresponding settings and instructions of P3.3 input external interrupt 1. Since the TCON address is 0X88, which is divisible by 8, the trigger mode can be set by assigning values to the two bits IT0 and IT1 individually, or by assigning values to the 8 bits of the TCON register as a whole. For example, setting the external interrupt 0 low trigger mode can make IT0=0; also can make TCON=0X00 to set. IE0, IE1 do not need to set. Therefore, understanding the two trigger mode regulations, you can master the trigger mode setting.  Figure 4 is the IE Interrupt Enable. TCON sets the trigger method and generates the interrupt request flag signal. The CPU will decide whether to allow the interrupt after getting the request from the flag signal IE0 and IE1. This requires the operator to set the interrupt permission, first make EA=1 to open the general interrupt, which is equivalent to opening the general door first. Then, the operator opens the specific interrupts used, making EX0=1 to open external interrupt 0. The rest of the interrupts also set ET0, EX1, ET1 and ES to 1 to open their respective interrupts, which is equivalent to entering the main door and then opening their respective small doors to enter the room. The IE Interrupt Enable can be set bit by bit or the IE Interrupt Enable can be set. Figure 5 is Interrupt Priority. When it is necessary to set a certain interrupt priority, such as external interrupt 0 priority, set PX0=1. When multiple priority levels are the same, the interrupts are executed according to external interrupt 0, timer 0, external interrupt 1, timer 1, serial interrupt sequential level down at a time.

Project-based teaching of external interruption applications
To implement an external interrupt, three basic steps are required, which are interrupt initialization setup, interrupt function design and main function design. The first two steps are the key to external interrupt design.

Project interrupt initialization setup
Initial setup is the first step of interrupt and timer setup, for which you need to know which external interrupt method or methods are used in the project; the triggering method of external interrupts; and the priority requirements of interrupts. According to the previous project task, the project is only external interrupt 0, level trigger mode, therefore, only TCON

External interrupt function design
The design of interrupt functions is a difficult topic for students to learn. First of all, students must understand the format of interrupt functions, and secondly, understand the difference between interrupt functions and normal functions. The first part of the interrupt function has its own special features compared with the general function, and the function body has the same format as the general function.
The initial format of the interrupt function is: void ***() interrupt n, where *** is the interrupt function name, according to the need to follow the rules of naming can be, such as external interrupt 0 interrupt function can be named exter0; n is the serial number, the specific value corresponding to 0-4, respectively, corresponding to external interrupt 0, timer 0, external interrupt 1, timer 1, serial interrupt, corresponding to the serial number To correspond strictly with the interrupt type, no error can be made.
According to the project design, the external interrupt function is used to control the LED diode on the P1.0 pin of the P1 port, so the interrupt function can be designed as follows.
Void exter0(void) interrupt 0 { d1=0; } The interrupt function cannot be called by the main function, so its type can only be defined as void.

Project main function design
The main function of the project realizes the output of segment code in P0 port, and connects the digital tube to display ten numbers from 0-9, which is not a difficult task. Students are required to develop good programming habits, pay attention to the details of the program design. P0 port as the output to connect the pull-up resistor, the main function of the P1 port P1.0 pin LED diode can not light, need to control, the main function design content is as follows. ; delay(1000); } } } After the analysis of the main processes described above, students basically master the steps and points of external interrupt application. Then students are asked to design the circuit using Proteus software, perform the simulation project and observe the operation. The teacher can guide students to change the trigger mode parameters, jump edge, level trigger operation, analysis and comparison, so that students can practically master the setting and application of the trigger mode.

Combined with the experimental system board, implement "advanced, innovative and challenging" to enhance the application ability
Through the previous teaching and practice process, the simple external interrupt register setting and function design have been basically no problem, the following will guide students to migrate the above designed project to the experimental system version and apply the external interrupt on the new circuit. For this reason, it is necessary for students to analyze the circuit situation of the experimental system KR-51 by themselves and to arrange the ports and design the program according to the specific circuit structure, so that they can fully exercise and improve their practical skills and practice. In order to achieve smooth teaching and learning and to meet the teaching objectives. The teacher needs to guide students to analyze several aspects of the problem.
How the eight LED running lights of the KR-51 system board are connected to the microcontroller?
How the dynamic digital tube circuit of the KR-51 system board is connected to the microcontroller, and how the common terminal of the different bit digital tubes is controlled?
How the KR-51 system board external interrupt 0 signal is passed to the microcontroller? Once the above three problems are solved, the port setting and programming will be completed. Through the above practice, students can improve their ability to analyze and solve practical problems.

3.4
Step-by-step promote and deepen the difficulty of after-school assignments to consolidate and improve practical skills to the next level Through the in-depth development of pre-study, pre-study homework, class analysis, guidance and project solution, students have mastered the external interrupt setting and interrupt function design, and have certain practical ability. To further enhance students' practical application, the post-class assignments further deepen the difficulty on the basis of the pre-study project and classroom project. To do this, students are asked to complete the following post-lesson assignment. Using 51 microcontroller, implement and verify the interrupt nesting and priority control, requirements to achieve: the main function to control the P1 port 8 led lights in turn, to achieve the function of running lights. Using two key controls to achieve two levels of interrupt, external interrupt 0 for low priority, control P1 port 8 led lights low four and high four bit in turn on and off 5 times; external interrupt 1 for high priority, control P1 port 8 led lights at the same time on and off 5 times. First open the external interrupt 0, then open the external interrupt 1, and then reverse the order, compare the role of interrupt priority. Upload a screenshot of the complete program and simulation run of the Rain Classroom system. Based on the implementation of the above tasks, students perform their own analysis, write the interrupt nesting programming steps, and summarize the gains. The post-class assignment requires students to independently design the nested external interrupts and set the interrupt priority. This will examine the students' ability to solve problems independently.

Conclusion
Through the analysis of pre-study homework, classroom teaching effect and post-class homework, students basically achieve the teaching objectives of interrupt basic knowledge and interrupt basic application ability, and about 2/3 students can basically master the design of interrupt nesting. Compared with the previous teaching effect, there is a big improvement and progress. The teaching cases are scientifically designed and run through the whole process of teaching, from the design of pre-study contents and pre-study assignments, the analysis of classroom teaching contents, the gradual and in-depth realization of projects, to the design of post-class assignments, with rich and coherent contents, clear investigation objectives, scientific project design, easy implementation, and quantitative achievements at each step, which promote students to gradually improve their learning and practice effects.