An alternative to using the 'real' hardware would be the use of an
emulator, that is a program running on what maybe radically different
hardware that 'pretends' or emulates the target hardware at whatever
level the writer deems appropriate. As the emulator is a software
implementation additional facilities maybe included so that in effect
a virtual processor is created.
As it is a software solution some of the functions that would be provided by a Logic Analyser
or oscilloscope would be included in the emulator program. Or in this case an addition program.
There are now a number of PIC emulators available on the internet, including Microchip's own, each has its
good and not so good points. This emulator has, I think, two maybe four good facilities not
- One, the display of the hardware as the target code runs, different to other emulators that
I have tried. If you have not used microcontroller I.C.'s previously the display gives
an idea of the hardware state as instructions are executed. This other version does link give a nice graphic, windows style rather than my Dos style.
Unlike my program which is free that one is not. Very reasonable though.
- Two, the use of trace files that record the state of the target hardware and maybe analysed with
software. The use of a text editor 'Find' can help without the need of anything more advanced.
- Three, as the emulator source is written using QuickBasic it is very easy to alter either to fix bugs or to add a facility that has not been provided. The source is compiled using QuckBasic 4.5 which allows code to be linked from any other language, should you be a 'C' guru.
Possibly not so good is the lack of 'virtual devices' and there is no correlation between emulator speed
and target speed. More modern advanced emulators, such as the one above, allow virtual async terminals or 'scoped pin outputs.
In this program the later is achieved using a seperate program to analyse a trace file.