-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SoftI2CMaster implementation #25
base: master
Are you sure you want to change the base?
Conversation
Thanks. I had been renaming the i2c implementation functions so I could re-use the technique (in a library to read the Wii Nunchuk) without duplicating code. I've pushed those renames. |
I mostly used the Wire like interface for the sake of simplicity. The way that SoftI2CMaster returns errors is a bit different than the Wire library ( There is still a benefit to use the Wire like interface: the |
I experimented a while ago with this idea, and discovered that Spence Konde's ATTinyCore uses a version of SoftI2CMaster as its implementation of the Wire library. As I use this core, I found it hard to identify when the user selected implementation was chosen rather than the one supplied by the core. |
Good Morning. I tried to edit the TinyOled4K.cpp file But everything I try to do, I only get scrambled images on the display. Can anyone help? |
@WanderLG yes, the library already supports three i2c implementations. Internally, the library receives pointers to functions to implement the various parts. Does that evilOLED library work on its own? It is interesting in that it doesn't make any attempt to respect i2c timing, or wait for acknowledgements. I've seen that the SSD1306 appears quite accepting of misuse of the i2c best practices, for example I've run some tests with over half a dozen different sized screens wired together and all on the same address, and they all receive the commands and show the same images. |
@WanderLG I've just committed an implementation based on evilOLED's, along with a speed test example program. |
Glad you removed the wire library. |
Sorted out. You were directing to the address of another pin. I edited your Tiny4kOLED_bitbang.h and put the address of pins A4 and A5 PORTC = PORTC |(1<<PC5); // HIGH PINO A5 I'm going to test it, but it looks like it's much faster than using wire, and now it doesn't crash. that's what's most important. I loved it. Thank you so much for this. |
This adds compatibility with SoftI2CMaster (https://github.com/felias-fogg/SoftI2CMaster) library.
It is a software implementation of I2C and allows to use other pins than 0 and 2.