Simulator of Nano

Hello all,

in vain I search for a simple simulator for Arduino Nano. All I want is: 1. I load my simple code for Nano 2. I start the code 3. I see an image (graphics) of Nano module where I could see the voltages on output pins, and where I could set status (voltage) of input pins.

I tried: 1. Virtronics - looked promissing, very intuitive, but awfully full of bugs 2. CodeBlocks - not so obvious, probably I need Arduino Builder, but the application crashes constantly

I feel very disappointed. Jees, is there anything SIMPLE that would fit my needs without crashing all the time?

Thanks for any hint.

Petr

Yes, there is something simple. It’s called a Arduino Nano. Just grab one, connect it and start coding :slight_smile:

Simulators will go wrong in a lot of slightly more complex situations very easily. They are more a burden then they are a blessing.

Maybe, yes. On the other hand, having a good simulator I could make use of time and develop when, for example, travelling with my laptop on my knees.
In the past I used BASCOM AVR IDE, there was an excellent simulator, very accurate, I could also view result on LCD, etc. Never came accross any differences between simulator and real chip behavior.
P.

But as long there is no better simulator available (maybe you can write one) you are far better off to deal with the real guys.

Like I said, a simulation is very limited. Especially when dealing with external components (even a switch). But what made you stop using BASCOM AVR IDE?

Btw, travel all the time with my laptop AND a box of Arduino and/or a test setup :)

Good question! I used BASCOM to program ATMEGA16, doing something like this: http://ok1fig.nagano.cz/UC5695/MenuSystem.htm using this programmer: http://www.digikey.com/product-detail/en/ATAVRISP2/ATAVRISP2-ND/898891 for the ISP. I belive that I can't use the same stuff to program Arduino Nano. Am I mistaken, please?

Petr

One solution, if you must simulate it, is to simulate the basic ATMEGA328 Chip only, instead of the Nano which simply incorporates it. I guess you are only interested in running sketches on it (in as near to real time as the simulator can manage) and seeing what happens on the GPIO pins. Or are you interested in what is happening on the USB Bus, FTDI chip voltage regulator etc. etc.

Also, there are stacks of different Nano clones with different characteristics eg CH340G USB chip etc. etc.

Yes, I actually need to simulate ATMEGA328 chip rather than the whole Nano. After all, when I stare at the schematics of Nano, there are no other semiconductors between pins of the chip and pins of Nano. Just wires. All I need is to watch (or set) the pins to prove the logic of the sketch. If I could use BASCOM with all the possibilites it brings (simulator) it would be a big relief to me. Besides I have written and debugged a lot of code in that BASIC language. P.

The extra electronics around the main chip are for - powering (regulators for 5V and 3.3V), - filtering a bit (capacitors, resistors), - clocking (crystal, caps) and - USB/serial communications

So you would be perfect with just dealing with the processor simulator to check the logical parts of a sketch.

Thanks to you guys. I moved a lot ahead in my thoughts today. If I understand the things I could switch BASCOM IDE from ATMEGA16 to ATMEGA328 and develop in the same way as I did before, incl. using simulator, etc. As far as I remember, the result was then compiled to HEX file and using another SW and the HW mentioned before it was burned into the chip through ISP. Is there any chance to deliver the code (compiled?) written in BASCOM IDE into Nano? As far as I know Arduino Nano doesn't support ISP. P.

"As far as I know Arduino Nano doesn't support ISP." If you can connect to Reset, Power, Gnd, D11-D12-D13, than ISP is supported. Last time I looked, Nano had an 2x3 ICSP header just for that.

If BASCOM IDE can create a .hex file, it can be uploaded into the Nano through various means.

Hi Petr

We just saw this post. The Virtronics Simulator for Arduino can easily simulate the Arduino Nano. From the Simulator, select the menu option Hardware > Nano or else add a commented line // Simulate(Nano).

We have had this functionality for a while.

I see there is a note that Simulator for Arduino is full of bugs. I am not sure where this information comes from, but as far as we know Simulator for Arduino works well for most sketches. We do self-test the Simulator against around 3000 lines of code before any release and any issues are quickly fixed and test scripts added.

We know there are a few issues with 64 bit integers, and C++ custom libraries which we are always working to improve. Customer feedback about bugs and crashes has been diminishing and we receive maybe one email every 2-2 months about some minor issues.

Possibly, an old version was being used. The latest version is v1.04 and new version will be released next year. We have noticed that we have a lot of repeat customers taking up the annual subscription option so it cannot be too bad. We also get a lot of positive feedback, like the quote below.

Great program, I appreciate your efforts.