Design and Implementation of 80C196 Single Chip Microcomputer Simulation Software (1)

Single chip microcomputer STM32L151CCU6
1206RGB (single)
RF cable can be customized for other specifications
0201 package SLP0603 ESD electrostatic diode 5V one-way ESD
In order to improve the quality and reliability of embedded control software (hereinafter referred to as application software), the application software usually needs to be comprehensively and carefully evaluated. However, application evaluation based on embedded controllers usually needs to build a software and hardware test environment that is comparable or more complex and complete than the application system. The time and capital consumption is no less than the development of the system under test. It is a good choice to use the full software test platform to achieve application software evaluation. The 80C196 microcontroller simulation software introduced in this paper is one of the basic technologies designed to build such a test platform.

l Simulation software requirements analysis and software structure

As the main framework of the whole software testing platform, the simulation software mainly utilizes the rich resources on the PC, realizes the full-speed full-function simulation of the application software 80C196 single-chip microcomputer on the PC, and retains the test case generation module, software simulation external stimulus and other software. The instrumentation interface for evaluation information.

The simulation software can simulate the 80C196 microcontroller instruction function, interrupt response and peripheral interface functions. With a good human-machine interface, it is easy to control the simulation process and view the simulation results.

CPU module, mainly emulates 80C196 CPU chip and memory, executes all instructions in 80C196 instruction system, supports multiple data types, including bit, byte, word, double word, short shaping, shaping, long shaping, and multiple addressing The method completes the interrupt processing and controls various peripheral modules of the simulation; compiles the module, completes the preprocessing process of the source program, including compiling, analyzing, and troubleshooting, and converts the source program into an instruction set that can be recognized by the 80C196 CPU for simulation operation. Use; program control module, control the operation of simulation software, support the setting of interrupt point, complete the interaction between simulation software and user; system information module, display current system information, monitor the operation of simulation software; result information module, view source program operation The result is displayed in an intuitive and visual way with a good human-machine interface.

2 simulation software design and implementation

The simulation software adopts VC++ object-oriented technology, and refines each abstract module in the system into its own class instance to complete the specified system functions. The main classes and key technologies used in the simulation software are described below.

80C196单片机仿真软件的设计与实现 (1)0

2.1 Memory data structure design

The 80C196 has a logically fully unified register space with an addressable range of 64 kB, most of which is freely available to the user. In order to realize the full function of the memory and facilitate the program control, a structure containing multiple kinds of information is designed as the storage unit in the simulation software, and these storage units constitute the storage area of ​​the simulation platform, the storage area of ​​the software simulation platform and the 80C196. Storage space is mapped one by one. The storage unit structure is expressed as follows:

The memory in the simulation software is represented as MyCode m_ramMap[0xffff], which realizes the mapping with the real storage space.

2.2 CPU module design

The CPU module is essentially a huge class instance that simulates all the functions of the 80C196 CPU. It is the core of the entire simulation software. The CPU class is a software implementation of the instruction execution component, memory, IO interface, serial port and other hardware components of the 80C196 MCU, and completes functions such as instruction emulation, memory management, and interrupt management. It can realize the functions of 104 kinds of instructions in the 80C196 microcontroller instruction system, and handles 6 kinds of instruction addressing modes, including immediate addressing, register direct addressing, indirect addressing, automatic incremental indirect addressing, short indexed addressing, and Long indexed addressing.

All functions of the 80C196CPU are implemented by the C196Chip class, the structure diagram of the C196Chip class and the calling relationship in the class.

The CMyCPU class is common to all classes and contains memory cells, program status words, CPU clock frequency, total number of instruction execution cycles, and some other CPU signals. The CFindAddr class implements the six addressing modes of the instruction, and provides a uniform interface to implement different addressing modes, making the addressing process of the operand transparent. The instruction that needs to access the memory completes the process of accessing the memory by calling the method in the CFindAddr class, and obtains the access data. According to the instruction, the data types obtained include byte, word, short integer, integer, double word and long. Integer number. There are 104 kinds of instructions in the 80C196 command system. According to different functions, they are divided into addition instruction, subtraction instruction, multiplication instruction, division instruction, logic operation instruction, data transfer instruction, stack operation instruction, jump and subroutine call instruction, conditional jump. , bit logic value jump instruction, single register instruction, shift instruction and special control instruction. Each type of instruction is designed as a single module as a single instance, completing the interpretation of the corresponding instruction. For instructions that need to modify the program status word, the operation of modifying the status word is treated as a class. 80C196单片机仿真软件的设计与实现 (1)1

[1] [2] 80C196单片机仿真软件的设计与实现 (1)2

Compound Punching

Stator and rotor laminations are an important part of motors and generators. For medium-sized laminations with a great quantity, we usually use compound puncing. The advantages of compound punching is the process is suitable for mass production of medium-sized stator and rotor laminations. And the lead time is shorter. Usually the outer diameter is from 300mm-580mm.

Stator And Rotor Lamination By Compound Punching,Laminated Stator,Core Stator,Motor Laminations

Henan Yongrong Power Technology Co., Ltd , https://www.hnyongrongglobal.com

Posted on