A Scope for MPSIM Trace Files

As I have mentioned elsewhere, using MS Excel to generate the stimulus file is half the battle. The other half is checking the trace file.

I have written a program in Visual basic to read the trace file and display it in a fashion similar to an oscilloscope. Well not exactly... The trace files for my applications were humungous - so I used grep to get lines referring to port B only. This is then read by the VB program. Here is a screen shot.

Clicking on the Load button loads the trace file. You can set up to 8 channels. For each channel select the bit no. in Port B to be displayed. The time per tic can be selected from a range of values. The display above has been set to one division per bit at 1200 baud.

The program is still in a crude state. For example, the name of the file is hard-coded. The executable and the source can be downloaded.

A DCC Scope

The same program has been modified and the DCC decoding logic added to add the DCC packet content to the scope trace. This saves me having to read the trace and recognise DCC packets the hard way. Here is a screen shot.

The display on the screen shows two channels. The first one is RB0 and shows an idle DCC packet being sent - a preamble, FF, 00 and FF. The second channel is RB3 and shows a series of 0s. Here is the executable and the source.

Hey ... wait a minute! If I can completely write and test a program on a PC and know that it will work on a real circuit maybe I don't need to build the circuit at all :-)

Home Back Previous Next
Updated on 20 Jan 97. Feedback to