Society of Robots - Robot Forum

Software => Software => Topic started by: m4nti on September 24, 2009, 01:52:41 AM

Title: Simulator
Post by: m4nti on September 24, 2009, 01:52:41 AM
Hey guys,

This forum has been very helpful and I'd like to ask something here. I dunno if this should be in Electronics but anyway...

Is there some sort of software with which I can "simulate" electronics for my robot? Say, I have some software written for my microcontroller, then attach the devices I'm using (everything virtual) and see if anything happens?

I dunno if something like this exists but it would be pretty awesome.

Thanks a lot :)
Title: Re: Simulator
Post by: billhowl on September 24, 2009, 06:05:31 AM
here's a great Circuit Simulator java applet, I found it really useful to understand basic electronics!
http://www.falstad.com/circuit/ (http://www.falstad.com/circuit/)
BSim is a behavior-based robot simulator java applet which allows users to experience the power of programming robots using a behavior-based architecture.
http://www.behaviorbasedprogramming.net/ (http://www.behaviorbasedprogramming.net/)
http://sourceforge.net/projects/bsim/ (http://sourceforge.net/projects/bsim/)

Title: Re: Simulator
Post by: guncha on September 24, 2009, 03:53:34 PM
There are plenty of electronics simulators out there. Qucs http://qucs.sourceforge.net/ (http://qucs.sourceforge.net/) comes to mind (it's free as in freedom). But the only one I know that can use a microcontroller in simulation is Multisim 10, unfortunately it's only PIC's.
Title: Re: Simulator
Post by: m4nti on September 24, 2009, 10:52:25 PM
I've gotten my hands on Microsoft Robotics Studio 2008... anybody ever played around with it? Seems to have an inbuilt simulator with controllers too...
Title: Re: Simulator
Post by: galannthegreat on September 24, 2009, 11:47:23 PM
I have, but to really get full function of them you need the full version or the academic version (costs money).
Title: Re: Simulator
Post by: Sandgroper on September 28, 2009, 10:01:19 AM
Have a look at the website for the microcontroller you're using. 

Microchip's MPLab IDE for instance is a great way to go if you're using PIC chips.  The software is a free download and there is ample support.  You can use "Debug" to single-step through the program or run your program at various speeds and watch what's happening in the "watch" windows.   The watch windows allow to you see which pins are switching on and off and when.  They also show what's happening to the values in your variables or registers.  You can also set up stimulus files to mimic the action of inputs switching on and off at various intervals.   The "stop watch" window is very handy too.  You can also set traces on the program so that you can see what happens as your program jumps from routine to routine. 

Once you're happy with the performance of your program you can then download it to your chip via your choice of programmer.  They also have a range of emulators and programmers.  Most of their products support In Circuit Serial Programming or I2C, and their parts selector page makes it easy to find the best chip for the task. http://www.microchip.com (http://www.microchip.com)