I/O Port #H
The module has 8 I/O port lines, which can be expanded to up to 136. If the port input pins are changed, macros can be started, see #MHP, and #MHB.
Port-Access (8 I/Os)
Define port (input/output) (Hardware Port Control) |
Port, I/O, I/O [Port+1], ... |
|
Set port output (Hardware Port Write) |
Port, State, State [Port+1], .. |
|
Read port inputs (Hardware Port Read) |
Port (0), Number(2) |
|
Send port information (Hardware Port Information) |
Pin-Access
Define port-pin (input/output) (Hardware Bit Control) |
Portpin, I/O, I/O [Port+1], ... |
|
Set port-pin output (Hardware Bit Write) |
Portpin, State, State [Port+1], .. |
|
Read port-pin input (Hardware Bit Read) |
Portpin(0), Number(16) |
Port-Access (8 I/Os)
#HPC |
Port, I/O, I/O [Port+1], ... |
The command defines the direction (I/O) of the individual port pins bit by bit for an entire Port [0 ... 17]
I/O |
|
0 |
Output |
1 |
Input |
|
... #HPC 0,$E9 ... ... #HPC 0,%11101001 ... |
#HPW |
Port, State, State [Port+1], . |
The command sets the State of the outputs bit by bit for an entire Port.
State |
|
0 |
Low |
1 |
High |
|
... #HPC 0,0 #HPW 0,$B4 ... ... #HPC 0,0 #HPW 0,%10110100 ... |
#HPR |
Port (0), Number(2) |
The command puts the state of one or more (Number) of ports (starting with Port) in the send buffer. The feedback is structured as follows:
ESC |
H |
P |
R |
Port |
Number |
State 1 |
State 2 |
... |
|
$1B |
$48 |
$50 |
$52 |
8-Bit value |
8-Bit value |
8-Bit value |
8-Bit value |
... #HPR 0,2 ... |
See also port(a)
#HPI |
|
Indicates which of the 16 possible port modules are connected (= 1) and places this information in the send buffer. The feedback is structured as follows:
ESC |
H |
P |
I |
Returnvalue (1 bit per port) |
|
$1B |
$48 |
$50 |
$49 |
16-Bit value |
... #HPI ... |
The port expander with address 0 is internally available, that means without external hardware the return value is 1.
Pin-Access
Define port-pin (input/output)
#HBC |
Portpin, I/O, I/O [Port+1], ... |
The command defines the direction (I/O) for the Portpin:
I/O |
|
0 |
Output |
1 |
Input |
#HBW |
Portpin, State, State [Port+1], .. |
The command sets the State of the output for the Portpin.
State |
|
0 |
Low |
1 |
High |
2 |
Invert |
Read port-pin input
#HBR |
Portpin(0), Number(16) |
The command puts the state of one or more (Number) of port pins (starting with port pin) in the send buffer. The feedback is structured as follows:
ESC |
H |
B |
R |
Portpin |
Number |
State 1 |
State 2 |
... |
|
$1B |
$48 |
$42 |
$52 |
8-Bit value |
8-Bit value |
8-Bit value |
8-Bit value |
... #HBR 0,4 ... |
See also bit(a)