Chapter 5: Programming
Manual Number: 00650-009-28
Page 5-5
The following code is a PASCAL version of the preceding BASIC routine.
Const ace = $3F8;
var i:integer;
port[ACE+4] := $10;
(put in loopback)
port[ACE+3] := $80;
(select divisor latch)
port[ACE+0] := 12;
(divisor lower byte)
port[ACE+1] := 0;
(divisor upper byte)
port[ACE+3] := 3;
(deselect divisor, set 8 bits/1 stop)
i :=port[ACE];
(read input port)
delay(2);
(wait two character times)
i :=port[ACE];
(read input port a second time)
port[ACE+4] := 1;
(take out of loopback and set DTR)
When the above steps are completed, the chip is ready to communicate.
When operating in RS485 mode, RTS is used to control the transmitter/receiver. For this mode,
install the RTS and HDX jumpers. Then install the SX jumper to control receiver on/off OR install
the DX jumper to enable the receiver unconditionally.
Using Visual Basic
Included in the supplied software is a DLL (Dynamic Link Library) called
VBACCES.DLL
. It is
compatible with Visual Basic Version 3.0.
VBACCES.DLL
must be copied to your Windows
directory. Also included is a sample program to help you interface this DLL with Visual Basic. The
program is titled
VBACCES.FRM
, and its global definition file is
VBACCES.GBL
. The infor-
mation in the
.GBL
file must be contained in any application that uses the DLL, but does not have to
be in a separate file. A project file
VBACCES.MAK
is also included.
The commands provided are:
OutPort, OutPortB:
Allows write acces to the I/O bus, similar to the C language outport and outportb
functions.
InPort, InPortB:
Allows read access to the I/O bus, similar to the C language inport and inportb
functions.
Peek, poke:
Allows read and write access to RAM, similar to BASIC's Peek and Poke statements.
Please refer to the
VBACCES.GBL
file for programming information related to
the above functions.
Summary of Contents for WDT-1002
Page 1: ...Model WDT1000 P Product Manual MANUAL NUMBER 00650 009 28C...
Page 2: ...Page ii...
Page 4: ...Page iv This page intentionally left blank...
Page 14: ...Manual Number 00650 009 28 Page 1 6 WDT1000 P Manual This page intentionally left blank...
Page 20: ...Manual Number 00650 009 28 Page 3 4 WDT1000 P Manual This page intentionally left blank...
Page 26: ...Manual Number 00650 009 28 Page 5 6 WDT1000 P Manual This paage intentionally left blank...
Page 28: ...Manual Number 00650 009 28 Page A 2 WDT1000 P Manual This page intentionally left blank...
Page 32: ......
Page 34: ......