Linux driver for DSO-2100 oscilloscope (parallel port
version)
This page describes the driver and GUI program for the parallel port controlled version
of the DSO2100 oscilloscope.
Disclaimer
The software described here is provided under the GPL license, without any warranty!
If you decide to use it, you are doing it on your own risk.
For example the DSO2100 uses the parallel port in the bidirectional mode, so if you
connect it to the standard parallel port, something may get damaged.
Also the software bug, may cause both DSO and the PC to drive the data lines simultaneously,
which can lead to hardware damage.
The software has worked for me, but I can not warrant, that it will work on any system.
It is also possible, that the files published on my site have got corrupted.
So again: If you use it, you do it on your own risk!
The software is provided with all the sources, so I advise you to verify it, before the use.
Description
All informations needed to write this software have been obtained from the site
Limitations and Parallel-Port Interface Documentation of the Hung-Chang DSO-2100 PC-Based Oscilloscope
, and from experiments.
The initial version of the driver has been written under the GPL license by one of my students
- Piotr Mikolajczuk. The current version includes some my corrections and additions, mainly
oriented on the cooperation with the udev daemon (and may be some new bugs introduced by me ;-) ).
The driver source may be downloaded here.
The GUI program
has been written in Python, and uses many additional libraries, like matplotlib, pygtk,
glade. So please verify that yoe have installed all the necessary libraries, before you try to run
this software.
I have to apologize, but my GUI program is only a very simple "proof of the concept" software,
oriented rather on the verification of the functions of the DSO2100, not on the building of the
fully functional GUI.
Therefore the displayed values are expressed in the sample values and sample numbers, instead
of volts and seconds or microseconds. The calibration settings dialog also uses the raw values
(offset, v-offset, gain), instead of something more usefull. There is also no callibration routine
(yet? hopefully...).
However the GUI software is released under the GPL license, so you are free to modify it
according to your needs.
Driver
The driver currently creates the special /dev/dsoX nodes for each parport device it founds in your
system. Maybe it should check availability of the DSO2100 hardware on each parport,
and create the /dev/dsoX nodes only for these parports, where the working DSO2100 hardware is found,
however in this case, the DSO2100 should be switched on, when the driver is loaded.
In the current approach, the /dev/dsoX node is created for each parport,
and the availability of the DSO2100 is checked during the "open" operation.
Then you can connect/disconnect/move to the other port the DSO2100 even without root privileges.
The driver works with the udev daemon. If you want to be able to run the GUI program as
a plain user, then you need to add the following rule:
ACTION=="add", SUBSYSTEM=="dso2100", MODE="660", OWNER="myacnt", GROUP= "scope"
or
ACTION=="add", KERNEL=="dso[0-9]", MODE="660", OWNER="myacnt", GROUP= "scope"
So the user "myanct", and all the members of the "scope" group will be able to run the GUI program.
The driver is currently not protected against the attempts to open a DSO by a few applications
simultaneously. I'll fix it soon.
The GUI program
The GUI program (written in Python, so source and executable program are the same) may be found
here.
The program contains two modules: oscyl.py and osc_gui.py, and the GUI description
prepared with the "glade-3" tool - osc_gui.glade .
You should unpack all three components in the same directory, and run the oscyl.py
with a single argument - the device node of your DSO2100 scope. On my system, where the scope
is connected to the parport1, I have to run it with:
$ ./oscyl.py /dev/dso1
Then the following window should appear:

The initial settings are different, than shown in the picture. You can change them in the
init_gui
routine in the osc_gui.py file.
To do...
- The GUI should be changed, to be more user friendly. It should be oriented on control of parameters
well associated with the measurement, not on the control of the raw parameters used by the
DSO2100 commonication protocol (e.g. the controls allowing to shift the reference level should be
available instead of offset and v-offset).
- The autocalibration routine should be added.
- Because the parallel port is a rare equipment, especially in modern laptops, I have started
to develop the USB interface to the DSO2100
scope. It uses a single PIC18F4550 microcontroller
with some supporting components. The prototype is based on our
didactical board.
Wojciech M. Zabolotny
Last modified: Sun Nov 25 17:16:50 CET 2007