it's the second time i'm asking help for this init i2C problem...
This time, i play with a small SSD1306 oled screen.
in 2017 i build some pieces with this screen and picos and every time i switch on the build, the screen init correctly.
this week i start a new project with this display (same screen batch from 2017) but i have lot of pb to initialize the screen with a boring timeout and a busy error.
Have you any idea ?
retrofit with an old firmware?
is it possible to have an old google app version? (which works)
I just want to have a(n) (art)piece working (as previously). I'm suppose this not a hardware pb but a software pb...
if i use my old code, it does not work as expected (as the 2017 batch)
i work with espruino pico 2.06 firmware and googl app ide (not the online one) cause i use custom local font.
Which pins are you using the I2C on? There was a similar issue that was solved via using Software I2C http://forum.espruino.com/comments/15558111/
If it's just an SSD1306 then it should be fine to use software I2C
If you need hardware I2C you can use I2C2 on b3 and b10
Thanks a bunch for that solution. i use the software on hardware i2c1 (b6,b7). It avoid me to unsoldering.
It works great!
nevermind, strange to use software i2c when there is hardware i2C.
it's a beautifull rainy day
Happy to know software I2C works for you :P I think I'll default to software I2C for now as well until the hardware I2C on pico gets fixed (well, it's only I2C1 on b6/b7 that's having issues, I2C2 works well)
until the hardware I2C on pico gets fixed
until the hardware I2C on pico gets fixed
Do you think this something that used to work that doesn't now? Seems like an odd one as nothing has really changed in that part of the STM32 firmware in years
I think so, I was planning on getting an older version flashed and see if that one works (because I remember using hardware I2C on the pico before too) and then bisecting.
Or maybe it just wasn't noticed and I just defaulted to software I2C that time?
You're right, I can't seem to find an old enough binary that works O_O
My mind must be playing tricks on me.
| __|___ ___ ___ _ _|_|___ ___
| __|_ -| . | _| | | | | . |
|_____|___| _|_| |___|_|_|_|___|
1v94 Copyright 2016 G.Williams
>Uncaught InternalError: Timeout on I2C Write BUSY
at line 1 col 111
in function "a" called from line 1 col 7
in function "a" called from line 1 col 133
in function "connectI2C" called from line 1 col 807
Thanks for checking - well at least it's not a regression then. I'll look into whether there's anything I can do to get it going (eg shutting down the serial port)
Ok, well this is odd. I've got a SSD1306 (the one actually pictured in http://www.espruino.com/SSD1306) connected to a Pico running 2v07 and the exact JS code in the example, and it works great!
// write some text
// write to the screen
var g = require("SSD1306").connect(I2C1, start);
So I wonder what the difference is with your setup?
Worth noting that Software I2C is able to use the internal pullup resistors, but for some reason hardware I2C isn't - so if the I2C device doesn't have internal pullups then software will work but hardware won't.
Ah! In this case I wasn't using the SSD1306 (although I can try that in a bit) but rather the LCD display from the other thread.
Maybe that is the issue? Some sort of stray capacitance or weak pullups from the HD44780 LCD Display ?
Yeah, just checked with a spare SSD1306 - the above code works without issues.
Tried again with the HD44780 LCD Display, connecting it to 3v3 or VBAT still gets the timeout.
I'll try and see if pullup resistors would work, maybe that's the culprit.
Edit: looks like the I2C expander already has pullups: https://www.best-microcontroller-projects.com/mcp23017.html
Might have to break out an oscilloscope for this one :(
Adding additional 4.7k pullups don't seem to do anything different.
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem