How to Simulate PIC Microcontroller in Proteus Design Suite 8

This is our PIC Microcontroller tutorial series. We have already discussed basic beginners guide to PIC. Now let’s see how to simulate the PIC microcontroller?PIC simulation is the important step that you should do before practical implementation of any microcontroller projects.

As Circuits Gallery covers topic of Microcontrollers especially with PIC (Peripheral Interface Controller), this guide shows how to simulate PIC in one of the best PIC microcontroller simulation software β€˜Proteus Design Suite Version 8’.

A simulation software can interact with the embedded project with screen indicators for example LED, LCD displays, switches and buttons. The simulation takes place in real time.

How to Simulate PIC Microcontroller in Proteus Design Suite 8Why we Need Simulation?

What is the purpose of simulation? Before going to the practical implementation of the circuit we have to test whether the embedded program will work perfectly for our project.

Here comes the importance of simulation softwares. Such software provides an environment to test our microcontroller program.

It is possible to play with your microcontroller just as in real world.

This article dealing with the most powerful simulation software the Proteus Design Suite Version 8.

It is good to have the following knowledge before going to PIC Simulation

What is Proteus VSM?

Proteus Virtual System Modelling (VSM) has mixed mode SPICE circuit simulation, animated components and microprocessor models to ease co-simulation of complete microcontroller based designs.

Over ten years later, Proteus VSM is still primary in the arena with more microcontroller variants and peripherals than any competing product, better debugging tools and instruments and a consistent focus on innovation.

With Proteus you can

  • Alter your β€˜hardware’ by rewiring the circuit diagram, varying component values for resistors, capacitors etc.
  • Removing or making new components to the design.
  • You can change your firmware in the IDE of your choice and, once compiled, test the new code on the new system at the press of a button.
  • Reprogramming microcontroller: In practical there is limitation to flash the memory of microcontroller but in Proteus you can burn program unlimited times.
  • Attain confident that your program will work for real world applications.

This brings you total freedom to experiment with diverse ideas and to discover the optimal design solution for our project. The schematic serves as a β€˜virtual prototpyeβ€˜ for the firmware and it’s quick and easy to make changes to either.

Advantages of Simulation

Let’s start Proteus Simulation

In this example I already buildΒ .HEXΒ file of LED blinking program.

Read our old article if you don’t knowΒ how to build .Hex file.

Now I’m gonna to show you how toΒ simulate PIC16F877A microcontroller using Proteus.

Step 1:Β Create a new project
ClickΒ New ProjectΒ button.

Now give aΒ NameΒ to our project

Do not change anything, just follow the default options and click Next until you see Finish button.

Step 2:Β Draw the circuit diagram
Now clickΒ Schematic CaptureΒ button, you will be directed to schematic panel.

Step 3:Β Add components to work space
ClickΒ P buttonΒ followed byΒ Component buttonΒ under Devices for picking components

Step 4:
Choose your component by simply typing the name at Keyword box. After selecting item click OK.

The selected components will listed under Devices.

Step 5:
Now draw the circuit diagram as shown below.

Step 6:
Where is the ground terminal in Proteus 8? ClickΒ Terminal modeΒ button to get different terminals,

ClickΒ GroundΒ and add to our schematic.

Step 7:Β Set Memory clear pin to high
Apply MCRL signal to PIC MCU, ClickΒ Generator modeΒ button and choose DC.

Connect it as shown below diagram.

Double click on the DC terminalΒ and set its voltage asΒ 5.

That’s all our basic connection for the simulation over.

Step 8:Β Set clock frequency to PIC MCU in Proteus
Double click on the PIC IC, theΒ Edit component wizardΒ will open. Set the frequency as same that you did for generating .HEX file. (I compiled my embedded program withΒ 10MHz, hence I selected 10MHz here).

Keep rest options as default.

Step 9:Β Load .HEX file to the schematic diagram of PIC
After setting frequency clickΒ browseΒ button to load theΒ .HEXΒ file.

Choose yourΒ .HEXΒ file

Finally clickΒ OK. Now everything ready to go.

Step 9:Β Let’s run simulation…!
Click theΒ Run SimulationΒ button at bottom left corner and observe your PIC simulation.

Yes, now you have successfully simulated your PIC project… Play more and more and explore your
Virtual lab….

 

Source : How to Simulate PIC Microcontroller in Proteus Design Suite 8


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.