Position: Index > Control Circuit >

Microcontroller Simulators and emulators

2015-03-03 00:41  
Declaration:We aim to transmit more information by carrying articles . We will delete it soon, if we are involved in the problems of article content ,copyright or other problems.

Sometimes you just haven’t ability to flash microcontroller in order to test program functionality in development phase. For this there may be many reasons like you don’t have a prototype ready or you need to test parts of code and so on. For this there are software simulators used which simulates microcontroller work without microcontroller itself. Simulators usually don’t have connection to real world all operations are simulated in software. Microcontroller simulator is a program model which imitates its work. Modern simulators now simulates not only arithmetic operations but also I/O operations and even peripherals like timers, ADC, USART, I2C and so on. In many cases there is possible to prepare whole project jus using simulator and then burn compiled code to real microcontroller.

Simulators usually allow:

debugging at source code level;

follow operation time in slow motion but with real world values;

connect stimulus signals like they are real world signals.

Simulator can be expressed as several blocks interconnected with each other:

simulator_blocks.jpg

 

This is basic illustration because many moder simulators may have much more blocks.

Memory block imitates work of real memory. Microcontroller program has to be loaded to this memory. O course this memory can be split in several modules like Flash, RAM, EEPROM or even External memory;

Processor model imitates all operations of real processor like accessing memory contents, doing arithmetic operations, storing results back to memory;

I/O model usually reads signals from file where prepared real world signals are stored or it is connected to external circuit model which generates required signals.

Processor model is a core of simulator, because it controls all operations including interrupts. Working with simulator gives many benefits because you can see all parameters just in one window. You can stop processor at any point, change memory contents at any time jus by clicking on screen. But one disadvantage is that simulator is totally isolated from real world. So another option is to useEmulator.

emulator_blocks.jpg

 

Emulator is much closer to real world conditions, because software is emulated in real hardware while results are seen in special emulator software. In order to emulate target microcontroller special adapteris needed which interacts between host computer and target board. Usually Jtag interface is used to emulate. As a result of using emulator you can precisely emulate microcontroller work even more you don’t need to take care on input signals from sensors as they come from real circuits.

 


Reprinted Url Of This Article:
http://www.scienceprog.com/microcontroller-simulators-and-emulators/