----------------------------------------------------------------------------------
Drop two Command buttons and two Text boxes on a form plus either the MSComm or PDQComm tool
__________________________________________________________
Private Sub Command1_Click()
'test output from computer to BSI. must be a number from 0 to 255
' note, if using mscomm then substitute MSComm for PDQComm
PortOn
PDQComm1.Output = Chr$(Text1.Text)
PDQComm1.PortOpen = False
End Sub
__________________________________________________________
Public Static Sub PortOn()
' subroutine to open port. note coded for comm2 at 1200 baud.
' note, if using mscomm then substitute MSComm for PDQComm
PDQComm1.CommPort = 2
PDQComm1.Settings = "1200,n,8,1"
PDQComm1.InputLen = 0
PDQComm1.PortOpen = True
End Sub
__________________________________________________________
Private Sub Command2_Click()
'Test input from BSI to computer. click on data in
and then toggle datta strobe on BSI
' note, if using mscomm then substitute MSComm for PDQComm
PortOn
Do While PDQComm1.InBufferCount < 1
Loop
sresponse =Asc(PDQComm1.Input)
Text2.Text = sresponse
PDQComm1.PortOpen = False
End Sub
the EXE file for the above program
the vb40032 file
Jerry Baumeister
Copyright ©1998, Jerry Baumeister
Revised - 1-9-98