Hi,
many moons ago I posted here that I succeeded to connect K8000 to PC via USB-I2C adapter from Byvac. K8000 uses I2C internally and the bus is available at the connector so it’s easy. And don’t require any modification to K8000. Now then after lost codes and dying memory cells one person contacted me and asked how to do it - well… Now I did it again and I though I will post it here. If inappropriate the moderator will certainly purge it. My other project Linux software for PCSGU250 has not moved much for four months now. I will redo it and let to know then in the other forum.
If there is interest I am willing to do a PC-Program to control K8000 via BV4221. It’s just serial programming. But I would need ideas what the program should be able to do and how it should look like.
My email is klaine8@gmail.com
Best Regards
Kari
Velleman K8000 and Byvac BV4221 (USB-I2C adapter)
K8000 is a very nice kit but it is originally connected to computer via printer port.
Printer ports are getting very rare indeed so I connected K8000 to USB using Byvac’s BV4221.
Here are short instructions. Please contact me for any further assistance and testing klaine8@gmail.com
Addresses of the chips.
When both address switches are OFF
To find out the addresses I connected BV513 to the K8000 and run a scanning program.
It gave following results
ok i2_test
device at 0x40
device at 0x70
device at 0x72
device at 0x90
Device PCF8591
8-bit A/D and D/A converter
Address 1 0 0 1 A2 A1 A0 R/W → 0x90 - 144 dec
device at 0x90
Ports DA1, AD1, AD2, AD3, AD4
Device TDA8444
DACs
Address 0 1 0 0 A2 A1 A0 0 → 0x40 – 64 dec
Device on 0x40
Ports DAC1 - DAC8
Device PCF8574A
8-bit I/O expander
Address 0 1 1 1 A2 A1 A0 R/W → 0x70 – 112 dec
Devices on K8000 0x70 and 0x72
Digital IO
Digital IO
there are 16 channels. Either for input or output.
My card is configured so that there is 8 outputs and 8 inputs.
To output to port with BV4221 just give following commands
0x72>A70 //This sets the address of the chip. Here either 0x70 or 0x72
0x70>s ff p //These output binary pattern to port.
0x70>s 00 p
Getting input
0x70>s r g-1 p
0xFE
0x70>
DAC1 – DAC8
Address 0x40
Command to send
S || 0 1 0 0 A2 A1 A0 0 || I3 I2 I1 I0 SD SC SB SA || X X D5 D4 D3 D2 D1 D0 || P
Address is 0x40
Instruction part I0 – I3
The circuit will not react to other combinations of the 4 instruction bits than 0 and F, but will still generate an acknoledge. See datasheet for further information.
I will use the F, which means I will have to send one command per channel.
Subaddress bits SA – SD
Valid values are 0H to 7H
so to set DAC1’s value is
s || 0x40 || F0 || 3F || p
0x40>s f0 3f p
0x40>s f0 00 p
Other channels in the same way.
Device PCF8591
8-bit A/D and D/A converter
Address 1 0 0 1 A2 A1 A0 R/W → 0x90 - 144 dec
device at 0x90
Ports DA1, AD1, AD2, AD3, AD4
This chip has complicated control byte, so data sheet should be consulted.
I will give instructions for the single-ended inputs.
Control byte
0 1 0 0 0 0 0 0 = 0x40
This sets the DA1 output to maximum. Other values similarly
0x40>A90
0x90>s 40 ff p
0x90>
AD1 – AD4
0x90>s 40 r g-4 p
0x7E 0x7E 0x7E 0x7E
0x90>s 41 r g-4 p
0x7E 0x00 0x05 0x05
0x90>s 41 r g-4 p
0x00 0x00 0x05 0x05
0x90>s 42 r g-4 p
0x00 0x00 0x05 0x05
0x90>s 43 r g-4 p
0x00 0x00 0x04 0x04
0x90>s 40 r g-4 p
0x00 0x7E 0x7E 0x7E
0x90>s 40 r g-4 p
0x7E 0x7E 0x7E 0x7E
0x90>s 40 r g-4 p
0x7E 0x00 0x05 0x05
0x90>s 40 r g-4 p
0x00 0x00 0x05 0x05
0x90>
When I tested this I had input on AD1
If you need any further assistance please contact me at klaine8@gmail.com
I am not affiliated with Byvac – I am just a hobbyist and normal customer.
Byvac’s home page is at byvac.com