• No results found

Simulating the Basic Performances of a MCU Based on Proteus

N/A
N/A
Protected

Academic year: 2020

Share "Simulating the Basic Performances of a MCU Based on Proteus"

Copied!
5
0
0

Loading.... (view fulltext now)

Full text

(1)

2018 International Conference on Information, Electronic and Communication Engineering (IECE 2018) ISBN: 978-1-60595-585-8

Simulating the Basic Performances of a MCU Based on Proteus

Yue-yang YUAN

*

, Chao-lun ZHOU and Zhen-hua CAI

School of Mechanical and Electrical Engineering, Hunan City University, Yi Yang, 413000, China

*Corresponding author

Keywords: Microcomputer, Proteus, Simulation, Working principle, Working process.

Abstract. For a beginner, the Professional knowledge of the microcomputer (MCU) is not easy understood because of its abstraction, such as the data or signals how to be operated inside of the MCU. Consequently, attend to help the beginner to learn these knowledge, based on fully understanding the working principles and processes of a MCU, in the virtual design environment of the Proteus (ISIS 7 professional), by mainly using a counter CD4518 and a decoder 74LS138, an experiment for simulating the basic performances of a MCU was designed. With this design, the beginner can simulate these operations as follows: programming a software code into memory unit, running the software code and clearing the code memory units of the MCU. With doing these simulations, an innovative method is proposed for the beginner how to easily understand and learn the technology of a MCU.

Introduction

The technology of a microcomputer (MCU) is based on the development in the technology of the large-scale integrated circuit. Inside the MCU, it usually is consists of the CPU, memory units (the RAM and ROM) and input and output port (I/O). In last decades, the developments in manufacturing technologies have made the MCU lower cost, much smaller body and more functional modules to meet the need of peoples. These advanced technologies about the MCU have entered into an era of embedded systems [1] for benefit us in production, living, and so on. Since the 1980s, the MCU technology has been widely used in various fields, such as the production line, research, study, and so on. However, in current China, a larger number of advanced MCUs used in a wide range of electronic devices and equipments have to be purchased from in foreign markets, such from the United States, Japan and other advanced countries. This has become one of serious bottlenecks in the process of industrization of advancing countries.

The main purpose of the course about the MCU is how to apply it in practice [2,3]. The training objective of embedded microcomputer is mainly to train the engineer and technician how to design and research an application with a MCU, such as the hardware, software and firmware, control system, et al. the study in MCU usually requests the students to well understand the working principle and process of a MCU. The traditional methods and means [4-6] how to study the technology of MCU mainly depends the teacher's class lectures and remembering the contents printed in the textbooks. This traditional means always easily bring the beginner (or student) losing his interesting and subjective initiative in studying the technology of MCU.

As the developing in big data, artificial intelligence (AI), the technology in MCU has became a pre requisite to develop the terminal electronics devices and tools [7]. Especially, the trade war between US and others country has remained people the MCU is one of important weapon to win the war. So in this paper, the working principle and process of the embedded MCU were introduced based on the simulations in the Proteus (ISIS 7 professional).

Experimental Setup

(2)
[image:2.595.61.538.209.464.2]

predesigned function or instructions step by step according to the codes those programmed in the memory units (general called ROM). In order to build an experiment setup to simulate the working principle and process of a MCU, a hardware circuit was designed as shown in figure 1. This circuit was prepared in the virtual environment of Proteus (ISIS 7 professional). The main disintegrated elements are listed as follows: U1, U2 and U3 respectively correspond to the synchronous counter CD4518, the 3-8-decoder 74LS137 and the BCD-seven-segment decoder 74LS49. A matrix circuit of 8 rows and 4 columns is consists of 32 diodes each connected to the cathode of a switch. And then every diode connected a switch is insert between the row and column at the intersection. A display circuit used a digital tube SEG1 is designed for observing the phenomenon of experiment.

Figure 1. The Simulation Hardware Circuit.

The power supply Vcc is designed a 5VDC. Every columns of the matrix circuit are pulled up to Vcc though a series of resistors R2, R3, R4 and R5 which used for current limiting and preventing the Vcc short-circuit to the ground. At the other end of each column of the matrix, being regarded as the output port P00, P01, P02 and P03, are respectively connected to the input ports of U3 A, B, C and D. the ports QA, QB, QC, QD, QE, QF and QG of the U3 are respectively connected to the input ports A, B, C, D, E, F, G of the seven-segment digital tube SEG1 through the inverter CD4069. The enable terminal EI of U3 is connected to Vcc to enable the U3 keeping working status. The seven-segment digital tube SEG1 is a common anode digital display tube. The rows of the matrix circuit are respectively assigned as the addresses 0x00, 0x01, ……, 0x07, and sequentially connected to the output ports Y0, Y1, ……, Y7 of U2. The input ports A, B, and C of U2 are respectively connected to output ports Q0, Q1 and Q2 of U1. The output port Q3 of U1 is not connected. The input terminal CLK of U1 is used to read in the clock pulse. The enable terminal E of U1 pulled up to Vcc makes the U1 being in working. A clock pulse is manual generated by pressing down and releasing the button K1 one time.

Experiment Operations

There are three common operations for a MCU to perform its function according to the codes programmed in its memory units. Firstly, the code should be written into the memory units. Secondly, the software should be run. Thirdly, the memory should be cleared.

CD4069

U3 74LS49

A B C D BI

QA QB QC QD QE QF QG

74LS137

U1 U2

P03 P02 P01 P00

00

01

02

03

04

05

06

07 K1

(3)

Simulate Programming

The programming is a process of writing the code (such as the file suffixed with .bin or .hex) into the memory units by using a programmer or writer. For example, as shown in figure 2, with the EEPROM [7-9]

[image:3.595.203.393.194.295.2]

, the process of programming the code is to release the electrons which injected in the gate of a FLOTOX MOS (Floating Gate Tunneling Oxide MOS) to keep this MOS tube in the cut-off state. Herein, for easily understanding the process of the programming that writing the code into the memory units, the switches in the matrix are turned on or off to set the corresponding “bit” with logic value of“1” or “0”.

Figure 2. Programing the EEPROM by releasing the electrons.

As listed in table 1, all the switchs in each row of the matrix are set in accordance with the bit logical state (1 or 0) requested by the BCD number “0, 1, ……, and 7”. In the row (or address) of “0x00”, all the switches turned off means the BCD code of “0”being displayed. In sequence, the BCD codes of “1, 2, 3……, and 7” will be displayed as well as following the settings in every row.

Table 1. The settings of switches in matrix.

Address Switches turn on or off Display

digital

P03 P02 P01 P00

00 √ √ √ √ 0

01 √ √ √ × 1

02 √ √ × √ 2

03 √ √ × × 3

04 √ × √ √ 4

05 √ × √ × 5

06 √ × × √ 6

07 √ × × × 7

Note: ”√” or ”×” indicates being set on or off

Simulate Running the Software

After power on the “MCU”, under the driving of the clock pulse, the software which programmed in the memory units is performed with starting at the first memory unit generally assigned with“0x00” (such as the starting address of the 51 series MCU are “0x0000”). The clock pulse is generated by manually pressing and releasing the button of K1. One time of pressing on and off the button K1, means one pulse is generated and output to the counter CD4518 of U1.

Electrons release

P N N

12V Sourc

e

[image:3.595.195.402.402.524.2]
(4)
[image:4.595.215.389.80.230.2]

Figure 3. The operation of experiment.

As described in figure 3, when a pulse generated by pressing and leasing K1, the counter U1 will accumulate the pulse. At its output ports of Q1, Q2 and Q3, the corresponding sequence number (BCD) can be carried out and output into U2 the 3-8 decoder 74LS137 though the input ports of A, B and C. According to the input, U2 will set one of the output ports “Y0, Y1, ……, and Y7” with low electric level (or “0”) to select one row of the matrix (or a memory unit). The current (or the status of switches) in the selected row will be output to U3 the BCD-seven-segment decoder 74LS49. So a corresponding digital number will be displayed in the digital tube SEG1.

Simulate Erasing Memory Units

Erasing the data programmed in the memory units is a process to restore each memory unit to its original state (all set to “1” or “0”) under a special condition such as using the ultraviolet radiation, or applying a reverse high voltage, et al. For example, with the EEPROM shown in figure 4, erasing the bit is to inject the electrons into the gate of the FLOTOX MOS to keep this MOS tube in the conducting state. In our experiment, all the switches in the matrix circuit are manually turn off. That is, all the bits of memory are set to “1”.

Figure 4. Erasing the EEPROM by injecting the electrons.

Experimental Results

Based on the virtual design in Proteus, to set all the switches in the matrix circuit following the Table 1, we run the simulation in the ISIS 7 Professional environment. By pressing and releasing the button of K1 continually, the "clock pulse" had been continually generated. And driven by the "clock pulse", according to the switches state given in Table 1, a sequence numbers were carried and output to display in the digital tube SEG1 as shown in figure 5. With these operations, a software code programmed in the memory space (this assumes that the memory space is consist of eight 4-bit memory units) had been performed. When all switches were manually turned off, erasing the memory space had been performed. After this erasing, there was no longer character displayed on the digital tube SEG1.

Electrons inject

P N N

12V Sourc

e

Drain Gate

BCD

Press on and off the K1

U1, the counter

U2, the decoder

The data in each row delivered to U3 Set the switches

on or off

The BCD displayed in SEG1

[image:4.595.203.398.471.578.2]
(5)

Figure 5. The display in digital tube means the experimental output.

Depending on this method, the test can also continually be developed by setting state of the switches in the matrix circuit to display more different characters as possible as the digital tube SEG1 can. Future more, the rows and columns of the matrix in the experimental circuit can be expanded with more switches for a larger "memory space" to be operated.

Conclusion

A simulation based on the Proteus was designed including its experimental setup and operations how to demonstrate the processes (programming the code into the memory units, running the codes and erasing the memory unit) of running a MCU. Here we proposed a method for a beginner to easily understand the working principle and process of a MCU with operating these experiments.

Conflict of Interest

The authors do not have financial and personal relationships with other people or organizations that could inappropriately influence (bias) their work.

Acknowledgement

This project is supported by: The fund of Hu Nan City University Teaching Reform and Practice (Item number: HNCTUE201821). The fund of Chinese cooperative education project (201801129092).

References

[1]He LiMin. Foreseeing the embedded computer system with modern perspective of modern (4)— the development history of embedded system in last 40 years [J]. Microcontroller & Embedded Systems, 2016, 16(4): 77-79.

[2]Fan Jian, Li Jun, Xia RuTing. Teaching Reform and Practice of Scene Teaching Mode for Microcontroller Course [J]. China Educational Technology & Equipment, 2012(6):131-132.

[3]Ai Gao. Research on practice teaching of MCU for the Automation Specialty in Higher Vocational Education [J]. Automation & Instrumentation, 2017, (9):223-224.

[4]J. Dolinay, P. Dostálek and V. Vašek. ARM-based Microcontroller Platform for Teaching Microcontroller Programming [J]. International Journal of Education and Information Technologies. 2016, 10: 113-119

[5]Ye Cheng-bin, Guo Zhi-xiong, Kong Ling-peng. Reformation of Enhanced Signle Chip Microcomputer Teaching and Personnel Train Mode [J].Industrial Applications and Communications, 2016, 35(10): 149-152.

[6]Zhang DeLing, Cai ZhenJiang, Zhang Meng. Teaching reform in the course of the principle and application of single chip microcomputer [J]. Journal of Agricultural University of Hebei (Agriculture & Forestry Education), 2015, 17(2): 55-58.

[7]S.O. Kong, C.Y. Kwo. Simulation of the program operations of the FLOTOX EEPROM [J]. Solid-State Electronics, 1994, 37(37):1949-1960.

[8]M. Maccarrone, G. Giannini, D. Pellicone. Fast programming memory device [P]. U.S. Patent 9,779,821, 2017.

Figure

Figure 1. The Simulation Hardware Circuit.
Table 1. The settings of switches in matrix.
Figure 3. The operation of experiment.

References

Related documents

information to reap an unfair benefit. Many of these donations were made at a time when it would have been illegal to make a sale of the same securities due to their access to this

Madeleine’s “belief” that she is Carlotta Valdez, her death and rebirth as Judy (and then Madeleine again) and Scottie’s mental rebirth after his breakdown.. All of these

By formulating the video denoising problem to a low-rank matrix completion problem, our proposed algorithm does not assume any specific statistical properties

Based on the idea, we have put forward novel routing strategies for Barrat- Barthelemy- Vespignani (BBV) weighted network. By defining the weight of edges as

The ethno botanical efficacy of various parts like leaf, fruit, stem, flower and root of ethanol and ethyl acetate extracts against various clinically

Applications of Fourier transform ion cyclotron resonance (FT-ICR) and orbitrap based high resolution mass spectrometry in metabolomics and lipidomics. LC–MS-based holistic metabolic

Aim: The goal of our study was to verify the correlation of the aforementioned ARMS2 variation with the disease, to examine, for the first time, the role of the CD14 C260T