EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 817

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
784
Basic I/O Unit Instructions Section 3-22
Description HKY(212) outputs the selection signals to bits 00 to 03 of O, reads the data in
order from bits 00 to 03 of I, and stores up to 8 digits of hexadecimal data in
register words D and D+1.
HKY(212) inputs each digit in 3 to 12 cycles, and then starts over and contin-
ues inputting. In addition, each time that a key is pressed, the corresponding
bit in D+2 (0 to F) will be turned ON and remains ON until another key is
pressed.
HKY(212) determines which key is pressed by identifying which input is ON
when a given selection signal is ON, so it can take anywhere from 3 to 12
cycles for one hexadecimal digit to be read. After the key input is read,
HKY(212) starts over and reads another digit in the next 3 to 12 cycles.
When executed, HKY(212) begins reading the key input data from the first
selection signal, regardless of the point at which the last instruction was
stopped.
The two-word register in D
1
and D
1
+1 operates as an 8-digit shift register.
When a key is pressed on the ten-key keypad, the corresponding hexadeci-
mal digit is shifted into the least significant digit of D
1
. The other digits of D
1
,
D
1
+1 are shifted left and the most significant digit of D
1
+1 is lost.
When one of the keypad keys is being pressed, input from the other keys is
disabled.
There is no restriction on the number of times that HKY(212) can appear in
the program.
DM Area D0 to D32767 D0 to D32765 D0 to D32767
Indirect DM
addresses in binary
@ D0 to @ D32767
Indirect DM
addresses in BCD
*D0 to *D32767
Constants ---
Data Registers DR0 to DR15 --- DR0 to DR15
Index Registers ---
Indirect addressing
using Index Regis-
ters
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area I O D C

Table of Contents

Related product manuals