11
in parentheses are reserved for use by WRIT(87/191)/READ(88/190) and are
not available for general programming application.
Word
Bit
Function
Description
n
(00)
PC busy
Reserved for WRIT(87/191)/READ(88/190)
(01)
PC WRITE complete
(02)
PC READ complete
03
Restart
The ASCII Unit is activated when this bit goes OFF
04 to 07
---
Not Used
08 to 15
Output data bits 0 to
7
Data output from the PC to the ASCII Unit. Read by the PC GET statement.
n+1
(00)
ASCII busy
Reserved for WRIT(87/191)/READ(88/190)
(01)
PC READ complete
(02)
PC WRITE complete
03
ASCII error
Turns ON when an error occurs in the ASCII Unit, when the RESET
activates, or when the ASCII Unit restarts.
04
Port 1 error
Turns ON when a buffer overflows or transmission error occurs in Port 1.
Turns OFF when the CLOSE statement is executed or the program is
stopped.
05
Port 2 error
Turns ON when a reception buffer overflows or transmission error occurs in
Port 2. Turns OFF when the CLOSE statement is executed or the program is
stopped.
06
Battery error
Turns ON when the battery is low or removed
07
BASIC RUN
Turns ON when a BASIC program is running
08 to 15
Input data bits 0 to 7
Data output from the ASCII Unit to the PC. Written by the PC PUT
statement.
Note When the reset switch is turned ON, the data in word n+1 will be $FFF9. Restart-
ing can be checked using bit 03 of word n+1.
When the ASCII Unit is restarted, the data of word n+1 will be 0000.
The following diagram illustrates how the words and bits allocated to the ASCII
Unit relate to program execution.
WRIT(87/191) is executed when the data communication condition for
WRIT(87/191) is satisfied and the ASCII busy flag is cleared. If these conditions
are not met, the WRIT(87/191) is treated as a NOP.
READ(88/190) is executed when the data communication condition is satisfied
and the ASCII busy flag and ASCII write complete flag are OFF. If these condi-
tions are not met, the READ(88/190) is treated as a NOP.
PC
ASCII Unit
Application
Program
WRIT(87/191)
READ(88/190)
(n)
(n+1)
MOV(21/030)/OUT
Output Data
Input Data
PC PUT
PC GET
PC WRITE
PC READ
BASIC
Program
Common
Memory
(n) 08 to 15
(n+1) 08 to 15
MOV(21/030)/LD/OR
Write Data in n
Read data in n+1
Timing
The WRIT(87/191) and READ(88/190) instructions are executed and the com-
mon memory is refreshed every time the PC completes one cycle of the pro-
gram. I/O data, however, does not use the common memory (see above dia-
gram) and is refreshed when the PC refreshes all the I/O data. Consequently
Program Execution
Data Configuration
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...