ScopePar 1.1
Users' Manual

  1. Introduction

  2. Installation
    1. System Requirements
    2. Install
    3. SeriCon

  3. Getting Started

  4. Automation

  5. Triggering

  6. Resolution and Reliability
    1. Resolution
    2. Timer
    3. Sampling

  7. License Agreement

  8. History

  1. Introduction

    ScopePar turns a PC into a multi-channel oscilloscope module utilizing the parallel port, the user interface to which is SeriCon on other PC. If you have an old PC, boot it by dos to run ScopePar and control it by SeriCon on your GUI PC through serial port. The free trial version of SeriCon is enough in usual cases. Important features are:

    • ScopePar is now a 5 channel square wave oscilloscope. Square waves mean that it just reads the high or low levels of the port pins (Later versions may be able to show curves, requiring ADC attached to the port). SeriCon shows only 2 channels, unless you have the full license.

    • Sampling rates around several 100kHz can be reached.

    • The measurement can be triggered by the first channel. You can select the kind of edge (rising or falling).

    • The system to measure also can be triggered by the output data pins just before a measuremet period starts.

    • The measurement can be automated by specifying the period of sending the command from SeriCon (with the full license)

  2. Installation

    1. System Requirements

      • CPU: Intel 80386 or higher

      • OS: DOS

    2. Install

      ScopePar is distributed as a compressed file, *.zip. The installation process is simple. Just extract all of the files contained in it into a folder in any PC. Use scopepar.exe in a dos PC (sometimes called the target PC in this manual), and manual.htm (this manual) in any PC (usually your GUI PC).

      Connect the electric sources to be measured to some or all of the 5 pins in the target PC's parallel port. They are the so-called "status" pins, named "Acknowledge", "Busy", "Out of Paper", 'Select" and "Error". If you need a rising or falling signal to control the electric system (sources) just before the measurement starts, you may use one of odd data pins (D1, D3, D5, D7) or even data pins (D0, D2, D4, D6) respectively.

    3. SeriCon

      SeriCon is a universal interface program to external hardwares. In our case, the target hardware is the PC running ScopePar. SeriCon 2.5 or higher is needed. Go to http://www.softbattery.net/sericon for the free trial version or the full license. We call sometimes your GUI PC running SeriCon, the host PC. Connect the two PC by a usual serial port cable called a "null modem cable".

  3. Getting Started

    Open the host PC serial port by checking the [Port]->[Run] menu in SeriCon. To close the port, uncheck it. You can see if it is open, by the last part in the status bar. The 4th part shows the port name. You can change the port (to COM2 for example) by the [Port]->[Select and Run...] menu, after the present port closed.

    As ScopePar shows in the target PC monitor, configure the host PC's serial port configuration using SeriCon's [Port]->[Configuration...] menu to have the same baud rate (9600), 8-bit data, no parity, 1 stop bit and no flow-control. The target PC can get rid of the monitor and the keyboard unless you want to use COM2 instead of COM1, using autoexec.bat in which you specify the path of scopepar.exe, although the keys 'x', '1', and '2' can be input to terminate the program and to select the ports. From now on throughout the manual, all the words about UI (user interface) refer to SeriCon.

    Send 'i' to let ScopePar initialize the work, by typing 'i' in the Tx window and pressing the Enter key (or clicking the Send button). Be sure that "Charaters" be selected in the combo box. You will see the rX window become dark blue and display various texts and 5 rulers representing the time axis. Note that the trial version of SeriCon have a graphic area size limit so that you can see only the first 2 rulers.

    The three rectangled texts are called buttons since they accept mouse clicks. Click the Measure button (containing additional text ": No triGger") or send 'm'. Then ScopePar starts to measure and show the result. The following screenshot shows the result for 10Hz, 100Hz, 1kHz, 10kHz and 100kHz sources.

    As depicted above the 5 rulers, one measurement reads the channels during the time 10t, where t is specified in the t button as "t = 10^2 microsec". The left and the right mouse button clicks on the t button change t by multiplying 10 and by dividing 10 respectively, which also correspond to sending 'T' and 't' respectively.

    Note that ScopePar does not accept any command (no matter whether sent by mouse or character) during measuring and displaying the result. The 5 channel names are inverted during the two steps, and the ruler text (0t ~ 9t) is inverted during the display step.

    The t button gets inverted when the value is changed, and remains inverted until the first measured result starts to be displayed since the change.

    Note that one running of ScopePar must correspond to one running of SeriCon ('s port). That is, do not turn off and on again SeriCon while running ScopePar, and vice versa, since the states of them varies as they communicates.

    Sending 'x' will terminate the program, so that you can restart it by the target PC's keyboard.

    The Channel names came from the pins. The numbers are the pin numbers minus 10, and the alphabets are the first letters of the pin names. For example, Channel 0 (A) means that the pin number is 10 (in an end of a parallel port cable) and the pin name is Acknowledge.

  4. Automation

    Tired of sending 'm' or clicking the Measure button? SeriCon is capable of sending the Tx data automatically with the period customisable. Now set 'm' in the Tx window. Check the [Auto]->[Tx] menu to start the automation. Unchecking the menu stops it. You can change the period T (upto 2 sec without the full license) in the Outputs Automation group in the dialog box popped by the [Bit]->[rX, Outputs...] menu. If you don't have the full license, SeriCon does not repeat sending more than 3 times. Otherwise, SeriCon can repeat indefinitely, by specifying 0 as N in the box.

    You can customise SeriCon further by checking the [Auto]->[Tx On Open]. Then the automation starts when the port gets open. Since the [Port]->[Run On Start] is already checked, the automation starts right after SeriCon starts to run, if you save all the options to a file. Be sure that 'i' be in the Tx window when you save so that the file also memorize it. Then, right after you run ScopePar and SeriCon, the blue graphic area automatically appear and with typing 'm' in the Tx window the periodic measurements starts. You don't have to hurry up 'm', since 'i' more than once is not harmful (ScopePar neglects 'i's after the first 'i').

    You are recommended to create "simple.scs" in the SeriCon folder, using the [File] menus. Then, SeriCon loads the options from the file, not only when you run by double-clicking the file but also double clicking SeriCon.exe. (You are assumed to have associated the file extension "scs" with SeriCon in your host PC.) You can create other files if you want various sets of options.

    There are many other options customisable in SeriCon. Refer to the document in the SeriCon package if you need to know further. In the document, you will see also the data formats in the serial communication defined for various conversions from binaries to texts and graphics which are attractive if you are going to use SeriCon as the user interface of your microcontroller or dos projects like ScopePar.

    You are recommended to close SeriCon's port (or terminate it) before turning off the target PC, especially if you use the automation, since otherwise some commands from SeriCon can be left in the target port which will be processed by ScopePar in the next run. That is because, without initializing ('i' command) in ScopePar, SeriCon is not able to understand the data sent from ScopePar (by any other commands).

  5. Triggering

    Channel 0 can be used to trigger the measurement and display. To make it work, click the Measure button by the right mouse button or send 'g'. Then the button text toggles between "Measure: LH triGger" and "Measure: HL triGger", which mean that the measurement starts when the pin level gets changed from Low to High, and from High to Low respectively. You may turn off the Tx automation before using triggering. Why not?

    There may be some microseconds of delay between the level change and the measurement.

    On the contrary, the system to measure also can be triggered by ScopePar, as follows, which may be used in the non-trigger mode ("m" command) in general. While the LPT1 (the first parallel port) status byte (5 pins) are used to measure, the LPT1 output byte (D0 to D7 pins) gets inverted to be 0xaa just before the measurement starts. The byte comes back to 0x55 right after the measurement, which is the initial value set right after the program starts. Therefore if you want a rising or falling signal to trigger or control the system just before the measurement starts, you may use one of the odd or the even numbered bits out of D0 to D7, respectively.

  6. Resolution and Reliability

    1. Resolution

      The default spatial width corresponding to the time 10t of one measurement is 200 pixels, so that one t corresponds to 20 pixels, as you can see every other pixel colored in each of the 5 rulers.

      Click the Resolution button by the left or right mouse button to increase or decrease the number of pixels for 10t by 200 pixels respectively, which corresponds to sending 'R' or 'r' respectively. The maximum is 800 and the minimum is 200.

      Note that the trial version of SeriCon have the graphic area size limit so that only a portion of the extended number of pixels, while you can see wider area if you have the full license.

    2. Timer

      If you have the full license of SeriCon, send 'f'. (Without it, SeriCon refuse any further processing until the port closed.) Then on the right to the t button, you see a text "timer: 1138500 Hz" although the number may be different a little. It is the internal semiconductor timer's frequency in the target PC. Right after starting to run, ScopePar measures it for a second, to use it as the base of timing. Therefore decreasing t below 10 microseconds is meaningless.

      The frequency may differ a little from one running of ScopePar to other, and the difference would be smaller if the time for measuring it were longer (than 1 sec). Later versions will be improved.

      The real frequency itself may vary according to temperature for example. But it is very small (generally maintained by the crystal oscillator!) in contrast to the error in the measured value as described in the previous paragraph.

    3. Sampling

      Although usual PCs have about 100MHz to several GHz CPUs, their I/O ports are much slower than CPUs. The time for one input or output is around some microseconds. Therefore the frequency of the parallel port readings cannot exceed several 100kHz in general.

      In one measurement, ScopePar circulates in a loop to read the timer port and read the parallel port. Note that there may be more than the port-reading delays. There are some periodic activities in PC which have top priorities, related to system-timing (called ticks) or DRAM refreshing, for example. Therefore, the timer port reading (the counter) may not increase by the same amount from cycle to cycle in the loop. Furthermore the real time when the parallel port is read, may be some unknown value between the two times represented by the timer readings after and before the parallel port reading.

      The rule of displaying the measurement result (using red dot) is the following:

      • The pixel (for high or low levels) are colored (red) if there exists timer reading value corresponding to the time slice corresponding to the pixel. There will be no red dot if not.
      • The level of a red dot is according to the parallel port reading just before the timer reading.
      • If there are more than one timer reading corresponding to the time pixel slice, the first one is used.

      Briefly speaking, you should not be sure that a red dot belongs to the real time slice if there is no red dot in the next slice (pixel). The real time of the red dot is unknown upto the time slice before the next red dot.

  7. License Agreement

    ScopePar is Copyright(C) 2008 http://www.softbattery.net.

    The compressed form of ScopePar, which is a file with "zip" extension and in which this file (manual.htm) is contained as one of the components, can be freely copied and distributed as far as it is not modified.

    A copy of the compressed form can be freely extracted into the component files scopepar.exe and manual.htm, to run the former or to read the latter freely. Any component is NOT permitted to be de-assembled, de-compiled, reverse-engineered, or modified.

    ScopePar is provided as is, without warranties of any kind. The copyright holder shall NOT be liable for damages of any kind.

  8. History

    • Version 1.1: Aug 21, 2008

      The LPT1 output port can be used to trigger the system to measure: Just before the measurement starts, the port byte gets inverted (0xaa). The byte comes back to 0x55 right after the measurement, which is the initial value set right after the program starts.

      "x" command is added, which terminates the program.

      The program gets robust: ignores any command else than "x" and "i", before it receives and processes the "i" command, so that wrong commands cannot spoil the states of the program or SeriCon.

    • Version 1.0: July 4, 2008