![background image](http://html1.mh-extra.com/html/omron/c500-asc04/c500-asc04_operation-manual_743033022.webp)
10
2-1
Bits and Words
The PC’s memory is divided up into many sections, each of which has its own
unique name and purpose. The ASCII Unit can access any of these memory
areas using the BASIC READ and WRITE statements (this is explained in more
detail in
4 BASIC Programming). However, there are words in the PC’s
IR data area that are uniquely assigned to each ASCII Unit.
The PC’s memory is organized into units called
words. Information is usually
stored in word or multiple word units. Each word has a unique address in the
computer memory and can be accessed by specifying its address.
Each word contains 16 bits. A bit is the smallest piece of information that can be
stored or accessed by a computer. A bit is always in one of two states: zero or
one (OFF or ON). Certain bits can be accessed individually and are used as
flags. A
flag is turned ON and OFF by the hardware to indicate some state of the
computer or to enable or disable certain operations. Bits can also be set or
cleared by the programmer to communicate certain parameters or conditions to
the CPU.
For example, when the ASCII Unit program requests data to be sent from the PC
using the BASIC GET statement, the PC’s Write Flag is turned OFF, indicating
that the ASCII Unit must wait while the PC prepares the data. When the PC has
collected the data, it turns ON the Write Flag, signaling the ASCII Unit that it may
proceed to read the data.
2-2
Data Configuration
Each ASCII Unit is assigned a section of memory in the PC. The data has two
configurations,
two-word and four-word. The data configuration is selected by
setting pin 5 of the front panel DIP switch before power is applied to the ASCII
Unit.
The basic difference between the two-word and four-word configurations is that
in two-word mode the WRIT(87/191)/READ(88/190) instructions are supported
for data transfer while in four-word mode they are not supported. The structure
and application of the words in each of the two modes is explained next.
2-2-1 Two-word Configuration
WRIT(87/191) and READ(88/190) are supported in the two-word configuration.
WRIT(87/191) is the PC’s I/O WRITE instruction and READ(88/190) is the PC’s
I/O READ instruction.
When the PC uses these instructions for data transfer, up to 255 words of data
can be transferred at one time. In order to transfer multiple data words at the
same time, however, the ASCII Unit must be programmed to use the PC READ
or PC WRITE statements. In addition the A or S formats must be used. Refer to
Appendix D for more information on formats.
The following PCs support WRIT(87/191)/READ(88/190):
C500:
3G2C3-CPU11-EV1
C120:
3G2C4-SC024-EV1
All C1000H, C2000H, CV-series PCs.
When WRIT(87/191)/READ(88/190) are not supported or not used, data is
transferred using the PC’s MOV(21/030) instruction. When the MOV(21/030) is
used, only one word of data is transferred at a time.
To output (word n) data using the MOV(21/030), set bits 00, 01, 02 and 03 to
zero.
The following table identifies the individual bits in the two words allocated to the
ASCII Unit. In the following Bit Definition table, entries in the
Bit column enclosed
Data Bit Definitions
Data Configuration
Section 2-2
Summary of Contents for C500-ASC04
Page 1: ...C500 ASC04 ASCII Unit Operation Manual Revised February 2001 ...
Page 5: ...iv ...
Page 7: ...vi ...