Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

Working with Universal Microprocessor Simulator (UMPS)

By Ashutosh Bhatt

 

 

UMPS is perhaps most efficient virtual simulator for simulating the programs of 8051/52/2051/4051, PIC micro controllers, HC micro controllers, AVR micro controllers etc. It provides perfect platform for simulating real time applications. It has wide varieties of peripherals to connect with micro-controllers like in display there are LED, matrix LED, alpha numeric display, all type of LCD etc. Other peripherals like ADC, DAC, serial transmitter-receiver, function generator, I2C memory, I2C display, PWM converter, digital recorder and player, shift register etc. are given to design any embedded system. With the help of umps, one can create virtual 8051 training board on his computer’s desktop. He can simulate all kind of programs by connecting required resources like 7 segment display, Matrix LED, LCD, Matrix keyboard and all he wants. 

click here to download zip folder for this software

Here I have explained one example in which one can easily understand the operation of UMPS software. It describes how to edit compile and run a simple LED blinking program on port  P0. Also it explains how to connect LEDs with port and see the chasing effect on them. 

First open UMPS program from start menu -> all programs-> umps 1.91 demo-> umps 1.91 demo. You will see following screen.

Working with Universal Microprocessor Simulator

 Configuring CPU

Now first one has to load the precompiled CPU file available in configure menu. So open configure -> load CPU

 

Working with Universal Microprocessor Simulator

You will be asked to load desired CPU from all given CPUs. As you have to work with 8051 assembly language, select either 8031.cpl or 8032.cpl file and click OK.

Working with Universal Microprocessor Simulator

You will see the following message on your screen. Click OK.

Working with Universal Microprocessor Simulator

 Writing Program

Now you will see all the menus are enabled. Now from file menu click new file to create new file or you can open any existing file from open file tag. If you select new file then editor area will open where you can write program.

Working with Universal Microprocessor Simulator

Write down a simple program for blinking LEDs on port P0 as given

org 00h

mov p0, #00h

setb c

mov a, p0

loop:     rlc a

mov p0, a

sjmp loop

end

 

You will see that mnemonics org and end are highlighted as bold green and all other opcodes like mov, rlc, sjmp etc. highlighted as bold black. Now save the file as name “blinkled.asm” to any particular directory or folder. Then open program menu and select compile (or just press ctrl+F9). Move to your directory or folder and from the list find out “blinkled.asm”. Click OK.

Working with Universal Microprocessor Simulator

You will see the message box appears showing status of compilation. If there is no error then it will show “END” otherwise it will indicate an error with line number and type of error. Solve the error and again compile.

Working with Universal Microprocessor Simulator

 Running Program

After compilation we shall run the program. But before that we have to reset CPU by pressing ‘RESSET’ button 

 on toll bar. There are many options given to run program like step over, step into, 

  go (run) etc. So if you want to execute program step by step then press step over button from toll bar. You will see the program is executing step by step. In the status bar you can see the CPU time and number of cycles executed (both the things can be viewed from view->cpu status menu).

Universal Microprocessor Simulator

Now to see the output go to configure->cpu register. The cpu register window will appear on screen. Then click ‘add’ button and you will see the list of all register appears on screen.

Universal Microprocessor Simulator

Select registers P0, Acc and CY one by one as shown in figure.

Universal Microprocessor Simulator

Now as you execute the program you will see the values of P0, CY and ACC changes. If you right click any register then popup menu will appear to change the base in decimal, binary or hexadecimal.

Universal Microprocessor Simulator

If you double click register then the window appears to change the value of register.

Universal Microprocessor Simulator

If you enable cpu register window by clicking configure->cpu register and double click on any register then following window will appear.

Universal Microprocessor Simulator

From here you can change color setting of register name as well as value, its alignment, base name position, width etc.

 Selecting Resource

Yet we want to see actual output appearing on port P0 indicated by LEDs. So we have to connect LEDs with port P0. For that select resources from configure window. Resource window will open. Then click add button and you will see number of resources like LED, seven segment display, push button, LCD, ADC and lot more.

Universal Microprocessor Simulator

Select one by one eight LEDs. Double clicking on any LED will display following window.Using this window you can change color of LED as well as name.

Universal Microprocessor Simulator

Select one LED and click on connection 

button. Following window will appear.

Universal Microprocessor Simulator

You will see both anode and cathode terminals of LED are given. Now scroll down CPU register window and select P0. Select ‘b0’ from register bit. Then select anode of LED and click connect. Connect cathode with ‘always 0’ and click OK. Do same thing for all leds and connect them with from ‘b1’ to ‘b7’ respectively. Now as you run the program you can see the chasing effect on LED.

 

 Editing Code

Let’s add one more thing to program. Edit the code as given below

org 00h

mov p0, #00h

setb c

wait:     jb p1.0, wait

mov a, p0

loop:     rlc a

mov p0, a

sjmp loop

end

Now program will wait in the loop till pin p1.0 is high. As it becomes low chasing effect will start. Again compile program and reset cpu. Now in step mode program will stop at that instruction and keep repeating loop till pin p1.0 becomes low. To make it low we shall connect a push button switch with that pin. So again select resource tab from configure menu and click add button. This time select push button from menu. As you double click on switch following window will appear.

Universal Microprocessor Simulator

One can set all the properties for the key like name, display, connection type etc. configure key as you want. Then click connection button and you will see this window.

Universal Microprocessor Simulator

There will be either two or three pins on key is given. Select ‘in’ and connect it will ‘always 0’. Select ‘out’ (or ‘out2’) and connect it with ‘b0’ of P1. Click OK. Now again continue to run the program. The program is still repeating same loop. But as you press switch on next step program will jump out of loop and start chasing effect.

You can also add register P1 in cpu register window. For that activate cpu register window by selecting configure->cpu register window. Then click add button and select P1 from window. Now the complete window will be as shown.  

Universal Microprocessor Simulator

Here I have explained use of umps with the use of only one example. But one can connect all the resource given in resource window with 8051. For proper connection and operation of any resource one can always use umps help. For that click help -> index -> resources. You can get simplified datasheet and some useful information regarding that resource.  Use this information and connect any resource with 8051.   

 

So just go on….. ALL THE BEST!!! 

 

Project Source Code

 


Filed Under: Electronic Projects
Tagged With: microprocessor, umps simulator, universal microprocessor simulator
 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Adjustable 0 to 30V 2A DC Power Supply Circuit (Part 1/13)
  • Adjustable +/- 1.25V to +/-22V 1A Power Supply Circuit (Part 2/13)
  • Adjustable 0 to 15V 1A Mini Power Supply (Part 3/13)
  • Constant 12V Power Supply for LED Circuits (Part 4/13)
  • Constant +/-9V DC Symmetrical Power Supply Circuit (Part 5/13)
  • Making a Circuit Breaker (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

“ee

“ee

“ee

“ee

“ee

“ee

Recent Articles

  • STMicroelectronics and MACOM announce successful RF GaN-on-Si prototypes
  • Infineon expands its CoolSiC portfolio
  • STMicroelectronics and AWS collaborate for secure IoT connections
  • Pet feeding system using WhatsApp (protocol bridging with MQTT)
  • STMicroelectronics launches new MDmesh MOSFETs

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd ldr led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics Research robot samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Space Vector PWM Help Needed
  • RFIC LNA cascode base and ground layout problem
  • Unable to launch virtuoso: libvisadev.so error
  • DIY test leads - source for lead ends?
  • P-Channel MOSFET always on

RSS Electro-Tech-Online.com Discussions

  • How to get lots of PCBs made cheap?
  • Adding Current Limit Feature to a Buck Converter
  • 24v dc relays not de-energising
  • How do I test amplifier speaker output polarity?
  • XOR Gate Circuit From Diodes
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering