Umps 8051 Simulator Free ##TOP## Download

0 views
Skip to first unread message

Nicoletta Monjure

unread,
Jan 24, 2024, 9:34:19 PM1/24/24
to preczycite

c. A Select Device window will appear, select 8051 and click Ok.

d. Then type the program as follows

e. After that, we can start trying to simulate the program as above. That is by choosing Build> Build and Sim or by pressing Shift + Ctrl + F9 on the keyboard, as shown below.

f. If there is no error, then Emulator window will appear as follows


g. Next, to execute the instructions from the code that has been typed one by one is by pressing the Step into next instruction (F11) below.

h. Then the existing instructions will run. That is LJMP, then mov R0, # 20 (assigns 20h to R0), then mov A, R0 (assigns R0 to A), then mov R1, # 20 (assigns 20h to R1), then ADD A , R1 (sums the value of R1 with A) and also mov R2, A (assigns A into R2).

The 8051 Oscillator and Clock 16 Program Counter and Data Pointer 17 A and B CPU Registers 17 Flags and the Program Status Word (PSW) 18 Internal Memory 19 Internal RAM 19 The Stack and the Stack Pointer 19 Special Function Registers 21 Internal ROM 22

Umps 8051 Simulator Free Download


DOWNLOAD --->>> https://t.co/HdjbRmT0Ip



Appendix A 8051 Operational Code Mneumonics 203 Appendix B How t o Use the Assembler 212 Appendix C How t o Use the Simulator 220 Appendix D The 8255 Programmable I10 Port 233 Appendix E Control Registers 236 Index 238

The programs included on the disk, an 8051 assembler named A51, and a simulator, named S51. were both written by David Akey of PseudoCorp, Newport News, Virginia. PseudoCorp has provided us all with a software development environment that is not only easy to use but one that we can uniquely configure for our own special purposes. Details on the assembler and simulator are provided in the proper appendixes; use them as early as possible in your studies. Many points that are awkward to explain verbally become clear when you see them work in the simulator windows! Further information on products developed by PseudoCorp follows this Preface.

Note that the point here is not to show that one design is "better" than the other; the two designs are intended to be used for different purposes and in different ways. For ex- ample, the 280 has a very rich instruction set. The penalty that is paid for this abundance is the number of multi-byte instructions needed, some 71 percent of the total number. Each byte of a multi-byte instruction must be fetched from program memory, and each fetch takes time; this results in longer program byte counts and slower execution time versus single-byte instructions. The 8051 has a 62 percent multi-byte instruction content; the 8051 program is more compact and will run faster to accomplish similar tasks.

The disadvantage of using a "lean" instruction set as in the 8051 is increased pro- grammer effort (expense) to write code; this disadvantage can be overcome when writing large programs by the use of high-level languages such as BASIC and C, both of which are popular with 8051 system developers. The price paid for reducing programmer time (there is always a price) is the size of the program generated.

8051 Microcontroller Hardware The 8051 microcontroller actually includes a whole family of microcontrollers that have numbers ranging from 8031 to 8751 and are available in N-Channel Metal Oxide Silicon

package types. A n enhanced version o f the 8051, the 8052, also exists wi th its own family o f variations and even includes one member that can be programmed i n BASIC. This gal- axy o f parts, the result o f desires by the manufacturers to leave no market niche unfilled, would require many chapters to cover. I n this chapter, we w i l l study a "generic" 8051, housed i n a 40-pin DIP, and direct the investigation o f a particular type to the data books. The block diagram o f the 8051 i n Figure 2 . l a shows all o f the features unique to micro- controllers:

The programming model of the 8051 in Figure 2. l b shows the 8051 as a collection of 8- and 16-bit registers and 8-bit memory locations. These registers and memory locations can be made to operate using the software instructions that are incorporated as part of the design. The program instructions have to do with the control of the registers and digital data paths that are physically contained inside the 8051, as well as memory locations that are physically located outside the 8051.

'Knowledge of the details of circuit operalaon that cannot be affected by any instruction or external data. while intellectually stimulatng. tends to confuse the student new to the 8051. For this reason. this text will concentrate on the essenltal features of the 8051: the more advanced student may wish to refer to manufacturers' data hmks for additional information.

The 8051 Oscillator and Clock The heart of the 8051 is the circuitry that generates the clock pulses by which all internal operations are synchronized. Pins XTALl and XTAL2 are provided for connecting a reso- nant network to form an oscillator. Typically, a quartz crystal and capacitors are em- ployed, as shown in Figure 2.3. The crystal frequency is the basic internal clock fre- quency of the microcontroller. The manufacturers make available 8051 designs that can run at specified maximum and minimum frequencies, typically 1 megahertz to 16 mega- hertz. Minimum frequencies imply that some internal memories are dynamic and must always operate above a minimum frequency, or data will be lost.

A and B CPU Registers The 8051 contains 34 general-purpose, or working, registers. Two of these, registers A and B, comprise the mathematical core of the 8051 central processing unit (CPU). The other 32 are arranged as part of internal RAM in four banks, BO-B3, of eight registers each, named RO to R7.

The A (accumulator) register is the most versatile of the two CPU registers and is used for many operations, including addition, subtraction, integer multiplication and divi- sion, and Boolean bit manipulations. The A register is also used for all data transfers be- tween the 8051 and any external memory. The B register is used with the A register for multiplication and division operations and has no other function other than as a location where data may be stored.

The 8051 has four math flags that respond automatically to the outcomes of math operations and three general-purpose user flags that can be set to I or cleared to 0 by the programmer as desired. The math Rags include carry (C), auxiliary carry (AC), overflow (OV), and parity (P). User flags are named FO, GFO, and GFI; they are general-purpose flags that may be used by the programmer to record some event in the program. Note that all of the flags can he set and cleared by the programmer at will. The math flags, however. are also affected by math operations.

The Stack and the Stack Pointer The stack refers to an area of internal RAM that is used in conjunction with certain op- codes to store and retrieve data quickly. The 8-bit stack pointer (SP) register is used by the 8051 to hold an internal RAM address that is called the "top of the stack." The address held in the SP register is the location in internal RAM where the last byte of data was stored by a stack operation.

The structure of the internal RAM has been discussed previously. A corresponding block of internal program code, contained in an internal ROM, occupies code address space OOOOh to OFFFh. The PC is ordinarily used to address program code bytes from addresses OOOOh to FFFFh. Program addresses higher than OFFFh, which exceed the inter- nal ROM capacity, will cause the 8051 to automatically fetch code bytes from external program memory. Code bytes can also be fetched exclusively from an external memory, addresses OOOOh to FFFFh, by connecting the external access pin (m pin 31 on the DIP) to ground. The PC does not care where the code is; the circuit designer decides whether the code is found totally in internal ROM, totally in external ROM, or in a comhination of internal and external ROM.

Input/Output Pins, Ports, and Circuits One major feature of a microcontroller is the versatility built into the inputloutput (110) circuits that connect the 8051 to the outside world. As noted in Chapter I , microprocessor designs must add additional chips to interface with external circuitry; this ability is built into the microcontroller.

To be commercially viable, the 8051 had to incorporate as many functions as were technically and economically feasible. The main constraint that limits numerous functions is the number of pins available to the 8051 circuit designers. The DIP has 40 pins, and the success of the design in the marketplace was determined by the flexibility built into the use of these pins.

For this reason, 24 of the pins may each be used for one of two entirely different functions, yielding a total pin configuration of 64. The function a pin performs at any given instant depends, first, upon what is physically connected to it and, then, upon what software commands are used to "program" the pin. Both of these factors are under the complete control of the 8051 programmer and circuit designer.

Given this pin flexibility, the 8051 may be applied simply as a single component with 110 only, or it may be expanded to include additional memory, parallel ports, and serial data communication by using the alternate pin assignments. The key to programming an alternate pin function is the port pin circuitry shown in Figure 2.7.

The ports are not capable of driving loads that require currents in the tens of milli- amperes (mA). As previously mentioned. the 8051 has many family members, and many are fabricated in varying technologies. An example range of logic-level currents, volt- ages, and total device power requirements is given in the following table:

There are several reasons for adding external memory, particularly program memory, when applying the 8051 in a system. When the project is in the prototype stage, the expense-in time and money-of having a masked internal ROM made for each program "try" is prohibitive. To alleviate this problem. the manufacturers make available an EPROM version, the 8751, which has 4K of on-chip EPROM that may be programmed and erased as needed as the program is developed. The resulting circuit board layout will be identical to one that uses a factory-programmed 805 1. The only drawbacks to the 8751 are the specialized EPROM programmers that must be used to program the non-standard 40-pin part, and the limit of "only" 4096 bytes of program code.

dd2b598166
Reply all
Reply to author
Forward
0 new messages