Simulating Arduino in Proteus VSM

 This is an old post which I am reposting… also check Simulating Arduino Mega2560 in Proteus.

Arduino platform is a great tool for everyone who wants to play with microcontrollers in a simple and inexpensive way. It offers perhaps the quickest and easiest ways to do cool stuffs with its rich built-in library and easy to grasp interface. It’s also open-source and for this reason there are many open-source projects with it in the Internet. I have personally enjoyed it a lot. Although Arduino is pretty popular amongst many users, there is no good simulator software for it. Proteus VSM, on the other hand, is a very good circuit simulator software. However it lacks a model or simulator primitive for Arduino. Thus simulating Arduino in Proteus is in a way impossible. If these powerful tools can be synced together then a lot of new possibilities will arise. This is what I wondered from day one of Arduinoing. In this doc we will discuss how to integrate these software and simulate Arduino in Proteus.In Proteus we need to add a .hex or .coff file in a micro in order to simulate its behaviour. However Arduino works with .ino or .pde files and the folders that hold Arduino sketches don’t contain .hex or .coff files. Thus there’s no straight way. Now if there’s no straight path then we have to go around.Firstly we have to make a suitable Proteus schematic like the one shown. You can also download a template provided at the end of post.

405495_1826120830872_733664937_nOnce the schematic is completed, we have to set the fuses and clock frequency as shown

429053_1826118790821_849601661_n

… 

 

Proteus and MikroC Tutorial [Video]

screenshot

Proteus as we already discussed earlier in post regarding COMPIM ,is a great tool for embedded Engineers, so here is a  very simple and easy to get started with Proteus and MikroC tutorial through flash demonstrations.These tutorials are hosted on http://smainj.free.fr (These are no more available) but i would embed them one by one in my posts so that they are accessed easily and can be viewed online. you can download them from the link given  and you can view them online here by clicking the link below.

Tutorail1: In this tutorial you would learn

  • Design A schematic  in Proteus using ISIS
  • Using mikroC to write a program
  • Simulate program and circuit
  • Convert Schematic from ISIS to PCB in ARES
Proteus Tutorial, simulating code in VSM & PCB… by dostmhd
CLICK HERE to view This as a flash video in a player with pause/play and seek bar….

 

 

 

“COM Port Physical Interface Model” COMPIM from PROTEUS

I found an interesting feature from Proteus, so-called COMPIM serial port model. The Virtual System Modeling capabilities of Proteus VSM allow the creation of models that can actually interact with the physical world. Such models are called Physical Interface Models or PIMs for short.

The COMPIM model is a Physical Interface Model of a serial port. Incoming serial data is buffered and presented to the circuit as a digital signal, whilst serial digital data generated by a CPU or UART model appears at the PC’s physical COM port. The physical COM part also includes virtual COM port over USB and Bluetooth with some work-around. The COMPIM model also provides for baud rate translation, and for optional hardware or software handshaking on both the physical and virtual sides of the device.

This allows any real world hardware equipped with a serial port to interact with a Proteus VSM simulation. For example, you could use it to develop a program for a microprocessor within Proteus VSM that would operate a real physical modem, perhaps as part of a security or home automation system. By default, the COMPIM supports 4 physical ports.

 

Configuring Power Rails in Proteus ISIS

Proteus ISIS is a nice and powerful simulation tool for electronic designs. For most ICs the supply pins are hidden and they are connected to the 5v power rail by default. Some times one need to use other than 5V value for the supply and i have seen many people don’t know how to do it. In this short post I would show how you can change the value but first if just want to connect the 5V supply to other devices.

In case you don’t want to change the supply voltage and just want to connect it to other devices its fairly simple. Follow the steps

  • Select “Terminals mode” from the left toolbar
  • from the terminals list you can select “Power” or “Ground” and place on the schematic. Power and ground are the power rails that are connected to the hidden pins
  • That’s it, check the images bellow.

This is how it would appear on the schematic.

Changing the Power Rails Volatge

So if you want to use other than 5V power supply you can configure it from the “Design>>Configure Power rails” menu entry. Proteus would give you a dialogue box if you followed this menu from where you can change the value for VCC/VDD and VEE . Just type in the required value and hit OK.

that would lead to the final step.

cheers!

 
popup close button