Closed skartalov closed 1 year ago
Hi
It works here, library v1.4 , Arduino nano V3 , 5V setup, although My display boards have V3 on them not V3.2.
What version of library are you on the latest 1.4? What example file you use? What colour display ? Hardware or software SPI? What type of arduino NANO you use? Are you using 3.3V or 5V setup? What is your wiring setup?
Thanks
Latest version 1.4 5V setup White on Black. Hardware SPI
ERM19264_UC1609 mylcd(CD, RST, CS); // instantiate object
Strange is, that sometimes in very rare occasion it starts and works! I think there must be something wrong with the timings.
I have tried 3 displays( the same), connected to two different ARDUINO NANO setups.
Hi
Where did you buy the displays , From company "buydisplay"? Your boards have 19264-05 V3.2 on back correct? I wonder if there is difference LCD's between v3.2 and v3.
For 5V setup you have shorted Jumper J1 on back of LCD, correct ?
Regarding timings i had some issues at start of project:::->
They are 4 timing values used in initialisation of code in ERM19264_UC1609.h On version 1.0.0 i had these set to
// delays v1.0.0
#define UC1609_RESET_DELAY 150 // mS delay
#define UC1609_RESET_DELAY2 1 // mS delay
#define UC1609_INIT_DELAY 100 // mS delay
#define UC1609_INIT_DELAY2 3 // mS delay
Then for Version 1.1.0 I noticed that Delay
// Delays v1.4.0
#define UC1609_RESET_DELAY 3 // ms Delay
#define UC1609_RESET_DELAY2 0 // mS delay datasheet says 5mS, does not work
#define UC1609_INIT_DELAY 100 // mS delay ,after init
#define UC1609_INIT_DELAY2 3 // mS delay, before reset called
You could try changing UC1609_RESET_DELAY to > 1 mS , UC1609 Datasheet says > 3uS UC1609_RESET_DELAY2 to 6 mS , UC1609 Datasheet says > 5mS
regards
Just want to mention, that my setup works fine with U8G2 library! Although I prefer your LIB as its lightweight. Please check what could be wrong in the code.
Can you do a test for me ? In file ERM19264_UC1609.h can you change
to
Nothing changes. It always shows this dots.
The same setup with u8g2 library. Hello world example with following: U8G2_UC1609_SLG19264_F_4W_HW_SPI u8g2(U8G2_R0, / cs=/ A5, / dc=/ 10, / reset=/ A4);
Works immediately. I suspect there must be something wrong with the initialization of the screen. See how they did it. This is their init sequence:
static const uint8_t u8x8_d_uc1609_19264_init_seq[] = {
U8X8_START_TRANSFER(), / enable chip, delay is part of the transfer start /
U8X8_CA(0x0f1, 63), / set COM end (display height-1) /
U8X8_C(0x0c0), / SEG & COM normal /
U8X8_C(0x040), / set scroll line to zero /
U8X8_C(0x02e), / chare pump /
U8X8_C(0x0eb), / set bias 1/2 /
U8X8_CA(0x081, 0x08f), / set contrast /
/ AC0: 0: stop at boundary, 1: increment by one AC1: 0: first column then page, 1: first page, then column increment AC2: 0: increment page adr, 1: decrement page adr. / U8X8_C(0x088), / set auto increment, low bits are AC2 AC1 AC0 / U8X8_C(0x0a1), / frame rate 95Hz /
/
LC0: 0
MX: Mirror X
MY: Mirror Y
/
U8X8_C(0x0c4), / low bits are MY, MX, LC0 /
U8X8_C(0x0a6), / set normal pixel mode (not inverse) / U8X8_C(0x0a4), / set normal pixel mode (not all on) /
U8X8_END_TRANSFER(), / disable chip / U8X8_END() / end of sequence / };
Yes, I ran you HELLO WORLD example, here is the code:
// LCD setup defines
// GPIO 5-wire SPI interface
// GPIO pin number SCK(UNO 13) , HW SPI , SCK // GPIO pin number SDA(UNO 11) , HW SPI , MOSI
ERM19264_UC1609 mylcd(CD, RST, CS); // instantiate object
// define a buffer to cover whole screen uint8_t screenBuffer[MYLCDWIDTH * (MYLCDHEIGHT/8)]; // 1536 bytes
void setup() { mylcd.LCDbegin(LCDCONTRAST); // initialize the OLED mylcd.LCDFillScreen(0x00, 0); // clear screen mylcd.setTextColor(FOREGROUND); // set text color mylcd.setFontNum(UC1609Font_Default); // set font type }
void loop() {
MultiBuffer myStruct; // Declare a multi buffer struct mylcd.LCDinitBufferStruct(&myStruct, screenBuffer, MYLCDWIDTH, MYLCDHEIGHT, 0, 0); // Intialise that struct (&struct,buffer,w,h,x,y) mylcd.ActiveBuffer = &myStruct; // Assign address of struct to be the "active buffer" pointer mylcd.LCDclearBuffer(); // Clear active buffer
while (1) { mylcd.setCursor(20, 20); mylcd.print(F("Hello world")); mylcd.LCDupdate(); // Update screen , write active buffer to screen delay(5000); } }
Hi
My display does NOT work with the u8g2 library. I suspect their is a difference between the displays, I have and the one you have and the one used to set up the u8g2 library. (two different manufactures ) This is my theory. I Brought my displays from " Buydisplay" also called "East rising "
This is the github issue(u8g2) where they set up UC1609 https://github.com/olikraus/u8g2/issues/1565 Note the link in issue is to Surenoo product page https://www.aliexpress.com/item/4001167985085.html?spm=a2g0o.cart.0.0.2ef43c00I1rGn4&mp=1
in u8g2 header : U8G2UC1609SLG19264_F_4W_HW_SPI The SLG here stands for "Surenoo LCD graphic" .
Thank you
Aliexpress
Hi
FYI If you are connecting DIRECT to 5V Logic lines like on the NANO the J1 jumper is supposed to be shorted. ( i don't know if you are using level shifting or not ) See the wiring diagrams in hardware section of the README.
I will start an issue on u8g2 github to see what manufacturer boards they used and try to gather more testing data.
regards
It doesn't make sense to short J1 sensor when using 5V. This will pass 5V to the IC and can destroy it. J1 just passes the 3.3V regulator. I think J1 should be shorted only when using 3.3V on power supply.
The diagram on Readme is copied from manufacturer datasheet. I have shorted J1 and used on 5v logic.
Hi
A few more things to try for you
if you are using 5 volt logic use 5 volt vcc with J1 shorted OR use 3,3 logic (convert nano signals to 3.3) and use 3.3-5V Volt psu with J1 open
You are currently using 5 volt logic with 3.3 V psu
Put a capacitor on Vcc as per wiring diagram in readme if not there already, perhaps issue is PSU noise.
In file ERM19264_UC1609.h set #define UC1609_POWER_CONTROL 0x2F try set this to value 0x2B this is what the other library was it set to for the charge pump , it does not use the external capacitors on module.
Try the software SPI example and see what happens ERM19264_UC1609_SWSPI.ino
Also I have a light text only version of this library you could try this and see what happens [here at link]..(https://github.com/gavinlyonsrepo/ERM19264_UC1609_T)
I suspect the problem lies with these 3 values in ERM19264_UC1609.h
These control the timings of the power up sequence.
They correspond to the 3 delays pictured here in start up sequence (in reverse order) You could try putting different values in here
regards
Hi there!
Just added a photo of my LСDs - works great with this library. Pay attention to the highlighted area. Your wiring is different (may be some new controller there).
P.S. J1 is open, tested on NANO and LGT8 - no problem.
I'm not entirely sure, but u8g2 didn't work for me with these LCDs. Bought on aliexpress from different sellers. The last purchase of the exact same displays was a month ago.
Sorry... some update info:
u8g2 (https://github.com/olikraus/U8g2_Arduino): U8X8_UC1609_SLG19264_4W_HW_SPI u8x8(/ cs=/ 10, / dc=/ 9, / reset=/ 8);
U8G2_UC1609_SLG19264_F_4W_HW_SPI u8g2(U8G2_R0, / cs=/ 10, / dc=/ 9, / reset=/ 8);
And one more thought - maybe this problem appears only on white on blue LCDs (I have not one to test, but I think that setting reset_delays should help).
Video of the same problem and authors comment - If you pull out the rst wire in the on state and connect it back and then restart the arduino, then a picture appears on the display, but still the display does not really work, it freezes. https://www.youtube.com/watch?v=1Wn7uxE2N5o
I have this display tried the examples with ARDUINO NANO, but it doesn't work. Display is 19264-05 V3.2 It just shows random dots when initialized. That's all. What could be the reason?