MICROCHIP has MPSIM, what does ATMEL 328uno have?

Status
Not open for further replies.
I've used MPSIM for PIC chips, it's a great way to write code.

But now for Arduino UNO and the ATMEL328, what are you all using?
 
Its a long time since we used MPSim, but with the Arduino IDE find all thats needed, is to run the code on the Uno or similar and use the inbuilt Serial Monitor along with code instructions to give feedback.

If you want to start using Breakpoints and serious debugging then use something like Atmel Studio IDE with Visual Micro plug in, plenty of good Ytubes on such debugging.

Have to say, for general hobby proects, have yet to find the need to use that kind of debugging with C++ and Arduino, though depends on your projects.
 
Using mpsim, I could single-step and watch registers and flags set, clear and overflow.
I could find conditions not be true to explain why my branch wouldn't work.
I could single-step to a line of code, modify registers to the condition I needed, then continue single stepping or just run at that point.
I could also single-step to count clock cycles for timing time-critical sections.
Or just let it run and watch it eat itself apart and crash. But, I'd know how many cycles it took. Lol.
I was a great tool, and will use it again next time I PIC something.

There HAS TO BE a tool as amazing OR BETTER by now for ATMEL/ARDUINO.

The serial monitor itself has a lot of overhead (IMHO) and not always practical for debug.
MPSIM was truely a window into what's going on.
 
Microchip nowadays says "simulate it in real hardware". It is reasonable. After simulating all my specific delay routines for a new clock frequency, when starting with MPLABX 5.25 plus PICkit4 and ICSP, I did not look back.

My software, now, was (is) run in the hardware itself. What could be better?

Bye MPSIM.
 
There HAS TO BE a tool as amazing OR BETTER by now for ATMEL/ARDUINO.

The serial monitor itself has a lot of overhead (IMHO) and not always practical for debug.
MPSIM was truely a window into what's going on.


Assume you were using Pic Assembly code or if using C, quiet familiar with it.

Many of us here also used Pic Assembly and moved over to Arduino C++ without feeling the need for MpSim, its just a different way and think you will get used to it.
C++ is one of the most popular languages, but not heard of any equivalent to MPSim, which surely if others felt it was needed they would have produced one by now ?
Any timing, branching and similar debugging can be done using the Serial monitor, plus you can readily code your program it to give live , interactive feedback.

The screenshot below shows how we use it to report the status of various flags/registers, ADC values being read and the X/Y values of the touch screen where its currently being pressed, can you do all that with a Sim program ?

Are you are intening to code the AVRs /Arduino with Assembly ?
If so this thread may give you some helpful insight.
https://forum.arduino.cc/index.php?topic=37130.0

 
I've never used, or ever felt the need to use, MPSIM - however, MPLABX now supports ATMEL processors so presumably you could use MPLABX to create code for an Arduino?.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…