
108
7.4 Controlling and Monitoring the
I/Os
7.4.1 Controlling by the OUT Statement
The OUT statement can control the input and output devices (I/Os) listed in Appendix D, I/O
Ports." The table below lists some examples.
OUT Statement
I/O Devices
OUT 1,&h02
OUT 1,&h01
OUT 1,&h00
Turns on the indicator LED in green.
Turns on the indicator LED in red.
Turns off the indicator LED.
OUT 3,&hXX (XX : 00 to 07)
Sets the LCD contrast.
OUT 4,&h00
OUT 4,&h01
Sets the Japanese message version.
Sets the English message version.
OUT 6,&hXX (XX : 00 to FF)
Sets the sleep timer.
7.4.2 Monitoring by the INP Function
The INP function monitors the input and output devices (I/Os) listed in Appendix D, "I/O
Ports."
The table below lists some examples.
INP Function
I/O Devices
Value Meaning
INP(0)AND &h01
INP(0)AND &h02
INP(0)AND &h04
INP(0)AND &h08
INP(0)AND &h10
INP(0)AND &h20
INP(0)AND &h40
Keyboard buffer & touch
key buffer status
Bar-code buffer status
Trigger switch status*
Receive buffer status
TIMEA function
TIMEB function
TIMEC function
1
0
1
0
1
0
1
0
1
1
1
Data present
No data
Data present
No data
Being pressed
Being released
Data present
No data
Set to 0
Set to 0
Set to 0
* The INP function can monitor the trigger switch status only when the trigger switch
function is assigned to any of the magic keys.
Kommentare zu diesen Handbüchern