mLink 12Bit I2C Digital Port Expander
The mLink port expander is a serial (I2C/IIC) digital I/O module. It allows you to add 12 digital input output pins per module to your existing microcontroller/Arduino using only its I2C interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.
For Arduino users you can use the mLink library (see below) to control any type of mLink module. Only one single instance of the library is needed to control multiple types of mLink modules resulting in very little resources overhead and therefore making it great for Arduinos with small amounts of memory and pin counts.
The mLink port expander is a serial (I2C/IIC) digital I/O module. It allows you to add 12 digital input output pins per module to your existing microcontroller/Arduino using only its I2C interface. It is compatible with other mLink or standard I2C modules allowing you to daisy-chain several different types of modules together using only the two I2C pins of your microcontroller.
For Arduino users you can use the mLink library (see below) to control any type of mLink module. Only one single instance of the library is needed to control multiple types of mLink modules resulting in very little resources overhead and therefore making it great for Arduinos with small amounts of memory and pin counts.
For Raspberry Pi users we have a Python module which can be installed via pip or downloaded and installed directly from our forum. Please see the mLink Python forum thread for requirements and download link here
Module specifications:
Module code: HCMODU0180 Supply Voltage (VDD): 3V to 5.5V Current consumption (no load): 4.5mA Interfaces: I2C & 12 x digital I/O pins I2C Interface speed: 400kbits/s (fast mode) I2C default address (HEX): 0h50 Maximum number of modules: 5 with pullups fitted, 112 with pullups removed* Module dimensions (inc headers): 43mm x 19mm x 11.5mm Digital output max freq: 1.54KHz Digital Input low level voltage: -0.3V to 0.3 x VDD Digital Input high level voltage: 0.7 x VDD to VDD + 0.3V Digital output pin current source: Max 10mA Digital output pin current sink: Pins 0 to 2 & 5 to 11 max 10mA Pins 3 & 4 max 4mA Digital output pullup resistor: 30K to 80K Ohms *Note the maximum number of connected modules will depend on cable lengths and power requirements of each module.
Do not exceed 5 mLink modules connected in series with all fitted to all modules.
Arduino Connection Example:
Arduino Digital Output (Blink) Example:
This sketch uses the mLink to 'blink' digital pin 0 on an mLink 12 pin digital port expander module (SKU: HCMODU0180).
To use this sketch connect an LED with a suitable current limiting resistor in series to pin D0 and GND. The LED should then flash slowly
-
#include "mLink.h" // Include the library
-
-
mLink mLink; //Create an instance of the library
-
-
#define I2C_ADD 0x50 //Default I2C address
-
-
void setup()
-
{
-
mLink.init();
-
-
// Set pin D0 to an output
-
mLink.writeBit(I2C_ADD, DIO12_D0_OUTPUT);
-
}
-
-
-
void loop()
-
{
-
mLink.writeBit(I2C_ADD, DIO12_D0, HIGH); // Set pin D0 HIGH
-
delay(1000); // Wait for a second
-
mLink.writeBit(I2C_ADD, DIO12_D0, LOW); // Set pin D0 LOW
-
delay(1000); // Wait for a second
-
}
For more information including documentation and the mLink library please visit this products forum page here:
https://forum.hobbycomponents.com/viewtopic.php?f=131&t=2998
Specific References
16 other products in the category
Hobby Components Target /...
This prototyping/programming board is designed for use with the Atmel ATMega48P, ATMega168P,...
SmartRFy Sensor Module
The SmartRFy sensor module adds the option to remotely monitor various sensors via a SmartRFy...
Hobby Components Uno Plus
This is our lower cost alternative to the standard R3 Uno, but in this case lower cost doesn't...
4x4x4 Cube PCB V2 Template
Additional add-on for our V2 4x4x4 Cube Kits. This PCB template has been designed to make...
mLink WS2812 RGB LED...
The mLink WS2812 LED driver is a serial (I2C) module intended for driving WS2812 5V RGB LEDs....
SmartRFy USB Module
The SmartRFy USB module adds the ability to monitor and control a SmartRFy network directly...
- Currently Out of Stock
mLink L9110 DC Motor...
The mLink L9110 motor controller is a serial (I2C) 2 channel DC motor driver that is capable...
Hobby Components Uno...
The Hobby Components prototyping shield for the Arduino Uno allows you to add your own custom...
- Currently Out of Stock