IO Extension Board (Small)
Overview
The small IO extension board adds:
-
Digital I/O:
-
4 banks with 16 pins each (01..16, 17..32, 33..48, 49..64)
-
user selectable I/O direction per bank.
-
-
Analog Out (DAC): 16 channels with a shared reference voltage.
|
To use the extension board, you have to add one instance of the infrastructure actor to your room model:
All adapters listed below depend on it. It provides the common communication interface which is used by the actors exposing the separate I/O pins. |
Adapter actors
The I/Os on the adapter board are exposed to the miniHIL application through multiple actor classes. Each class exposes a set of pins with a specific configuration. E.g. if you want to use a bank of digital I/Os as inputs you have to use the ADigInAdapterIoExtensionSmall[…] actor class. If you want to use the banks I/Os as output you use the AOutInAdapterIoExtensionSmall[…] actor class. You can always only have one actor which uses a certain pin.
For the analog outputs actors all pins are exposed by the same actor class, but the chosen actor class configures the analog out reference voltage which is used (this is also the highest voltage that can be output by the DAC).
Digital input
-
ADigInAdapterIoExtensionSmall01to16 -
ADigInAdapterIoExtensionSmall17to32 -
ADigInAdapterIoExtensionSmall33to48 -
ADigInAdapterIoExtensionSmall49to64
Digital output
-
AOutInAdapterIoExtensionSmall01to16 -
ADigOutAdapterIoExtensionSmall17to32 -
ADigOutAdapterIoExtensionSmall33to48 -
ADigOutAdapterIoExtensionSmall49to64
Analog output (DAC)
-
AAnOutAdapterIoExtensionSmall01to16_REF5V(internal 5.0 V ref) -
AAnOutAdapterIoExtensionSmall01to16_REF2_5V(internal 2.5 V ref) -
AAnOutAdapterIoExtensionSmall01to16_REFExt(external ref; default 3.3 V, optional 1.8 V)
I/O voltage selection
The used analog reference voltage is partially software controlled and partially configured through solder bridges on the extension board. The digital I/O voltage is only controlled by solder bridges.
Analog outputs
The analog output reference voltage is controlled by JP10 and JP11 as well as the software configuration of the DACs. The DACs provide an internal 2.5V and 5V reference voltage which can be enabled by choosing the correct actor class (see above). If the internal reference voltage is used we recommend opening JP10 and JP11. In addition the external reference voltage can be enabled by choosing the AAnOutAdapterIoExtensionSmall01to16_REFExt actor class. In that case either JP10 or JP11 should be closed.
Do not close both jumpers! also note that JP11 is closed by default.
| Reference Voltage | JP10 | JP11 |
|---|---|---|
5.0 V (internal) |
Open |
Open |
2.5 V (internal) |
Open |
Open |
3.3 V (external, default) |
Open |
Closed |
1.8 V (external) |
Closed |
Open |
Digital I/Os
The digital I/O voltage is selected for all digital I/Os at once and is configured through solder jumpers. The voltage can be selected from 1.8V, 3.3V, 5V and an externally supplied voltage source. If a custom I/O voltage is supplied it must be within the valid VCC voltage range of the used MCP23S17 as well as the TXU0304 level translators.
Constraints
-
Each 16‑pin bank (e.g., 01..16) can be used either as inputs or as outputs, not both. If conflicting adapters are instantiated for the same bank, the project will not build.
-
For DACs, instantiate exactly one reference variant; all 16 channels use that reference.
Quick start
-
Add infrastructure actor (once, can be anywhere in the system):
Structure { [...] ActorRef infrastructure : AInfrastructureIoExtension1 [...] } -
Add the adapters you want to use, e.g. 16 digital outputs on pins 01..16:
Structure { [...] ActorRef digOut : AOutInAdapterIoExtensionSmall01to16 [...] } -
Add inputs from another bank, e.g. 33..48:
Structure { [...] ActorRef digIn : ADigInAdapterIoExtensionSmall33to48 [...] } -
Add DACs (choose one reference variant):
ActorRef anOut : AAnOutAdapterIoExtensionSmall01to16_REF5V -- or -- ActorRef anOut : AAnOutAdapterIoExtensionSmall01to16_REF2_5V -- or -- ActorRef anOut : AAnOutAdapterIoExtensionSmall01to16_REFExt
Usage examples
The actors reuse the existing I/O protocols that are used by the miniHILs on board I/Os: PDigIn, PDigOut, PAnOut.
Digital: drive one pin, expect another
Step setHighOutput16_expectHighInput46:
timeout 2 ms
action
digOut16.setOutputHigh()
reaction
expect digIn46.inputHigh
;
DAC: set channel A1 to 3000 mV
Step setDac_A1_3000mV:
action
anOut1.setValue(3000)
;