Sunday, January 2, 2011

How to simulate arduino programs using virtual breadboard

VirtualBreadBoard is a simulation and development environment for embedded applications that use microcontrollers. VBB simulates many of the PIC16 and PIC18 microcontroller devices including peripherals and supports a wide variety of simulated components such as LCD’s, Servos, logic and other IO devices that can be used to model and simulate high level circuits. 
       VBB Can also simulate an arduino board with serial communication capabilities.
In this tutorial i am going to show how to simulate the LED blink arduino program using VBB.
STEP 1:Make a scetch
Create an arduino sketch using the arduino IDE .
Compile this sketch to see it is free from errors .And save it.
step 2:Open VBB
Open Virtual BreadBoard. (download and install dependencies if you are getting any errors).
 Select new project and click open


 STEP 3:Add components
You can use the toolbox to add components.to add an arduino board click on Arduino and select Arduino board.You must save the project before adding the arduino board.
Add two leds from user I/O section and place it on pins 13 and 12.
STEP 4:Load arduino scetch to the board
(i)In the overview section on the top right corner right click on the saved file name and select Add Arduino source project from Source project menu.


(ii)Select ok in the coming dialog box

(iii)Now right click  on the source0.SRC field in the overview area and select Add New Arduino source file.


(iv)Import scetch
Click on import and select the sketch you have saved in step 1.select the imported sketch and click OK

(v)Edit the properties of arduino board 
Click on the arduino board and in the properties section click on the application drop down menu and  select source0.SRC




STEP 5:Run the simulation
Click on the run simulation button on top of the vbb window.





2 comments:

  1. Hi!
    This is very helpful. I was just looking fot this for a long time, which runs on linux. Is there an appllication like VBB for linux.

    ReplyDelete

read more

Related Posts Plugin for WordPress, Blogger...

ShareThis