Problem with Grove RGB LCD


Rats... well not that big of a deal... maybe 10 - 30 microseconds between multiple sent bytes where the bus returns to an idle state, vs. the core where the bytes are all sent out with no delay in between. It's not bad typically for a hardware I2C device. I just have no idea what is on the Grove LCD for I2C decoding... can you read me off a part number? Their spec is not very good at describing the details.


Hmm, PCA9633 for I2C RGB backlight.
But for the LCD: I can't find something useful.
JHD1313M1 / P131021 is the only number mentioned on the back.
The datasheet mentioned this JHD1214 Y/YG 1.0

Controller: AIP31068L or equal
SCL cycle time max 400KHz
SCL pulse width: min 1.3 us


Ok, I did a bunch of looking and I think all our previous efforts are a waste of time... except for the Pullup resistors.

I just decided to start from scratch and port the code how I normally would... (which seems to be working well)

Try this (builds locally and on web IDE):


Thanks for your help.
But still not working.
Only RGB Backlight works fine.
Pullups are 4.7K against 5V rail. Is this fine or should I try other resistors, too.


That should be good for pull ups... rats. This one is tough... need to see the I2C bus on Arduino vs. Spark Core while it's talking to this LCD.


Hey, I wanted to bump this post, since it seems like a lot of work has been done on I2C since the last bits of the conversation. I have one of these grove LCD's and it was very simple to get working on the Arduino Uno, and was hoping I could similar functionality on the Spark Core. If nobody's gotten this working, does anybody have a recommendation for an LCD with a RGB backlight that I can work with using an existing library? I'm not wedded to the I2C route...but as a micro controller noob, this grove piece with the arduino is literally my only experience with running an LCD...this seems like a good way of doing it without using a lot of pins.


@stevepvc, I can port the library for you later today. To use I2C on the Spark you will need two pull-up resistors (4.7K ohm is good). You will need to connect the LCD as follows, assuming you are powering the Spark via the USB connector:

Grove      Spark
GND        GND
Vcc        Vin
SCA        D0 (SCA)
SCL        D1 (SCL)

You will need to connect a resistor from each I2C line (D0, D1) to Vin (5V). Note that the Spark pins normally work at 3.3V as opposed to 5V for the Arduino but they will tolerate the higher voltage. I will let you know when the library is ready. smile


Thanks, @peekay123! You've been extremely helpful to people in this area, and I appreciate your help specifically here.

Here is my interpretation of your wiring instructions. Can you confirm whether or not I'm following your instructions correctly? (Note: the fritzing diagram shows a Grove OLED rather than a LCD because that's the diagram module available...the input pins on the LCD are the same, though.


@stevepvc, the wiring looks fine except for the two power wires which should connect to the breadboard, not directly to the Core ( stuck_out_tongue )

I published the adapted library in the IDE (GROVE_LCD_RGB_BACKLIGHT) so you can use any of the examples included. Let me know how it goes smile


Ha! Yeah, I guess it would be a little easier to connect the wires to the breadboard. I updated the pic for any other lost souls that find their way here.

Thanks for the work on this, @peekay123! I'll chime in with how it works later.


I have troubles to make any I2C driven display (okok… I just tried two) to work with my spark. I failed convincing a OLED SSD1306 and gave up since Im not realy shure if its maybe a SH1106 (its not written anywhere on the pcb) and I thought for a first step the Groove LCD should work fine. I just tell you this because it maybe helps to localize the problem.

I have the same Issue as FloX with the Groove LCD! I used your library @peekay123.
The background lightning is working as it should, but no text is written to the LCD. I even tried with a sencond LCD to rule out hardware problems. I2C is basicaly working, cause I can receive data from a MPU9150 and a BMP180 and a pull-up is attached to both I2C lines.

Someone has an idea?


I found the issue :open_mouth: ! The backlight works fine if you just connect the display to the 3.3V line. Using the 5V instead solved my problem - display is working now.


So I’ve run into this same issue. I came at it from using a ST Micro Nucleo board which has a very similar processor to the Particle. My first thought was “ah hah, it is a 5v vs 3.3v problem” but even after setting up my chip with open drain outputs, and 10K pullups, the LCD doesn’t acknowledge that it is there. The RGB backlight does. Here is a picture of the LCD ignoring me : scope capture of i2c bus


@ChuckM, even though the Nucleo has a similar processor to the Particle, it doesn’t have the same firmware. As such, we can’t really support it since this is a Particle forum. However, if I understand the image you posted, the display is not sending an ACK or anything else. Make sure the display address matches your expectations. I would HIGHLY suggest that you get the display working with an arduino with a known good library and go from there.


@peekay123 no worries. And yes I had run it using the Grove library on an Arduino first and was looking at differences in the outputs. The “big” difference is that the AVR implementation of i2c in the Wiring library versus the bake it your self driver I had written. The pull ups comments here were a huge help in terms of getting me closer. The actual problem ended up being two of course, one that my SDA/SCL lines were swapped (no ack no nothing) but also the way the state machine implements i2c I was sending stop at the end of my write but it turned out that with a 100Khz bus I could end up sending stop before the last byte went out. That cut off the transaction. Now I busy wait on the BTF & TXE flags in the i2c unit before I send the stop and its working as expected.

Next comes the interesting part of removing my various patches to figure out the problem and get to the core driver that will run it.

BTW I expect to use this on a Particle board when the cellular Particle ships later this year :smile:


@ChuckM, super glad I helped a little! You’ll be happy to know that when you move over to the Electron, it will be a LOT easier and faster to get things done than on your existing platform! :stuck_out_tongue:


Hey @peekay123, I just got one of the new photons, and had assumed that I’d be able to basically switch it out for the core on the breadboard and use the same wiring scheme as before.

Alas, so far I’m getting it to work with the core, but not with the photon…any guess off-hand why that might be? It looks like the particular pins I was using shouldn’t cause any problems.


Reading up on other posts, I wonder if the library you posted (GROVE_LCD_RGB_BACKLIGHT) has something in it that needs an update to work on the photon. Perhaps the lines that run “#if defined (SPARK)…”?

Grove LCD display

Bumping this back again, sorry. How did you ultimately get it to work with the Core? I have tried a couple of the suggestions. I set up the pull-up resistors and tried running it on 5v but I have so far only been able to get the backlight.


Still not having any luck. Anyone tried this part?