© 1998 Wilbert Bilderbeek, Harry Broeders and Alex van Rooijen.
THRSim11 is a Windows-based simulator that lets you edit, assemble, simulate, and debug programs for the Motorola 68HC11 microcontroller. THRSim11 simulates the CPU, ROM, RAM, and all memory-mapped I/O ports, and on board peripherals, such as the timer (including pulse accumulator), analog-to-digital (A/D) converter, parallel port, serial port, and I/O pins (analog and interrupts). Furthermore, a number of simulated external components can be connected to the pins of the simulated 68HC11 while debugging, including LEDs, switches, analog sliders (with variable voltage potential), and serial transmitters/receivers. There is also a 4x20 LCD character display mapped in the address space of the 68HC11.
THRSim11's user interface lets you view and control every register (CPU registers and I/O registers), memory location (data, program, and stack), and pin of the simulated microcontroller while debugging. You can also stop the simulation at any combination of events.
For more information about THRSim11 click here.
Central to THRSim11's design is the Observer design pattern (See Design Patterns: Elements of Reusable Object Oriented Software by E. Gamma, R. Helm, R. Johnson and J. Vlissides page 293). We first extended this pattern to make it easier to apply. Later on we extended the Observer pattern even further (using Microsoft's COM) to make it possible to observe subjects from within other applications. This makes it possible to separately develop components that can be connected to the pins, registers, and/or memory locations of the simulated microcontroller. The components currently available include LED, switch, and several kinds of seven segment displays.
For more information about components that can be connected to THRSim11 click here.
We are currently working on the THRSim11 Component Development Kit, which lets you develop your own components. Because this framework is based on Microsoft's COM specification, any programming language that supports COM can be used. This includes Visual Basic, Visual C++, Borland C++, Delphi, C++ Builder, etc. We hope to release thee THRSim11 CDK in the first quarter of 1999.
A small part of this article appeared in the March 1999 issue of DrDobbs Journal.