olikraus / u8g2

U8glib library for monochrome displays, version 2
Other
5.12k stars 1.05k forks source link

KS0713 support #700

Closed wchpikus closed 5 years ago

wchpikus commented 6 years ago

hi is it possible to add support for this driver? https://docs-emea.rs-online.com/webdocs/07ee/0900766b807ee715.pdf KS0713 Regards

olikraus commented 6 years ago

Can you test the ST7565 device?

wchpikus commented 6 years ago

Yes i can.

olikraus commented 6 years ago

Great. Then please use the ST7565 driver with your display.

wchpikus commented 6 years ago

Hi What exactly i have to use? It is loot of st7565;).. C12864?

olikraus commented 6 years ago

What exactly i have to use?

You have to test by yourself. Try one ofter the other until you find a constructor which fits. You could also compare the init sequence of your display (which has to be provided by the display vendor) with the init sequence in U8g2, but I think this is even more time consuming compared to just try all of the constructors.

wchpikus commented 6 years ago

ok, now i testing all st7565 sw spi.. any of them no results... connected ok, with JLX1926 my soft works ok . screen from ks0713. screenshot_2018-09-13 ks0713 pdf - 0900766b807ee715 pdf

scrren from connection of lcd. screenshot_2018-09-13 series - 0900766b806dda2d pdf

screenshot_2018-09-13 series - 0900766b806dda2d pdf 1

i try to find this addresses in library:

define KS0713_DISP_ON_OFF (0xAE)

define KS0713_DISPLAY_LINE (0x40)

define KS0713_SET_REF_VOLTAGE (0x81) // 2-byte cmd

define KS0713_SET_PAGE_ADDR (0xB0)

define KS0713_SET_COL_ADDR_MSB (0x10)

define KS0713_SET_COL_ADDR_LSB (0x00)

define KS0713_ADC_SELECT (0xA0)

define KS0713_REVERSE_DISP (0xA6)

define KS0713_ENTIRE_DISP (0xA4)

define KS0713_LCD_BIAS (0xA2)

define KS0713_SET_MOD_READ (0xE0)

define KS0713_UNSET_MOD_READ (0xEE)

define KS0713_RESET (0xE2)

define KS0713_SHL_SELECT (0xC0)

define KS0713_POWER_CTRL (0x28)

define KS0713_REG_RES_SEL (0x20)

define KS0713_STATIC_IND_MODE (0xAC) // 2-byte cmd

where to looking for? Arduino\libraries\U8g2\src\clib u8x8_d_st7565.c?

olikraus commented 6 years ago

Let us verify that you did the setup correctly: Which U8g2 constructor did you use? Please provide one example, including the setup with your pins. How did you connect the Arduino Board with the display? Which wire goes to which pin? Maybe provide a picture of the setup?

What is JLX1926? I am confused.

Yes, u8x8_d_st7565.c includes all the different variants.

wchpikus commented 6 years ago

Ok i use esp8622 with the same software pins (miso,cs,reset etc ) for driving JLX1926. So i use the same pins to connect to this lcd. Connected this way:

U8G2_ST7565_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, / clock=/ 14, / data=/ 13, / cs=/ 15, / dc=/ 4, / reset=/ 5); //new lcd

//U8G2_UC1604_JLX19264_F_4W_SW_SPI u8g2(U8G2_R0, / clock=/ 14, / data=/ 13, / cs=/ 15, / dc=/ 4, / reset=/ 5);

Connect to pins 4,5,14,15,16 in lcd. Tested with osciloscope and signals connected.

This is one of the constructors,the last of 7565.. This esp works well with this jlx lcd,so i do not change any hardware pins but only connect new lcd for existing lines. It can be broken ( lcd), i can not confirm ( i have only one).

olikraus commented 6 years ago

Hmm... I am a library author. I resources to support wiring problems are limited. I can do a review, but then you have to provide all information. At the moment this issue looks like this to me:

Let me give you a final example: After my questions you provide the following call:

U8G2_ST7565_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, / clock=/ 14, / data=/ 13, / cs=/ 15, / dc=/ 4, / reset=/ 5); //new lcd

And you say:

Connect to pins 4,5,14,15,16 in lcd.

What does this mean? Is ESP pin 14 connected to pin 4 of your LCD? If so, then this seems to be wrong according the datasheet you provided above. But actually the information how pins are connected is still missing: You did NOT answer my question about how pins are connected.

And also consider this: I do not get money here, I have to spend my personal resources to support you. It is not very time efficient if I have to repeat questions and ask for every bit of information.

wchpikus commented 6 years ago

ok connection of lcd. 20180914_071225 20180914_071240 20180914_071251 20180914_071302 20180914_071316

"Connect to pins 4,5,14,15,16 in lcd." it is no one by one corresponding to driver, this is only pinout which was connected,

Connection: LCD => esp8622 1 VSS ground 2 VDD 3,3V 4=>gpio 13 (D7) Mosi 5=> gpio14 (D5) Clock 14=> gpio4 (D2) data/command 15=>gpio 5 (D1) reset 16=>gpio15 (D8) chip select

"Finally your provide extra information like JLX1926. This is confusing. I still do not know what you mean by JLX1926. I also do not know why this is related to your problem." if i connect JLX1926 on this place and configure ino file lcd ( JLX1926) working ok, so this is no wiring problem I think.

"And also consider this: I do not get money here, I have to spend my personal resources to support you. It is not very time efficient if I have to repeat questions and ask for every bit of information." Sorry, i understand you, i will write more details next time, i promise:)

olikraus commented 6 years ago

ok, nice mapping table. It also seems to be correct.

One more thing needs to be checked: Is the display configured for SPI serial mode?

For this, you have to set the PS input of the display to low (see your datasheet). However I do not see a display pin for this. So there must be a solder bridge for this on the display module PCB. Although you send a lot of pictures a complete picture of the display module PCB side is not there.

As an alternative: You could try to run the display in 8080 or 6800 mode to see whether it works.

wchpikus commented 6 years ago

Hello. I need to use spi ( no free gpio for this), but it can be done for test. I thing about that and it can be hardware setup only for 8080 mode..i make some picture of pcb..but as you wrote,no pin for that (PS). Later i will send more pictures.

olikraus commented 6 years ago

but as you wrote,no pin for that (PS).

As I said, there probably is a solder bridge or a resistor which has to be changed.

wchpikus commented 6 years ago

it could be this... 20180915_103555 20180915_103606

https://www.displaytech-us.com/sites/default/files/reference-schematic/S32128a%20tester%20schematic-060711_0.pdf

https://www.displaytech-us.com/sites/default/files/reference-schematic/S64128K_L_M-tester-schematic-serial.pdf

Or this R1 resistor.

Ps..yes,this resistor is pullup pin 15 (PS) and this soldering place is set to pulldown.

olikraus commented 6 years ago

Hmmm so closing J3 should put the display into SPI mode?

wchpikus commented 6 years ago

i connect them together now (pin15) is now pull-down..i thing so..

i try this one: http://www.techdesign.be/projects/042/042.htm

it is the same pinout...

i have to compare with this init sequence:

dt_lcd_write_command(0xe2); // reset dt_lcd_write_command(0xa0); // ADC select: normal dt_lcd_write_command(0xc0); // SHL select: dt_lcd_write_command(0xb2); // LCD bias select: dt_lcd_write_command(0x2c); // Voltage converter ON dt_lcd_write_command(0x2e); // Voltage regulator ON dt_lcd_write_command(0x2f); // Voltage follower ON dt_lcd_write_command(0x25); // Regulator resistor select 0x20..0x27 dt_lcd_write_command(0x81); // Reference voltage register set dt_lcd_write_command(0x18); // Reference voltage 0..63 dt_lcd_write_command(0x40); // initial display line 0x40..0x7f dt_lcd_write_command(0xaf); // display ON

u8x8_d_st7565_dogm128??

olikraus commented 6 years ago

You have to test this display. Basically your display is 64128E. U8g2 has a constructor for the 64128N: U8G2_ST7565_64128N_F_4W_SW_SPI. So you have to test which one fits. First of all you need to be able to see at least something. Please also look from the side, the graphics might be very dimm.

wchpikus commented 6 years ago

For now no results...dark all the time (empty screen),only harwdare reset i see.

olikraus commented 6 years ago

Hmm... I am running out of ideas.

olikraus commented 5 years ago

hmmm.. no solution? Closing for now. Feel free to reopen...

wchpikus commented 5 years ago

No,sorry, no success to run with this lcd. I tested with new oled ssd and works ok.

olikraus commented 5 years ago

ok...