http://1010.co.uk/testswitch.c
Compile with: gcc testswitch.c -o testswitch -O2
[TODO: integrate with cur-rme - collect 16 8-bit values and send to switch - only send when 16 is way to get stepping - test on t20 in hdsp backup directory with rme code uncommented]
With crocodile clips for attachment to board to be rendered executable. Software to follow needs to perform operations as follows using 128 bit opcode:
Data (one bit to be shifted through by software) on pin 2 (0x378 - data port)
Latch is pin 14 (bit 2 on 0x37A - control port)
Clock is 1 (1st bit on 0x37A)
The last two are inverted:
#define CLOCKHI 1 // (Binary 00000001)
#define CLOCKLO 3 // (Binary 00000011)
#define LATCHHI 2 // (Binary 00000010)
#define LATCHLO 3 // (Binary 00000011)
for (x=0;x<16;x++){
bitpattern = bits[x];
for (y=0;y<8;y++){
outb(bitpattern & 1,0x378); // out &H378,bitpattern and 1 'output rightmost bit
outb(CLOCKHI, 0x37a);
outb(CLOCKLO, 0x37a);
bitpattern = bitpattern/2;
}
}
outb(LATCHHI, 0x037a);
outb(LATCHLO, 0x37a);
// possibly with some pauses/timing adjustments
borrowed from good old: http://computerchristmas.com/index.phtml?link=how_to&:=25
Or the executable as the circuit can well be viewed as the abstracted execution portion of a CPU with a 128 bit instruction set and unforeseen execution consequences when applied to diverse circuits:
Computer controlled permutative switching of circuits (allows for 16 points to be connected) using 3 bits (serial data transmission) over USB or parallel port. Modular design of 2 serial/parallel boards (74HC595 shift register chips see: http://computerchristmas.com/index.phtml?link=how_to&:=25) and 4 switch boards (4016/4066 quad bilateral switches): http://www.doctronics.co.uk/4016.htm. Switching points are also exposed to CV (control voltage).