Hi
I need help in connecting RGB display to STM32F411CE black pill.
LCD display data sheet link:
In attachments I uploaded the pictured of STM and display. I tried to connect those two but it didn't work.
:o
Hi
I need help in connecting RGB display to STM32F411CE black pill.
LCD display data sheet link:
In attachments I uploaded the pictured of STM and display. I tried to connect those two but it didn't work.
:o
And where is the rest of your circuit and code having read the instructions for posting?
That crazy datasheet states in one place that the background colour is black and the font colour is RGB though the exact opposite is the case! It also calls pin 15 the Backlight Anode, to be connected to "3.3/5V" but then that the successive three Backlight Control Pins are: "High Level(3.3V/5V):on. Low Level: Off". It is not entirely helpful and does not show the circuit details of the module or adequate photographs.
Anyway, we (I) want to know the circuit you are using and the code in order to see where the problem may be. From where did you get this circuit? We generally recommend the HD44780 library installed through the Library Manager in the IDE to operate these displays though I don't know how well that necessarily goes with the STM32F411CE "black pill".
"Didn't work" is not an acceptable statement here. Did you in fact get the backlight to light and adjust the contrast?
The problem is I don't have the circuit, the display is from ebay and that is the one part for my university project. I just got the display and nothing else, that datasheet I found online just to know what pin is what
If the display itself appears to be working then the only issue you have is with the backlight is that the case ?
Don't forget that without the backlight anything on screen may appear very dim if at all.
I would initially treat it as a regular display with backlight and ignore the other two colours and concentrate on a single colour.
If the STM is a 3.3V board you may need to add a small voltage booster as it may be that 3,3 volts is not quite enough or may only operate over a certain range.
Loving the "wriggly" look of the Cat-5 cable!
Which library did you use?
I am pleased to see that you correctly used a single resistor from "Vo" (pin 3) to ground for the contrast.
“I am pleased to see that you correctly used a single resistor from "Vo" (pin 3) to ground for the contrast.”
Avoids the ‘Wrath of Khan Paul’
Is the W/BE going to a LED resistor ?
The resistor is not on V0 pin
The schematics is next:
Vss goes to GND
Vdd goes to + on breadboard
V0 contrast pin was not used! (Can be used with potentiometer), I will think about using it
RS goes to any digital pin of STM32 in my case B12
RW goes to GND
E goes to any digital pin of STM32 in my case B13
DATA PINS:
DB4 any digital pin of STM32 in my case A4
DB5 any digital pin of STM32 in my case A3
DB6 any digital pin of STM32 in my case A2
DB7 any digital pin of STM32 in my case A1
LED A goes to + on breadboard across 100ohm resistor
R goes to + (This and the B and G, I think and can go to PWM pins of STM32 if you want color cycle or something like that)
G goes to +
B goes to +
from STM32 5v goes on + on b readboard, and GND goes to - on breadboard
Test code:
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = PB12, en = PB13, d4 =PA4, d5 = PA3, d6 = PA2, d7 = PA1;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("PARKING");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
}
And it is CAT6 cable, that all will go to PCB and be soldered, this untidy breadboard option is only for the testing
jerry7714:
V0 contrast pin was not used! (Can be used with potentiometer), I will think about using it
I am pretty sure Vo - pin 3 - must be connected to something else you will get no display at all. A potentiometer is unnecessary; it is probably working now as it must be connected to ground, contrast may be better or worse with a resistor of up to 1k in series.
It's white-green wire, are you still sure?
OK, so this module has some major variations from the common "1602" variety.
If it is working for you, we have no more to say!
From the data sheet:
LED Backlight Control Pin. High Level(3.3V/5V):on. Low Level: Off
It seems to me that the real problem stems from the fact that the data sheet has this part backwards where it refers to the three backlight pins. Connect some combination of these three wires to GND to get your desired background color. Otherwise you have a more or less standard 16x2 LCD.
Adafruit covers the operation of these devices here: RGB Backlit LCDs | Character LCDs | Adafruit Learning System
Don
The peculiar thing is that the OP
jerry7714:
LED A goes to + on breadboard across 100ohm resistor
R goes to + (This and the B and G, I think and can go to PWM pins of STM32 if you want color cycle or something like that)
G goes to +
B goes to +
Seems to be connecting all four pins to Vcc!
And it is working with no connection to Vo pin 3.
It all looks a bit messy.
If you solder header strip to the LCD it will plug into the breadboard.
Then you can route straight coloured wires to the appropriate pins on the STM32.
Straight wires with right-angle bends can be unambiguous. Just like you draw schematics with straight lines and unambiguous crossovers.
It all looks a bit suspicious. Page 27 of the data sheet shows an Application circuit 7.3 SPLC780C Application Circuit
Incidentally, this schematic should keep Paul__B well happy.
David.
david_prentice:
Page 27 of the data sheet shows an Application circuit 7.3 SPLC780C Application Circuit
Eh? Just which datasheet is this?
The OP gives this as the datasheet for his display and it has only 21 pages and no schematic diagrams! I cannot see any other datasheet referenced in this thread - what am I missing?
The BuyDisplay document simply says that the display uses a SPCL780 controller.
I just looked in my PDF folder. I had a Sunplus SPLC780C data sheet and a SPLC780D data sheet. (37 and 47 pages respectively)
Both have the same Application Circuits.
The SPLC780 appears to have the same commands and behaviour as a HD44780.
I had wondered whether it had software controlled contrast but it uses the same hardware scheme as HD44780.
David.
david_prentice:
Incidentally, this schematic should keep Paul__B well happy.
It's not a matter of whether or not it amuses me. The diagram in question matches that in the HD44780 datasheets (exactly as in fact, you would expect). It indicates how the contrast ladder works and how it is to be connected. The spurious suggestion of using (connections as) a potentiometer arises from a single peculiar "test" circuit in just one version of the (original) HD44780 datasheet and I have great difficulty even now locating that circuit, but someone in the distant past regrettably latched onto it as the "way to go".
david_prentice:
The BuyDisplay simply says that the display uses a SPCL780 controller.
...
Both have the same Application Circuits.The SPLC780 appears to have the same commands and behaviour as a HD44780.
Now there's a surprise! Can we say "clone"?
david_prentice:
I had wondered whether it had software controlled contrast but it uses the same hardware scheme as HD44780.
There is not going to be "software controlled contrast". It is just the nature of how a LCD functions. We are talking a ladder of voltages, not timings. You need specific voltages to multiplex the LCD. The "instructables" notion of connecting Vo to a PWM source is total nonsense if only because the impedances concerned are actually too low (less than 100 Ohm) for an Arduino to drive and implement the necessary low-pass filter.
We still do not have any real (schematic) information on this particular "Buydisplay" module and its apparent unique behaviour.
Now there's a surprise!
Can we say "clone"?
Most Character LCD controllers use the same set and style of commands.
There is not going to be "software controlled contrast". It is just the nature of how a LCD functions
There are many COG LCD controllers, OLED controllers, TFT controllers that manipulate ladders in software.
It seems that only HD44780 style controllers expect a physical variable resistor.
Likewise, modern controllers contain on-chip voltage generators. Chip registers determine the behaviour of LCD waveforms and voltage levels.
It would be more accurate to say : "early designs like HD44780 and clones require an external resistor"
No, I don't have this BuyDisplay LCD. I bet that it behaves in a similar way to every other HD44780-style chip.
The modern COG designs tend to have some extra "Extended Functions" that use the unused argument bits of the 0x20 "Function Set" command.
Modern COG designs might have different interface types e.g. SPI, I2C, 4-bit Parallel, 8-bit Parallel, ...
David.
david_prentice:
Most Character LCD controllers use the same set and style of commands.
There are many COG LCD controllers, OLED controllers, TFT controllers that manipulate ladders in software.
Of course.
david_prentice:
It seems that only HD44780 style controllers expect a physical variable resistor.
It is indeed, a pretty old design.
david_prentice:
No, I don't have this BuyDisplay LCD. I bet that it behaves in a similar way to every other HD44780-style chip.
And I certainly do not have it, or intend to acquire one. The ordinary (and cheap) 1602s/ 2004s will do for my purposes.
The point is that the OP here does seem to confirm some curious anomalies about the display, as per #13. But it has been over 32 hours since we have heard from him so ...