18
3-1
Programs
To use the ASCII Unit in conjunction with the PC, an ASCII Unit program written
in BASIC is needed. A data exchange routine must also be incorporated into the
PC program. The PC data exchange routine must set the number of words to be
transferred, the base address, and the specific memory area. This can be done
using the PC’s MOV(21/030) instruction.
There are two ways the ASCII Unit can communicate with the PC. In the first
method, the PC controls the timing of the data transfer between the two devices.
The ASCII Unit “requests” access to the PC data memory area using the PC
READ, PC WRITE, PC GET, or PC PUT statements, and then waits for the PC to
respond by setting either the read or write flag. The PC data exchange routine
performs the designated operations. When the PC is ready, the appropriate flag
is set and the ASCII Unit proceeds with the data transfer.
In the second method, the WRIT(87/191) and READ(88/190) instructions are
used in conjunction with the PC READ, PC WRITE, PC GET, and PC PUT state-
ments to transfer data.
This diagram illustrates the PC and ASCII Unit programs.
PC program
General Program
General Program
Data exchange
code
ASCII Unit program
Data exchange
processing or I/O
program
This diagram illustrates the relationship between the PC data exchange code
and the ASCII Unit program.
MOV(21/030)
MOV(21/030), OUT, etc.
PC READ command
PC WRITE command
PC PUT command
Write/read
data
exchange
PC program
I/O data
exchange
ASCII Unit program
Common
memory
I/O
memory
MOV(21/030), OUT, etc.
MOV(21/030)
PC GET command
3-2
Program Transfer
Preparation
For the personal computer to communicate with the ASCII Unit, set the comput-
er communication software as follows:
Baud rate:
same as ASCII Unit
Data length:
8 bits
Parity:
none
No. stop bits:
2
Also: Full duplex, no echo, no XON/XOFF buffer busy control, no auto line feed.
Set the ASCII Unit DIP switches to the desired configuration (refer to
Hardware).
Program Transfer
Section 3-2
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...