I2C Display - Write Error 33281 #1035
Replies: 9 comments
-
Posted at 2019-10-25 by AkosLukacs The MDBT42Q is a 3.3V device, so it's possible that you won't be able to communicate with the 5V LCD. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-25 by Robin Fri 2019.10.25
I posted a few links near page top used on other projects a while back:
What value is being used for the pull-up resistor? @calebbrewer would you mind posting a simple table of the I2C Espruino >> LCD pinout please. *(if different than example in tutorial page)* or the code supporting the definition of I2C1. Have a hunch that I2C is not set up properly as seen by Espruino. (the position of the caret in L12 and L11 leaving L14 error as 'lcd' may never be created) Posting all the code would help us immensely. . . . What is the result of entering 'lcd' in Left-Hand console side of WebIDE after the above error? Would you please post, or is the value 'undefined' as my hunch should confirm? Using > http://www.espruino.com/Reference#l__global_getPinMode what is the output for each of the I2C pins? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-28 by @gfwilliams I've actually used one of these with an MDBT42 so I know it works... There is no need for resistors (at least when I did it) - and as @AkosLukacs says the MDBT42Q isn't 5v tolerant so pulling up to 5v won't be good for the IO pins anyway. Stuff you could try though:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-28 by calebbrewer Thank you so much for the responses! I am just now back at a computer to post this. I have checked the connection many time, and I just tried flipping the pins. Here is my code.
I have tried with and without "var i2c = new I2C();" When I run: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-28 by @gfwilliams What error do you get when you use Your board does have 'jumpers' on it for the I2C address, so I don't know whether the default state is all pulled up or all pulled down. Maybe you could try:
all the way from 0x20, 0x21 ... 0x27. And for some reason the example on the reference even gives 0x3F which might be worth trying - but I'm not sure where that comes from! Also could you tell us the top line of text on the chip on the PCB? I can't make it out on the picture but if it's not PCF8574 then the address could be different. edit: If you're using software I2C with |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-28 by calebbrewer SWEET! That clicked in my brain! The chip os an pcf8574AT. It's default address is 0x3F. I thought I had actually tried that out of frustration, but I guess not. Thanks for the help! It is usually something simple I have over looked. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-29 by Robin Mon 2019.10.28
Just in case you had actually tried 0x3F:
Wouldn't matter as described as follows: @calebbrewer if it hasn't been discovered yet, from post #5, L1 and L2 are not the same initialization. (e.g. function setup is not applied to var i2c) FYI me thinks that is what Gordon was pointing out in #6 |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-31 by calebbrewer Right. What I meant was that I thought I tried 0x3F for the address using hardware I2C (without var i2c = new I2C();). I realized the var names were different when using i2c = new I2C(); and changed them. This resulted in no errors, but the screen did not work. This of course was because the address was wrong. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-11-01 by @gfwilliams Great! Glad you got it sorted! I'll update the docs to add a note about that. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-10-25 by calebbrewer
I feel like I am really missing something here. I have a 1602 display with an ic2 backpack. I am connecting it to a MDBT42Q Breakout, and using this doc: http://www.espruino.com/HD44780
I have tried different pins. I have also added pull up resistors from vcc (5v) to scl and sda
Here is the error I get. ...
Beta Was this translation helpful? Give feedback.
All reactions