Parilux: Linux and the Parino card.
Until now, the Parino card was mainly convicted to DOS and hence Windows. Not all windows versions, but mainly
95 and 98. Later versions of this commercial virus did not support DOS style peripherals so it was kind of
difficult to use them.
I will base this project upon the work of Bart Geverts, who designed the parinotools and parinodrive project
files.
The aim is to do the following:
Circuit drawing: Parilux.

Above, you see the circuit drawing for the PariLux prototyping kit. It has no relays, just LED's to see what is happening and opto coupler in/out lines such that the (coming) I2C extension can mate with this PariLux link trainer.
Take care: I did not use a 7805 voltage regulator. Instead, I used an LM 2940 LDO regulator (LDO = Low DropOut voltage) so that I could run the circuit off a fourpack of NiMH cells.
Some pictures of the Parilux prototype.
What you see here, on the left, is the first trialrun with Parilux Prototype 1. It is still unmounted so as to
easily turn it over and resolder wires and components.
You can see the 14 LED's that show activity where needed. 12 of these LED's are replacements for the relays.
The other two LED's are indicators for the two input optocouplers (SDA and INT).
In the middle-left are three rectangular LED's which were cemented together with acrylic glue (Loctite or
Weicon). These LED's signal the user (i.e. me and you) that the three switches are on or off.
On the left is the simulated feature connector of the Parino card. On the right is the 26 pin ribbon cable that is attached to the LPT port.
Same circuit, but now mounted (with hotmelt glue) on a piece of construction board. In the top of the picture
you see the powersource: four NiMH penlite cells.
Note that, although I 'designed' the circuit with a 7805 voltage regulator in place, there actually is an LM
2940T-5.0 low dropout voltage regulator on board. This ensures good regulation with 4 rechargable batteries
which supply 5.2 to 5.6 Volts maximum.
With a 7805 you would have to run this circuit off a 9 Volt block. that would be ideal for the other
Fruttenboel topic, but it's a bit expensive... :o)
If designing in an LDO, make sure there is a solid tantalum capacitor at the output section. Forget the tantalum elco and the 2940 won't regulate very well at all.
Source of the first Parilux executable.
MODULE parilux;
FROM InOut IMPORT Read, Write, WriteBf, WriteCard, WriteHex, WriteLn, WriteString;
FROM IOport IMPORT InPort, OutPort, IOperm;
CONST LPTbase = 278H;
LPTread = 279H;
LPTctrl = 27AH;
CtrlMask = {0, 1, 3};
VAR Outputs, Inputs : CARDINAL;
PROCEDURE ReadPort (VAR word : CARDINAL);
VAR w : BITSET;
BEGIN
word := InPort (LPTread);
w := BITSET (word);
w := w / {7};
word := CARDINAL (w) DIV 8;
Inputs := word
END ReadPort;
PROCEDURE XorCtrlBits (VAR word : CARDINAL);
VAR w : BITSET;
BEGIN
w := BITSET (word); (* make sure w is seen as an BITSET *)
w := w / CtrlMask; (* do the XOR operation *)
word := CARDINAL (w) (* convert back to CARDINAL and store it *)
END XorCtrlBits;
PROCEDURE WritePort (value : CARDINAL);
VAR word : CARDINAL;
BEGIN
Outputs := value;
word := value MOD 256; (* Isolate lower 8 bits *)
OutPort (LPTbase, word); (* Write to port register *)
word := (value DIV 256) MOD 16; (* Isolate upper 4 bits *)
XorCtrlBits (word); (* Correct for inverted bits *)
OutPort (LPTctrl, word); (* and write to I/O pins *)
END WritePort;
PROCEDURE TestIt;
VAR ch : CHAR;
OutVal,
value : CARDINAL;
word : BITSET;
BEGIN
(* OutVal := 0FFFH; WritePort (OutVal); *)
OutVal := 1;
LOOP
WritePort (OutVal);
Read (ch);
OutVal := OutVal + OutVal;
IF OutVal > 0FFFH THEN EXIT END
END;
WriteString ("Waiting for keypress...."); WriteBf;
Read (ch);
OutVal := 0; WritePort (OutVal);
ReadPort (value); WriteHex (value, 4);
WriteString (" Done."); WriteLn
END TestIt;
BEGIN
IF IOperm (LPTbase, LPTctrl, TRUE) = FALSE THEN
WriteString ("Could not get IO permission.");
WriteLn
END;
TestIt;
IF IOperm (LPTbase, LPTctrl, FALSE) = FALSE THEN
WriteString ("Could not release IO permission.");
WriteLn
END
END parilux.
For the C programmers: yes, the ReadPort procedure could have been coded in a single line, but then clarity
would have been sacrificed. And I run these executables on a 200 MHz WinChip machine, so it goes lightning
fast.
Page created October 2004,
Page equipped with GoogleBuster technology