Comments (10)
Good day, this is the right code but in between the module and the pico, you need a level translator if the lcd is using 5V. You could also try swapping SCL and SDA pins. As I described in my schematic, for best results you would need a bi-directional level shifter for a 5V lcd. Normally the address for the backpacks is 0x27. People seem to be able to power the lcd with 3.3V and get 3.3V logic but, there seems to be a contrast issue. If the issue is still there, make sure you are using the top-left I2C pair of pins on the pico. If the code keeps doing the same, you can send more information about the pins you are using and how they are connected.
All the best,
Tyler
from rpi-pico-i2c-lcd.
Also make sure the run code is is indented like this:
import machine
sda=machine.Pin(0)
scl=machine.Pin(1)
i2c=machine.I2C(0,sda=sda,scl=scl, freq=400000)
print(i2c.scan())
from rpi-pico-i2c-lcd.
I have tried the level translator, I am slightly confused, I bought the Level Translator you recommended
the pins don't directly match the fritzing diagram we tried using the wiring as in your diagram and wiring it as below also swapping pins 1 & 2 to see if it helped
Pico LCD
P36 LV ----------- HV VCC
P1 A1 ----------- B1 SDA
P2 A2 ----------- B2 SCL
A3 ----------- B3
A4 ----------- B4
P18 GND --------- GND GND
from rpi-pico-i2c-lcd.
Forgot to mention the code has the correct indentation in thonny
from rpi-pico-i2c-lcd.
The HV side goes to the lcd's VCC and the VBUS (Usb 5V) side of the translator. Any 3.3V rail can be connected to the LV side. The Gnd's are connected both together and sent to one common ground. The RPI Pico's I2C interface goes to the side with LV marked on it the HV side goes to the lcd's I2C connector. The image I drew demonstrates this. The pico's 3.3v logic is attached on the LV side and gets bumped up to the HV reference (3.3V signal gets transferred to a 5V level and the reverse).
from rpi-pico-i2c-lcd.
The voltage level of the signals going to the LCD need to be adequate therefore the reason removing the level shifter sometimes does not work.
from rpi-pico-i2c-lcd.
Each A(Number) corresponds to the same numbered B pin for these shifters. Does this make sense?
from rpi-pico-i2c-lcd.
LV (3.3V pin on Pico) --- HV (Vbus pin pico 5V)
A1 (SCL pin of Pico) --- B1 (SCL pin of the LCD)
A2 (SDA pin of Pico) --- B2 (SDA pin of LCD)
A3 --- B3
A4 --- B4
GND --- GND (Both attached to GND pins of the Pico)
from rpi-pico-i2c-lcd.
yes, that's what we essentially have. in my diagram the left side is the Pico (LV) and the right side it the LCD (HV)
I have another LCD & Board will solder it together see if the one i have is faulty
from rpi-pico-i2c-lcd.
Sounds like a plan! You could also try to put 3.3V from the LV side onto one of the A side and see with a multimeter if there is 5V on the corresponding B side channel (HV).
Good Luck,
Tyler
from rpi-pico-i2c-lcd.
Related Issues (13)
- Can't import smbus HOT 3
- 3 addresses for LCD issue HOT 1
- Pico_I2C_Lcd Line 22 error HOT 10
- I get an error when running the test HOT 1
- add a license HOT 1
- Problem in file "pico_i2c_lcd.py" line 22 HOT 1
- Dreadfully slow because of excessive gc.collect()
- Cant import lcd_api or pico_i2C_lcd HOT 4
- Eating up the memory HOT 3
- can you help please HOT 8
- Clear rows instead HOT 1
- OSError: [Errno 5] EIO HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rpi-pico-i2c-lcd.