hi,
i google about pull-up resistor and i did as you said, by connecting +5v to 10 k R. it’s working very nice.
but i like to how i can use the 5 - input’s in the board, it’s used to control the 8 - out put or what ??
thanks alot
hi,
i google about pull-up resistor and i did as you said, by connecting +5v to 10 k R. it’s working very nice.
but i like to how i can use the 5 - input’s in the board, it’s used to control the 8 - out put or what ??
thanks alot
To control the outputs you need to write the software yourself…
This can be done in the FREE program Visual Basic.NET.
Click Here to go to the download page
Open the program and start a new project. When the box comes up click on the first option- ‘Windows Form Application’
Then double-click on the form that appears. You will be taken to the code-editor.
You should see something like this:
|Public Class Form1
|
| Private Sub Form_Load()
|
|
|
| End Sub
|
|-End Class
ALL your code goes between the 'Public Class Form1 and End class.
First put some code in which talks to the card BEFORE the ‘Private Sub Form_Load()’:
Option Explicit
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long) As Long
Private Declare Sub ReadAllAnalog Lib "k8055d.dll" (Data1 As Long, Data2 As Long)
Private Declare Sub OutputAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long, ByVal Data As
Long)
Private Declare Sub OutputAllAnalog Lib "k8055d.dll" (ByVal Data1 As Long, ByVal Data2 As
Long)
Private Declare Sub ClearAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllAnalog Lib "k8055d.dll" ()
Private Declare Sub ClearAllAnalog Lib "k8055d.dll" ()
Private Declare Sub SetAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub WriteAllDigital Lib "k8055d.dll" (ByVal Data As Long)
Private Declare Sub ClearDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub ClearAllDigital Lib "k8055d.dll" ()
Private Declare Sub SetDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long)
Private Declare Sub SetAllDigital Lib "k8055d.dll" ()
Private Declare Function ReadDigitalChannel Lib "k8055d.dll" (ByVal Channel As Long) As
Boolean
Private Declare Function ReadAllDigital Lib "k8055d.dll" () As Long
Private Declare Function ReadCounter Lib "k8055d.dll" (ByVal CounterNr As Long) As Long
Private Declare Sub ResetCounter Lib "k8055d.dll" (ByVal CounterNr As Long)
Private Declare Sub SetCounterDebounceTime Lib "k8055d.dll" (ByVal CounterNr As Long, ByVal
DebounceTime As Long)
Then you use commands to turn outputs on and off between the ‘Private Sub Form_Load()’ and ‘End Sub’ lines.
First, to connect to the card use this command:
OpenDevice(CardAddress)
Replace ‘CardAddress’ with the address of the card which depends on the jumpers which are on the k8055 board.
To turn output1 on use this:
SetDigitalChannel(1)
To turn output2 on use this:
SetDigitalChannel(2)
To turn output1 off use this:
ClearDigitalChannel(1)
You will notice these commands and others in the code at the top of the program.
For more information view the file on the CD which came with the program: It can be found here-
K8055_VM110 USB board\Software Manual
There you can view the software manual in your preferred language, and this has ALL the information you need.
I really hope I’ve helped, It can be difficult understanding when you are new to the area of electronics,
Conor
Thanks for your help.
These DLL declarations are for Visual Basic 6.0
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Long) As Long
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Long) As Long
... etc.
In the declarations for the Visual Basic .NET, 2005, 2008 etc. the “As Long” has to be replaced with “As Integer”.
Here are the declarations for Visual Basic .NET, 2005, 2008 etc.:
Private Declare Function OpenDevice Lib "k8055d.dll" (ByVal CardAddress As Integer) As Integer
Private Declare Sub CloseDevice Lib "k8055d.dll" ()
Private Declare Sub Version Lib "k8055d.dll" ()
Private Declare Function SearchDevices Lib "k8055d.dll" () As Integer
Private Declare Function SetCurrentDevice Lib "k8055d.dll" (ByVal CardAddress As Integer) As Integer
Private Declare Function ReadAnalogChannel Lib "k8055d.dll" (ByVal Channel As Integer) As Integer
Private Declare Sub ReadAllAnalog Lib "k8055d.dll" (ByRef Data1 As Integer, ByRef Data2 As Integer)
Private Declare Sub OutputAnalogChannel Lib "k8055d.dll" (ByVal Channel As Integer, ByVal Data As Integer)
Private Declare Sub OutputAllAnalog Lib "k8055d.dll" (ByVal Data1 As Integer, ByVal Data2 As Integer)
Private Declare Sub ClearAnalogChannel Lib "k8055d.dll" (ByVal Channel As Integer)
Private Declare Sub SetAllAnalog Lib "k8055d.dll" ()
Private Declare Sub ClearAllAnalog Lib "k8055d.dll" ()
Private Declare Sub SetAnalogChannel Lib "k8055d.dll" (ByVal Channel As Integer)
Private Declare Sub WriteAllDigital Lib "k8055d.dll" (ByVal Data As Integer)
Private Declare Sub ClearDigitalChannel Lib "k8055d.dll" (ByVal Channel As Integer)
Private Declare Sub ClearAllDigital Lib "k8055d.dll" ()
Private Declare Sub SetDigitalChannel Lib "k8055d.dll" (ByVal Channel As Integer)
Private Declare Sub SetAllDigital Lib "k8055d.dll" ()
Private Declare Function ReadDigitalChannel Lib "k8055d.dll" (ByVal Channel As Integer) As Boolean
Private Declare Function ReadAllDigital Lib "k8055d.dll" () As Integer
Private Declare Function ReadCounter Lib "k8055d.dll" (ByVal CounterNr As Integer) As Integer
Private Declare Sub ResetCounter Lib "k8055d.dll" (ByVal CounterNr As Integer)
Private Declare Sub SetCounterDebounceTime Lib "k8055d.dll" (ByVal CounterNr As Integer, ByVal DebounceTime As Integer)
As a starting point you may also download a demo project for VB 2005, 2008 from:
vel255.diinoweb.com/files/K8055_VB_2005_rnd.zip