
Activ
Media Robotics
User I/O
The User I/O connector on the H8S microcontroller contains sixteen total digital
input/output ports, as well as an analog-to-digital (A/D) port. Four of the output ports
and six input ports are used by the Gripper accessory of the Performance PeopleBot.
See below.
The bit-mapped states of the sixteen digital ports and analog port automatically and
continuously appear in the standard SIP, in their respective
DIGIN
,
DIGOUT
,
ANALOG
bytes.
When not physically connected, the digital input and A/D port values may vary and
change without warning.
Use the AROS client command number 30 to set one or more of the eight
DIGOUT
ports
on the AROS microcontroller. Electrically, the ports are digital high (1) at ~5 VDC (V
cc
)
and low (0) at ~0 VDC (
GND
).
DIGOUT
uses a two-byte (unsigned integer) argument. The
first byte is a mask whose bit pattern selects (1) or ignores (0) the state of the
corresponding bit in the second byte to set (1) or unset (0) the digital output port.
For example, here’s the AROS client command to set digital output ports one and three
(
OD1
and
OD3
), reset port four (
OD4
), and leave all the rest alone (hexadecimal notation):
0xFA, 0xFB, 0x06, 0x1E, 0x1B, 0x19, 0x09, 0x37, 0x24
Bumper and IR I/O
Two 10-position latching IDC connectors on the H8S microcontroller provide 16 digital
input ports. See
Appendix A
for connector details. Ten of the inputs are used for front
and rear bumper inputs of the Performance PeopleBot.
Similarly, the Performance PeopleBot’s Motor-Power H8S Interface board contains four
inputs with required power for the two breakbeam and two fixed-range IR sensors, whose
states are digitally mapped. See
Appendix B
for connector details.
Normally pulled high (digital 1), all the bumper and IR bit-mapped switches go low
(digital 0) when the respective port gets triggered. Bumper inputs also appear with the
stall bits in the standard SIP, but unlike in the
IOpac
, are modified by the
InvertBumps
mask. All the bumper and IR data bits appear in the
IOpac
packet.
Expansion I/O
Four alternative A/D ports appear at the 40-position Expansion I/O connector of the H8S
microcontroller.
Use the
ADSEL
client command number 35 to select and subsequently
have the A/D value from one of the alternative ports
AN2-5
appear in the standard SIP.
The default port is
AN0
(ADSEL argument value of zero), the A/D port also on the User I/O
connector.
IO packets
Table 9. IOpac packet contents
LABEL
BYTES
CURRENT VALUE
DESCRIPTION
HEADER
2
0xFA, 0xFB
Common header
B
YTE COUNT
1
22
Number of data bytes + 2
TYPE
1
0xF0
Packet
type
N DIGIN
1
4
Number of digital input bytes
DIGIN
1
varies 0-255
ID0-8 bits mapped
FRONTBUMP
*
1
varies 0-255
Front bumper bits mapped
REARBUMP
*
1
varies 0-255
Rear bumper bits mapped
22
Many other ports also appear at that connector, but are not yet supported in AROS.
47