What is it?
The I2CNavKey is a small board that includes a 7 functions joypad. The joypad has 4 directional keys plus a central button and a rotary ring. It is controllable with the I2C bus, and it’s possible to configure 16 different I2C addresses.
The I2CNavKey has also 3 configurable GPIOs with the same footprint of RGB LED. This 3 GPIOs can be configured independently in 4 different way: input, output, PWM and analog input.
Since the I2CNavKey is a I2C slave, it has a series of 8 bit registers where it’s possible to configure different parameters,it’s also possible to detect when the buttons are pressed or when the ring is rotated.
It also has an open-drain output pin used as interrupt output. This pin is used to notify to the master when some event happens in the I2CNavKey, the source of interrupt can be customized.
Last but not least, it has also 256 bytes of EEPROM.
- I2C bus works up to 400kHz,
- Possibility to add the pull-up resistors on the I2C bus.
- Possibility to customize the I2C address by soldering the 4 SMD jumpers
- Open-drain Interrupt output pin, so no need to continuously poll the devices
- There is a 5 pin JST-PH header
- There are 3 General Purpose pins. (GP pins)
- 256 byte of internal EEPROM divided into 2 banks of 128 byte
- Voltage range is 2.5V to 5V
- Dimension of the device is 42.5×42.5mm or 1.67×1.67in
- 4 mounting holes with 3mm diameter
- Open source firmware
|GND||Power||Ground reference for logic|
|Vcc||Power||Positive supply for logic|
|INT||OD||Open-drain interrupt output|
The I2C NavKey is powered by the MCU PIC16F18345. Inside of this MCU, there is a specific firmware that takes care of the functionality of the I2C NavKey and also the I2C communication with the external world. The I2C NavKey has several registers where is’t possible to configure the board. E.g. detect when a key is pressed ecc… All the functionalities are described in the datasheet.
The I2C NavKey has 4 directional key plus a central push button. It’s possible to detect when the keys are pressed and when released, the central push button can be detected also when it is double pushed.
The I2C NavKey has also central wheel that can be rotated left and right. It’s possible to read the central wheal in the same way of the I2C Encoder V2
There are 4 registers:
- CVAL: Current value of the Encoder.This value changes every time the encoder rotates.
- CMAX: Maximum value that CVAL can reach
- CMIN: Minimum value that CVAL can reach
- ISTEP: How much the CVAL has to increment at each and every encoder step.
These 4 registers can be 32bit signed int, or as float numbers IEEE 754.
There are also 3 configurable GPIOs organized with the same footprint of an RGB LED. They are called GP1, GP2, and GP3.
- PWM: In this way, you can add an RGB LED.
- Analog: The pins are connected to the internal ADC of the PIC. In this way, you can add sensors or potentiometer according to your project needs
- Output: You can use the pins as standard digital output
- Input: You can use the pins as standard digital input. Plus you can configure also the interrupt on the edges
In case of usage as PWM, there is also the possibility to enable the gamma correction. There are 8 type of gamma correction:
- Gamma 1 (linear)
- Gamma 1.8
- Gamma 2.0
- Gamma 2.2
- Gamma 2.4
- Gamma 2.6
- Gamma 2.8
There are also two large pad for the power supply. Fore example you can solder a potentiometer and use the GP pins for reading the analog value!
The I2C NavKey has an external interrupt, the INT pin, that became low when some event occurs. The event source is configurable in the configuration register. The INT pin is open drain, this means that a pull-up resistor is required. The I2C NavKey has an internall pull-up that can be activated.
1 I2C NavKey White (fully assembled, programmed and tested) + 30cm JST cable