![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429111.webp)
102
4.
ASCII: Exits the interrupt service routine and waits for the next interrupt.
Example 6
Purpose:
To process data using the PC
Remarks:
In this example, data is entered through the ASCII Unit keyboard and trans-
ferred to the PC. The PC performs some computations on the data and then
sends it back to the ASCII Unit.
04002
10008
13000
PC Program
ASCII Unit Program
04002
04001
DIFU 04000
10308
04000
04001
04001
04002
10008
Data Processing
100
PC PUT 0
110
INPUT A,B,C
120
PC WRITE “AD,100,3,3I4”; A1,A2,A3
130
PC PUT 1
I40
PC GET I,J
150
K=J AND 1
160
IF K<>1 THEN I40
170
PC READ “:D,200,4,4I4”; B1,B2,B3,B4
180
PRINT B1,B2,B3,B4
190
GOTO 100
1
3
2
Execution Sequence:
1, 2, 3... 1.
ASCII: The PC is initialized with the PC PUT 0 statement. Data is en-
tered via the keyboard and read with the INPUT statement. The data is
then written to the PC with the PC WRITE “@...” statement. PC process-
ing is then initiated with the PC PUT 1 statement.
2.
PC: When data processing is complete, the self-holding circuit (10008)
is set requesting the ASCII Unit to read the processed data.
3.
ASCII: Polls PC bit 10008, waiting for it to be set (it is set when data pro-
cessing is complete) and then reads the data with the PC READ “@...”
statement. The data is then displayed.
6-3
Assembly Language Example
This section presents an assembly language program that is called from a
BASIC program running on the ASCII Unit.
BASIC Program:
100
DEF USR0=&H2000
110
INPUT A$
120
A$=USR0(A$)
Assembly Language Example
Section 6-3
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...