Thank you for reading me first!

I had problems getting the old Be program QScope to work under BeOS R5, finally I gave up and started a rewrite from the start.

This program with some simple extra hardware let's you use your computer as either a Digital Logic Scope or an Analog Signal Scope. To do this the parallel port or joystick port of your computer is turned into an eight(8) or four(4)input digital port for the digital logic scope. Or with some extra circuits the parallel port, joystick port or the sound input jacks of your sound card can be used to read in analog values for the analog signal scope.

The diagram below shows you the layout of how the basic parallel port of most PC computers are set up. What is not shown is that bit five(5) of the control port is the direction control flag. The bit is cleared to zero(low) for output and set to one(high) for input on lines D0-D7 of the port.

The following diagram shows you what you need to test your parallel port with the programs found in directory #2.

In writting the program I had lots of problems trying to find out how to access the parallel port in BeOS. BeOS has a BSerialPort() class in the Device Kit that works well for the serial port but no parallel port class. Note: there is a parallel.h file so it looks like something that Be was planning but did not finish.

Luckly, BeBits contains a driver called aliendriver by Martin Caron which made the programming the parallel port a lot easyier to do. In the future I may bypass or rewrite this driver to get better speed as it seems limited to about 174,000 samples per second but for the moment it makes more sense work on one thing at a time, and it may turn out that the driver may be fast enough for most users anyway.

The diagram below shows you how the basic joystick port layout of most PC computers are set up. Notice it is the same I/O address (201h on most machines) to read both digital and analog information from the joystick's I/O port.

All you need to test your joystick port is a regular joystick for your machine, for best test results a four(4) button - four(4) axis joystick is recommended.

Also in writting the program I had still more problems with the joystick port in BeOS on my PC machine. BeOS has a BJoyStick() class in the Device Kit that seems easy to setup, but in fact is not. First the BeBook instructions are clear if you have a BeBox but for a PC or a Mac some sample code would had been good. After finding some old leftover code using Google it still took a while to figure out. In the 'Basic' mode BJoyStick only gives you access to two axis and two buttons. In 'Enhanced' mode it is possible to read more buttons and axis. At the moment the code is limited to 4 buttons and axis each. Because of unstable values reported by the BJoyStick() class I wrote my own code to directly access the joystick port. I do seem to get better results that way and that code is also found in this version. The BJoyStick() class is still supported for use on Mac computers as I don't know the hardware design used in PPC Macs.

While the program is far than finished, it is presently usable to people with the right hardware.

The Digital Logic Scope works fine, and seems to have few bugs. As a digital scope all hardware needed is a common ground line (pins 18-25) and the sampling lines to be tied to the data inputs of the parallel port (pins 2-9) or the 4 button inputs of your joystick port (pins 2,7,10,14 ). The result is you will get a four(4) or eight(8) line digital scope to help debug slower digital designs on your computer screen.

The Analog Signal Scope code works ok with LED Bar Drivers, four(4) bit and eight(8) bit flash ADCs (analog to digital convertors). I am just now working on the the trigger code.

WARNING! WARNING! WARNING!

Parallel Port - Digital Logic Input, eight(8) signal lines, tested ok.

Parallel Port - Analog LED Bar Flash ADC, code done, not tested.
Parallel Port - Analog single Four(4) Bit Flash ADC, code done, not tested.
Parallel Port - Analog dual Four(4) Bit Flash ADCs, code done, not tested.
Parallel Port - Analog Eight(8) Bit Flash ADC, code done, not tested.
Parallel Port - Analog Channel switching code to support up to 4 analog signals, code done, to be tested.

Read using BJoyStick() in basic and enhanced modes.
Joystick Port - Digital Switch input, four(4) signal lines, code tested ok.
Joystick Port - Analog Resistive Input, four(4) signal lines, code test ok.

Read directly from I/O port.
Joystick Port - Digital Switch input, four(4) signal lines, code tested ok.
Joystick Port - Analog Resistive Input, four(4) signal lines, code test ok.

Sound Card - Analog Audio Input, two(2) signal lines, code not done.

Earl Colby Pottinger

Future improvements will probably be by user request. Options to look at are flash ADCs that come with multiplex inputs and/or more output bits. I am trying to understand how to access the Sound Blaster inputs also.