I have a 20-Pin COG display and I was trying to make it works with the U8g2.h library and Arduino Due but the display shows nothing. Could someone please help me?
HGO1286427-P-F (Complete).pdf (1.42 MB)
I have a 20-Pin COG display and I was trying to make it works with the U8g2.h library and Arduino Due but the display shows nothing. Could someone please help me?
HGO1286427-P-F (Complete).pdf (1.42 MB)
Use a constructor like:
U8G2_ST7567_JLX12864_1_4W_SW_SPI(rotation, clock, data, cs, dc [, reset]) [page buffer, size = 128 bytes]
Your schematic shows that you know how to connect PSB = GND.
However I would connect CSB to a GPIO pin.
And always use the RESET argument in the constructor.
Let us know how you get on.
When SW_SPI is working, you might consider HW_SPI.
David.
Thank you very much David !!
It would be this...?
Void Setup
pinMode(52 , OUTPUT);
Void loop
digitalWrite(52, LOW); //CSB Pin
I tried to use the constructor with all the arguments, but not worked.
U8G2_ST7567_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
No, you don't need any pinMode or digitalWrite
Just wire your display to the Due using the pins in your constructor i.e.
// name LCD Due
/* clock=*/ 9 13,
/* data=*/ 8 11,
/* cs=*/ 20 7,
/* dc=*/ 18 9,
/* reset=*/ 19 8
Obviously you should say which library example you are using. i.e. the name
David.
I tried the GraphicsTest example from U8g2lib.h, nothing yet.
Matheus.
I always feel happier with a module that comes with header pins e.g. SPI display
At least you know that the ribbon is professionally soldered and any external capacitors, regulator, ... are mounted.
Please post a photo of your wiring. Foreign eyes might spot a problem.
Your schematic looks 100% to me.
I just quoted the first 128x64 constructor on the U8g2 Wiki. You can try the other SW_SPI ones.
David.
It is working now!!
I made a converter board from the upper contacts connector to header pins, then, checking the hardware again I had inverted the display flat on the connector, I made this mistake.
About the code I used the following constructor:
U8G2_ST7567_OS12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
The contrast was low, then I adjusted using:
u8g2.setContrast(64);
Click here to watch a test video.
Thank you very much!
Matheus.
Did your display panel come with the Adapter board?
There are an awful lot of wires?
I am not surprised that anyone could make a mistake.
The video quality is pretty crap. I assume that you get a nice crisp picture in real life.
Try some other constructors. Oliver might have set the contrast register to different value for different makes.
Then try a hardware constructor. Not that speed or number of GPIO pins matters on a Due. LCDs look smeary if you write too fast.
David.
I made this adapter on EasyEDA then I bought it.
I removed the unused wires.
There is a picture attached that you can see better.
I will try some other constructors. Thank you.
Mathues.
Did you design the pcb, get it made, mail it to you, ... ?
How much did it cost?
How long to arrive ?
I find it easier to buy a ready-made module. Probably cheaper too !!
Of course it is different if you want to make 1000 boards.
David.
I tried these constructors:
//U8G2_ST7567_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_JLX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_OS12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_OS12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064I_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
//U8G2_ST7567_ENH_DG128064I_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8);
And only this one worked with the contrast low:
//U8G2_ST7567_OS12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8);
Ps.: Attached there is the picture I mentioned before.
Yes, I made that process you mentioned and it cost me 3$ for 5 pcs... but a ready-made module would better.
Matheus.
This topic was automatically closed after 120 days. New replies are no longer allowed.