Maker Pro
Maker Pro

Simulating a circuit which has an ATmega328, is it a waste of time?

I'm trying to judge if it would be viable to simulate my code and circuit on a software such as Proteus(or anything else? Suggestions welcome :)) since it has a lot of constraints: Time/Money/Part Availability in my region. Also if you guys had the option of Simulating than testing and building a large circuit to get the best/most efficient one out, which would you pick(Leaving out the love for building prototypes)? Simulating or building(in terms of least time consuming and most cost efficient)

 
Last edited by a moderator:
Well, simulating a mcu would be very difficult indeed since you would have to simulate all of its internal registers, etc while it was running your program. As steve points out, why? The way to do this is to simply compile your code, and run it on the chip. You can then either scope it to watch in real time or have it run your input/output devices to verify its functions. Simulation has its place, but simulation itself is an art. Simulation software is limited in that there are only so many parameters that can be accounted for - and a further drawback is that most people do not know how to use the software correctly (me too). Sim software assumes a knowledgeable user - i.e. someone who knows what fields need to filled in under the appropriate circumstances.
 
I tend to simulate the analog portion of a circuit by using LTSPICE. It it is driven by a micro, I make a voltage source that simulates what the output of the micro should look like.

Bob
 
Proteus doesn't always get it correct...Just be aware that an issue, should you have one, might not be an issue with the code! Always test on bare metal!
 
Top