Dim control As Byte
Public Sub DATA(bytValue As Byte)
DlPortWritePortUchar 888, Val(bytValue)
Sleep (1)
End Sub
Public Sub FDATA(bytValue As Byte)
DlPortWritePortUchar 888, bytValue
End Sub
Public Sub CLR_CS1()
control = control Or &H2
Call DlPortWritePortUchar(890, control)
Sleep (1)
End Sub
Public Sub FCLR_E()
control = control Or &H2
DlPortWritePortUchar( 890,control)
End Sub
Public Sub SET_CS1()
control = control And (Not &H2)
DlPortWritePortUchar(890,control)
End Sub
Public Sub SET_RS()
control = control Or &H4
DlPortWritePortUchar(890,control)
End Sub
Public Sub CLR_RS()
control = control And (Not &H4)
DlPortWritePortUchar(890,control)
End Sub
Public Sub CLR_CS2()
control = control Or &H8
DlPortWritePortUchar(890, control)
End Sub
Public Sub SET_CS2()
control = control And (Not &H8)
DlPortWritePortUchar(890,control)
End Sub
Public Sub CLR_E()
control = control Or &H1
DlPortWritePortUchar(890, control)
End Sub
Public Sub SET_E()
control = control And (Not &H1)
DlPortWritePortUchar(890, control)
End Sub
>> your code starts here
Dim row As Integer, col As Integer, data1 As Byte
control=0
CLR_E
CLR_RS
CLR_CS1
CLR_CS2
DATA (&H3F)
SET_E
CLR_E
Sleep (10)
DATA (&HC0)
SET_E
CLR_E
Sleep (10)
data1 = &HAA
CLR_CS1
CLR_CS2
For row = 0 To 7
DATA (&HB8 Or row)
SET_E
CLR_E
Sleep (1)
DATA (&H40)
SET_E
CLR_E
Sleep (1)
SET_RS
For col = 0 To 63
FDATA (data1)
SET_E
Sleep (1)
data1 = data1 Xor &HFF
Next
CLR_RS
Next