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
mLink L9110 DC Motor...
The mLink L9110 motor controller is a serial (I2C) 2 channel DC motor driver that is capable...
Hobby Components Arduino...
LED light cubes are a hugely popular and fun project. With this kit (HCKITS0050) you will have...
Hobby Components Uno...
The Hobby Components prototyping shield for the Arduino Uno allows you to add your own custom...
- Currently Out of Stock
Hobby Components breakout...
The Hobby Components breakout shield is a quick and low cost way to add extra pin access to...
Hobby Components Target /...
This prototyping/programming board is designed for use with the Atmel ATMega48P, ATMega168P,...
EDTracker DIY PCB
This is the latest Revision 3 PCB which allows you to simplify your build of a DIY EDTracker -...
- On sale!
Hobby Components SmartLCD...
The SmartLCD Keypad Kit is an optional add-on for the Hobby Components SmartLCD (HCMODU0122)....
mLink TMP36 Temperature Sensor
The mLink TMP36 module is a tiny serial (I2C/IIC) device that includes a precision TMP36...