here are circuit description and code
Circuit description
1 4k7 to +V
2,3,4,5 not used
6 22k in series with 10 k to gnd – middle to other side of serial jack
7 to centre of serial jack
8 to gnd
9 ,10 not used
10,11,12,13,14,15,16, 17, 18 – all 10k to gnd
19 gnd
20 +V
21,22,23,24,25,26,27,28 to respectively 8,7,6,5,4,3,2,1 of ULN2803A
Code – just a simple debug routine output a permanent 7 !
let outpins =%00000000
b0=0
main:
b0=7
pause 5000
if b0=1 then one
if b0=2 then two
if b0=3 then three
if b0=4 then four
if b0=5 then five
if b0=6 then six
if b0=7 then seven
if b0=8 then eight
if b0=9 then nine
if b0=10 then ten
goto main:
one: let outpins= %00001110
goto main:
two: let outpins= %00001101
goto main:
three: let outpins= %00001100
goto main:
four: let outpins= %00001011
goto main:
five: let outpins= %00001010
goto main:
six: let outpins= %00001001
goto main:
seven: let outpins= %00001000
goto main:
eight: let outpins= %00000111
goto main:
nine: let outpins= %00000110
goto main:
ten: b0=0
let outpins = %00000000
goto main: