The Bricklet features 2x 8 I/O pins that can be independently configured as digital inputs or outputs. Each input pin can additionally be configured with a pull-up or as interrupt source. The input/output voltages can be switched manually between 3.3V and 5V*. Via terminal blocks all signals and GND can be accessed. An additional terminal block delivers the switched output voltage.
Human interfaces, such as switches, push-buttons and LEDs are typical applications of this Bricklet.
|I/O Voltages||Switchable between 3.3V and 5V*|
|Maximum Output Current||20mA (per output pin), 125mA (total)|
|Maximum API Calls**||set-port (1kHz), get-port (> 0.25kHz), callbacks (1kHz)|
|Dimensions (W x D x H)||35 x 75 x 14mm (1.38 x 2.95 x 0.55")|
* The maximum output voltage depends on supply voltage. If the connected Brick is powered over USB, 5V may not be reached. The reason for this is a voltage drop about 0.5V caused by protection diodes on our products. If you need to reach 5V, you have to use a stack supply, e.g. the Step-Down Power Supply.
** depends on your system (OS, CPU etc.)
To test a IO-16 Bricklet you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect the IO-16 Bricklet to a Brick with a Bricklet Cable. In our test we connected an LED with series resistor to the board by attaching the anode to port B pin 0 and the cathode to a GND pin. Additionally we connected a slide switch that can short port A pin 7 to GND (see picture below).
If you connect the Brick to the PC over USB, you should see a new tab named "IO-16 Bricklet" in the Brick Viewer after a moment. Select this tab.
If everything went as expected the Brick Viewer should look as depicted below.
In this tab you can change the "Debounce Period", it is the debounce time for interrupt callbacks. For example: If you set this value to 100, you will get interrupts maximal every 100ms. This is necessary if something that bounces is connected to the IO-16 Bricklet, such as a button. You can test the optimal value in the Brick Viewer and use it later in your own program.
Below the debounce period configuration you can configure the pins. Each pin can be configured as input/output and in case of an input pin as pull-up. The current state is depicted in the table below.
To test the LED we configure port B pin 0 as output and change the value. When the pin is high the LED should light up. To test the button configure port A pin 7 as input pull-up. We need the pull-up to define a stable state when the slide switch does not short port A pin 7 to GND. Now look in the table, you should see that you can change the value of the pin by toggling the slide switch.
If you don't have a button or a LED you can try to measure voltages with a voltage meter or connect an input pin with GND or VCC to see changes in the Brick Viewer.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the IO-16 Bricklet and examples in different programming languages.
A laser-cut case for the IO-16 Bricklet is available.
The assembly is easiest if you follow the following steps:
Below you can see an exploded assembly drawing of the IO-16 Bricklet case:
Hint: There is a protective film on both sides of the plates, you have to remove it before assembly.
See Programming Interface for a detailed description.
|Visual Basic .NET||API||Examples||Installation|