PulsePar 1.1
Users' Manual

  1. Introduction

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

  3. Getting Started

  4. Timing

  5. Resolution and Reliability
    1. Resolution
    2. Timer
    3. Pulsation

  6. License Agreement

  7. History

  1. Introduction

    PulsePar turns a PC into a multi-channel pulse or square wave generator 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 PulsePar and control it by SeriCon on your GUI PC through serial port. The free trial version of SeriCon is enough in many cases. Important features are:

    • PulsePar is now a 8 channel pulse generator. Pulses or square waves mean that it just turns on and off the port pins (i.e. lets the voltage levels oscillate between the high and the low levels). SeriCon shows only 4 channels, unless you have the full license.

    • The period and the duty ratio of each channel(pin) are adjustable by changing the high and the low level durations.

    • The phase differences between channels are adjustable.

    • Frequencies around several 100kHz can be reached.

    Therefore PulsePar also can be used in testing servo motors and stepper (stepping) motors, as well as in general PWM (pulse width modulation) applications.

  2. Installation

    1. System Requirements

      • CPU: Intel 80386 or higher

      • OS: DOS

    2. Install

      PulsePar 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 pulsepar.exe in a dos PC (sometimes called the target PC in this manual), and the other files (this manual) in any PC (usually your GUI PC).

      Connect the electric system (oscilloscope, motor, ...) to some or all of the 8 pins in the target PC's parallel port. They are the so-called "printer data" pins, named "D0" to "D7".

    3. SeriCon

      SeriCon is a universal interface program to external hardwares. In our case, the target hardware is the PC running PulsePar. 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 PulsePar 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 pulsepar.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 PulsePar 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 about generating 8 channel pulses. A channel name "Ch x" corresponds to the port pin "Dx". Note that the trial version of SeriCon have a graphic area size limit so that you can see only the first 4 channels.

    The rectangled texts are called buttons since they accept mouse clicks. Click the Pulse button (the exact text being "start Pulse") or send "p". Then PulsePar starts to raise or lower the voltage levels to generate the pulses according to the timing specifications for the channels. The default values generate synchronized 8 channel pulses of 10kHz and 50% duty ratio. Clicking the button or sending "p" once again, stops the pulses.

    If you don't have any oscilloscope to test PulsePar, try ScopePar. It turns a PC into a square wave oscilloscope which is controlled by SeriCon. In that case you may run 2 instances of SeriCon on your GUI PC, to control 2 dos PCs for ScopePar and PulsePar, with 2 serial ports of the GUI PC connected to them.

    The first of the next 2 chapters shows how to vary the time values, and the second describes how to expand the screen width to use 32-bit numbers for time values with some comments on reliability.

    Note that the serial communication between PulsePar and SeriCon produces delays in the pulse timings. Not only the Tx window but also a mouse-click on the Rx window of SeriCon send some data to control PulsePar, and PulsePar consumes some time in checking the data, waiting for the additional data and sending the results. Therefore in many cases you may stop the pulses before changing the specification.

    Note also that one running of PulsePar must correspond to one running of SeriCon ('s port). That is, do not turn off and on again SeriCon while running PulsePar, 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.

  4. Timing

    Clicking the Unit button (with the additional text ": micro sec") changes its additional text into ": mili sec" and ": sec", which also multiplies the time values by 1000 with the corresponding number unchanged. Clicking by the right mouse button instead of the left reverses these changes. Sending "U" and "u" in the Tx window produce the same results as those of the former and the latter clickings respectively.

    There are 3 time values for a channel, to adjust. "tL" and "tH" are the durations of the low and the high levels in a period (cycle), so that the period (of one cycle) is the sum of them. On starting the pulse (by the Pulse button or "p"), a period begins with the low level, if "Shift" is 0. The Shift value shifts the whole wave train from a channel, backward on the time axis.

    Clicking one of the Shift, tL and tH buttons, or sending "S", "L" and "H" respectively, increases the time value of every channel. Clicking with the right mouse button or sending "s", "l" and "h" respectively, decreases them. Before changing the values, they are "selected" which are indicated by the inversed images. You can select and change the time value of only one channel, by clicking the time value of the channel, or by sending "3" if the channel is Ch 3 for example. Sending "8" lets the time value of every channel be selected.

    The amount of change is specified by the "logD" button where the additional text ": 0" means the amount is D = 10^0 = 1. The button is also called the "Delta" button. Clicking it with the left mouse button or sending "D" multiplies D by 10, while clicking with the right mouse button or sending "d" divides D by 10.

    To specify a number as a time value, send "n". Then PulsePar gets waiting for you to send an integer. Be sure to select "Integer 4" in the combo box at the right of the Tx window, before typing and sending a number, and to select back "Characters" after sending. If the time value of every channel is selected, all of them will be modified by the number.

    Note that the values are bound within -128 to 127. You can remove the limits if you have the full license of SeriCon, as described in the next chapter.

    There are other ways of changing the values. One of them is the "phase inversion". Clicking the channel name or sending "C" inverts the sign of the Shift. The other is the "level inversion". Clicking the channel name with the right mouse button or sending "c" exchanges the tL and the tH. Clicks on the "Channel" button do the inversions over all the channels. Before doing the inversion, a click on the button also does the same thing as sending "8" does.

  5. Resolution and Reliability

    1. Resolution

      If you have a full license of SeriCon, you may click the "Bits" button (with additional text ": 8") or send "b" to expand the Rx window and to use 32 bit time values removing the limits -128~127. Otherwise, the commands will make SeriCon stop processing so that you should restart the programs.

      The first of the following screenshots is an example of extended time values, and the second is the result measured by ScopePar. The pulses from the 8 channels have the same period 510 + 30 micro seconds. Two of them are shifted, and one of the two is also "level-inverted" (tL and tH exchanged), in view of the others. The two channels, Ch 0 (D0 pin) and Ch 1 (D1 pin) of PulsePar are connected to Channel 5 ("Error" pin) and Channel 3 ("Select" pin) of ScopePar, since the popular "FX" cable is used to connect the parallel ports of the two target PCs (that are both controlled by two instances of SeriCon on the host PC through serial ports).

    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 Pulse 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, PulsePar measures it for a second, to use it as the base of timing.

      The frequency may differ a little from one running of PulsePar 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. Pulsation

      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 output cannot exceed several 100kHz in general.

      To generate pulses, PulsePar circulates in a loop in which it reads the timer port and sets the parallel port pins according to the timing specification. Note that there may be more than the port I/O delays. There are some periodic activities in PC which have top priorities, related to system-timing (called ticks) or DRAM refreshing, for example.

      Therefore, wave trains can be different from what you expect, if time values are around a few micro seconds.

  6. License Agreement

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

    The compressed form of PulsePar, 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 to run pulsepar.exe or to read the others (this manual) freely. Any component is NOT permitted to be de-assembled, de-compiled, reverse-engineered, or modified.

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

  7. History

    • Version 1.1: Aug 21, 2008

      "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: Aug 5, 2008