Hello
I tried to read keyboard 4*4 with k8055, but I can’t get it work.
Simplified examble:
I have connected(wired) output #3 to input # 3
Setting output 3 to 6 one after another and so on 3,4,5,6,3,4,5…
Then I read digital inputs
When output 3 is ‘1’ I should get ‘1’ reading digital input, but I didn’t get.
Put the program(VB) gets ‘1’ while output #6 is ‘1’ or #5 or #4 depending on timer1.interval!!!
Are you sure?
Run your Demo program.
Out to ULN 2803 is inverting to connector O3
In to ULN 2803 from connector I3 is inverting also.
Main question is, why I get input I3 ‘set’ when other output than O3 is ‘set’ depending on timer interval?
100ms interval is enough to read 4*4 keyboard.
When the interval is higher ther is still that proplem.
I made a test:
First I connected the digital outputs (1 to 5) to corresponding digital inputs.
In the VB6 demo software I disabled the timer 1 by commenting the line:
'If h >= 0 Then Timer1.Enabled = True
Then I changed the output test procedure (Timer2) following way:
I added the line i = ReadAllDigital and the lines below it.
After the click of the “Output Test” button I see how the check mark is scrolling in the input check boxes. This should indicate that the inputs are read correctly. This seems to work even with timer interval of 1.
Do this work if you copy the following code to the demo?
BTW: Are you using the latest DLL: k8055dll_rev3_0_2.zip ?
[code]Private Sub Timer2_Timer()
Dim i As Long
ClearDigitalChannel n + 1
Check3(n).Value = 0
n = n + 1
If n = 8 Then n = 0
SetDigitalChannel n + 1
Check3(n).Value = 1
i = ReadAllDigital
Check2(0).Value = (i And 1)
Check2(1).Value = (i And 2) / 2
Check2(2).Value = (i And 4) / 4
Check2(3).Value = (i And 8) / 8
Check2(4).Value = (i And 16) / 16
I give up.
I have done all the VB updates and I have still the same problem.
AVR atmega32 and serial communication is the next step.
When I run K8055 demoprogram ,so after that the memorystick stops
working. I must remove it and but it back so it’s OK again.
Thanks however and Merry Christmas!