Microcontroller Teaching Based on Keil C51 Integrated Development Environment

Publisher:skyshoucangLatest update time:2012-07-30 Source: 21ic Keywords:Keil Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. Introduction

The reform and practice of MCU teaching is a kind of teaching activity to better enable students to transform the theoretical knowledge of MCU they have learned into practical abilities to adapt to social development and employment needs. Nowadays, one of the main tasks of vocational education is to provide the society with "applied talents who understand both theory and practice, have certain R&D experience and hands-on ability". Such talents know where to start and how to do it when they encounter a development project. Therefore, our teaching activities should strengthen the cultivation of students' practical abilities. For higher vocational colleges that specialize in cultivating applied talents, what needs to be paid more attention to is the practical operation training in teaching.

Compared with undergraduate colleges, vocational colleges should mainly cultivate applied talents. The quality of students in higher vocational colleges is somewhat different from that of undergraduate colleges. The traditional single-chip microcomputer teaching method, which does not focus on the characteristics of the course and the characteristics of the students, only focuses on teachers talking and students doing, is not feasible in teaching practice. In the teaching process, teachers should establish a good relationship of mutual trust with students, so that students can gradually form an interest in learning, cooperate with teachers, and then take the initiative to learn. First of all, a student-centered practical teaching concept should be established, highlighting the idea of ​​"quick start, stimulating interest, ability-based, and adapting to society", and breaking the "discipline-based" model. Teachers, as the main body, reflect the leading nature of teaching; students, as the main body, reflect the initiative in the learning process. A lot of time should be left for students to explore independently. Secondly, a practice-focused concept should be established. Change the traditional educational concept, and evaluate students no longer just look at test scores, but more importantly, look at students' ability to use knowledge to solve problems.

2. Ideas and Practice of MCU Teaching Reform

1. Teaching sequence in traditional teaching mode

The teaching sequence in the traditional MCU teaching model is mainly: MCU hardware structure, instruction system, assembly language programming, memory, timer/counter, I/O expansion, A/D, D/A conversion.

This teaching model that has been in place for many years is still feasible for undergraduate teaching, because undergraduate colleges are mostly engaged in theoretical research and development. However, the quality of students in higher vocational colleges is somewhat different from that of undergraduate colleges, and the training goals of higher vocational colleges are also different from those of undergraduate colleges. In this teaching model, experiments often begin halfway through the course, and sometimes even when the course is basically over. Because students' learning goals are unclear at the beginning of the course, some even don't know what the microcontroller is used for, and feel that the learning content is boring, so they are not very interested. After a few weeks, students' interest in learning is completely gone. At this time, even if they start the experiment again, they feel bored, and some simply give up. In the past years of teaching microcontrollers and other electronic theory courses, I have a deep understanding of this.

In the past, most experiments used a single-chip microcomputer experimental box. This experimental box translates the source program in assembly language into machine code and then directly inputs it into the system. This experiment is very different from the actual single-chip microcomputer development process. Students have little understanding of the hardware system, let alone the entire process of software programming, assembly, and writing into the single-chip microcomputer. Often, students can complete the experiment very well, but they are at a loss in actual work and have no idea where to start when they encounter an actual development project.

Students educated in this way are contrary to the training model of higher vocational colleges, and this teaching model can no longer meet current teaching needs.

(II) The same teaching method as the actual MCU development

In order to stimulate students' interest in learning, increase students' hands-on training, enable students to adapt to the needs of actual work, and know where to start and how to do it when receiving a single-chip microcomputer development task in actual work, in recent years we have adopted a situational teaching method based on the Keil C5l integrated development environment. On this development platform, the input and assembly of the assembly language source program are completed. Then use the IspPgm software to directly write the assembled program into the ROM of the single-chip microcomputer for operation. This method is exactly the same as the process of developing a project in actual work. It has two advantages: First, the course is broken down into several teaching scenarios, and each scenario is guided by experiments and extended to theoretical teaching. It can stimulate students' interest in learning and achieve the purpose of students' independent learning. Second, this method is completely carried out in the laboratory and is the same as the process of actual development projects, so students taught by this method are more adaptable to social needs.

The teaching of single-chip microcomputer is divided into several teaching scenarios. Each teaching scenario is guided by a simple experiment. Students are asked to connect the hardware circuit according to Figure 1, double-click the icon on the desktop of the desktop computer to run KeilC5l, and complete the editing and assembly of simple programs. The Keil C5l integrated development environment is shown in Figure 2. [page]

The Keil C51 integrated development environment consists of five parts: menu bar, toolbar, source file editing window, project window and output window.

The toolbar is a group of quick tool icons, mainly including the basic file toolbar, the construction toolbar and the debugging toolbar. The basic file toolbar includes basic operations such as new, open, copy, and paste. The construction toolbar mainly includes file compilation, target file compilation and connection, all target file compilation and connection, target options, and a target selection window. The debugging toolbar is located at the end, mainly including some basic operations of simulation debugging source programs, such as single step, reset, full speed operation, etc.

There are three windows by default below the toolbar. The project window on the left contains a project's target, group, and project file. The right is the source file editing window, which is essentially a file editor where we can edit, modify, and paste source files. The bottom is the output window, where the compiled result of the source file is displayed, with a prompt of pass or error (including error type and line number). If it passes, a target file in "HEX" format will be generated for simulation or chip burning. The development process of MCS-51 microcontroller software Keil C51 is as follows:

1. Create a project, select the chip, and confirm the options.

2. Create an assembly source file or a C source file.

3. Generate various application files.

4. Check for errors in modifying source files.

5. Software simulation or hardware online simulation.

6. Programming operation (use IspPgm software to directly write the assembled program into the ROM of the microcontroller and run it) According to the above process, students edit and assemble the simple control program given by the teacher on the desktop computer, then run IspPgm software, and then write the assembled "HEX" file into the ROM of the microcontroller to run it, and you can get an intuitive control effect. This can stimulate their interest in learning. Finally, the teacher will explain it based on this simple control program. This teaching method has been tested in actual teaching for several years and has achieved very good results.

Conclusion

Today, single-chip microcomputer control technology has been applied to various fields. The goal of higher vocational colleges is to cultivate applied talents for the society. Therefore, the traditional teaching model can no longer adapt to the teaching of single-chip microcomputers in higher vocational colleges. In order to enable students to truly consciously, voluntarily and actively learn single-chip microcomputers, the traditional teaching model must be changed. As long as we continue to improve teaching methods, enrich teaching means, strengthen the cultivation of practical ability, and pay attention to the connection between theory and practice, we can stimulate students' interest in learning and achieve better teaching results. However, how to carry out teaching reform more deeply and systematically and cultivate a large number of single-chip microcomputer application talents for the society still requires teachers to work together and explore continuously.

Keywords:Keil Reference address:Microcontroller Teaching Based on Keil C51 Integrated Development Environment

Previous article:Design of data acquisition circuit based on C8051F020 single chip microcomputer
Next article:The digital tube display based on the single chip microcomputer realizes the self-adding function

Recommended ReadingLatest update time:2024-11-16 19:56

C51 for I²C communication
I²C (Inter IC Bus) is a data bus protocol introduced by Philips. #include reg52.h void display(unsigned int n) { unsigned char i; char table ={ 0x3f,0x06,0x5b,0x4f, 0x66,0x6d,0x7d,0x07, 0x7f,0x6f,0x77,0x7c, 0x39,0x5e,0x79,0x71 }; P2 = 0 2; P0 = table ; for (i=0;i 25;i++); P0 = 0; P2 = 1 2; P0 = table
[Microcontroller]
Program structure of single chip microcomputer C language C51
(1) The library functions defined in C51 are different from those defined in the standard C language. The library functions defined in the standard C language are defined according to general microcomputers, while the library functions in C51 are defined according to the corresponding situations of 51 single-chip micr
[Microcontroller]
C51---1 Create a new C51 project + 2.1 Turn on the LED light + 3.1 Press the button to control the LED on and off
1 New construction After selecting the directory path, select add files 2.1 And light up the LED light LED Schematic main function code led1 is P2_0 When the 8-bit control of P2 is set to 1111 1110, the 0th bit is 0, and the LED diode is turned on. #include REGX52.H void main() { P2=0xFE;//1111 1110
[Microcontroller]
C51---1 Create a new C51 project + 2.1 Turn on the LED light + 3.1 Press the button to control the LED on and off
Type conversion of bit and char in C51
Type conversion of bit and char in c51. Data is non-zero, and after bit forced, it is 1. Otherwise, it is 0 The last 8 bits of data are taken after char coercion. (1) What are the benefits of forced conversion? For example: unsigned char x ; sbit SDA = P1^0 ; 1) To use x to record the value of p1.0, you can
[Microcontroller]
Microcontroller C51 memory type and storage mode
  Microcontrollers are an integrated circuit chip that uses very large-scale integrated circuit technology to combine a central processing unit (CPU) with data processing capabilities, random access memory (RAM), read-only memory (ROM), various I/O ports, interrupt systems, and timers. /Counter and other functions int
[Microcontroller]
Microcontroller C51 memory type and storage mode
Keil C51 Code Banking
1 Introduction MCS-51 has 8 data lines and 16 address lines, so MCS-51 can only access a maximum of 64KB (216) addresses. Many complex C51 codes may generate a Bin file of 64KB in size. In view of this situation, Keil C51 proposed the Code Banking mechanism to solve this problem. 2. Basic principles The code executi
[Microcontroller]
Keil C51 Code Banking
CXSTM8 parameterless function note
When keil has no parameter function, like, int fun() { int i = 0; return i; } There is no problem with compilation, but in ST's CXSTM8 it needs to be written as int fun(void) { int i = 0; return i; } Can be compiled. Otherwise it will appear #error cpstm8 xxxxxxxxxxxxxxxxx missing prototype
[Microcontroller]
RS232 basic communication program based on C51
Since I will be using the communication program between C# and the MCU, I went back to the STC12 series MCU and temporarily stopped using AVR. Because the AVR programmer does not have RS232 interface communication, it is troublesome to use. For compatibility, I defined the program name as the same as the name in A
[Microcontroller]
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号