Soft I2C for VK16K33

Hello.
I found this working library for LED Display:

VK16K33

NoiascaHt16k33

Problem is that I want to use Digispark, hi has one I2C port but SCL pin is also only one INT pin, and can’t use simultaneously.

Now I want to use Soft I2C but I do not understand how to merge some soft I2C with library for display.

Is it something simple or not?

My goal is to show result on I2C display from HALL sensor which is connected to INT pin.
Thanks for reply....

What do you want to do?

The display library should have an overloaded constructor that allows you to pass an instance of the soft I2C object, often called "Wire1".
e.g.

softI2C Wire1(softSDA, softSCL);
...
Wire1.begin();
...

then pass Wire1 to the display library

HT16k33libraryname display(Wire1);
...
display.begin();

Not the correct syntax or names maybe but with some research into the libraries, especially the display one, you should be able to make this work.

You have two choices.

  1. Use Software I2C on different pins. e.g. Fleury i2cmaster.S
  2. Use PCINT0 instead of INT0 i.e. on a different pin

Arduino only seems to support hardware interrupt INT0.
Whereas PCINT can detect changes on any pin.
Most AVRs support PCINT. Likewise ESP, STM32, ...
The only exception is ATmega8. But I doubt if anyone uses an ATmega8.

David.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.