Graphical LCD Display pinout? - Page 1
Forum section: electronics / beginners

author: MichR
author_rank: Contributor
timestamp: July 29, 2015, 08:31:26 am
content: Hello guys!I'm a student and I would like to use a graphical LCD Display I've got out of a Ricoh Aficio 2018 printer for my own projects.The display is connected to a "control board" which controls the display and the keyboard of the printer.The problem is that the control board uses a chip marked RICOH (same brand of the printer) whose datasheet is not available.So I'm asking here for some help.Before explaining what I've already done, here are some pics of the boards and the display:http://postimg.org/gallery/29bydz3pa/- The green PCB is the "control board". The display is connected with the CN2 flex connector (on the top of the control board). The RICOH chip is placed on it.- The brown PCB full of switches is the "keyboard" of the printer. It was connected with the control board through J1, J2, J3 and J4.As you can see from the pictures, the display has its own uC, but I can't understand how it works. To help solving this problem I wrote down the pinout of the display's flex cable:flex pin connection1 NC2 pin 43 IC13 pin 12 IC14 pin 33 IC15 pin 51 IC16 pin 52 IC17 Vcc8 GND9 C20-GND10 C21-pin 11 CN211 C21-pin 10 CN212 C22-pin 13 CN213 C22-pin 12 CN214 C23-Vcc15 C24-Vcc16 C25-Vcc17 C26-Vcc18 C27-Vcc19 NC20 NCWhere IC1 is the RICOH chip on the control board and CN2 is the connector of the display. Cxx are capacitors.What I deduce from all of this is that the display uC uses pins 9-18 for perhaps a DC/DC converter, 7-8 for power supply and 2-6 for data. But I don't know what kind of data is transferred to the display.These are the pictures of the flex cable of the display:Near contacts:http://postimg.org/image/ksq1586b1/. The first pin is the first on the top in the picture.Near display uC:http://postimg.org/image/d8wy36d4d/. The first "used" pin (pin 2) is all on the right in the picture.I tried seeing the signals sent to the display with an oscilloscope when the control board is powered, but it looks the chip is not "enabled". The control board is indeed connected to some other board on the printer (but I don't have the printer here, just these boards) through CN1 (you can see it on the pictures).If other information are needed please ask me since I wrote down the pinout of the RICOH chip and the connectors of the control board.I hope someone familiar with displays can help me

author: bktemp
author_rank: Super Contributor
timestamp: July 29, 2015, 10:26:14 am
content: It looks like a standard 128x64 LCD with SPI: CS\, SCK, DATA, C/D + RESET\. You only have to figure out the those 5 signals. C21 and C22 are the charge pump capacitors, C23-27 are connected to V1-V5.Most 128x64 LCDs are based on SED1565/S1D15605 and have the same or a similar command set.If you have figured out the 5 SPI lines, send the 1565 initialisation commands. If it works the chargepump should start and generate a negative voltage at C23-27.My guess:2: CS\3: Reset\4: A05: SCLK6: DINThe remaining signals matches the pinout of SED1565 ics:9: VOUT (chargepump output, connected to unused CAP3-)10: CAP1+11: CAP1-12: CAP2-13: CAP2+14-18:V1-V5

author: MichR
author_rank: Contributor
timestamp: July 29, 2015, 01:00:44 pm
content: Thank you for your prompt response.Since I can't "enable" the RICOH chip to transmit the data to the display, how can I know which display pins are the right ones?

author: bktemp
author_rank: Super Contributor
timestamp: July 29, 2015, 01:17:54 pm
content: Since the connections between the flex cable and the glass matches perfectly the pinout of SED1565/S1D5605 I would give it a try using the pinout I have found. I am about 90% sure it is correct.

author: MichR
author_rank: Contributor
timestamp: July 29, 2015, 01:37:56 pm
content: I checked the datasheet of the 1565 controller but the connections don't perfectly match my display. Furthermore, in the timing sequence of the serial interface (page 8-25) I can see /CS1 and CS2. Perhaps instead of /RST there is CS2?

author: bktemp
author_rank: Super Contributor
timestamp: July 29, 2015, 01:53:08 pm
content: In the datasheet the 15605 has the following pinout:Code:FRSFRCLDOFTEST0VSSCS1CS2VDDRESA0VSSWR, R/WRD, EVDDD0D1D2D3D4D5D6, SCLD7, SI(NC)VDDVDDVDDVDDVSSVSSVSSVSS2VSS2VSS2VSS2(NC)VOUTVOUTCAP3–CAP3–(NC)CAP1+CAP1+CAP1–CAP1–CAP2–CAP2–CAP2+CAP2+VSSVSSVRSVRSVDDVDDV1V1V2V2(NC)V3V3V4V4V5V5(NC)VRVRVDDVDDThe first two pins on the flex cable are not connected.Next to CS1\ is Vss and next to CS2 is Vdd so they can be easily connected together on the glass. One of them is connected to the flex cable. Since CS is low active in most cases my guess is CS1\. The next two connected signals are RES\ and A0. Both are necessary. The next 9 signals are shorted together: WR, RD, VDD, D0, D1, D2, D3, D4, D5. That makes perfectly sense because they are not needed for serial interface. There is probably another version of this LCD with all these signals connected for use with 8bit interface. D6/SCL and D7/SI are connected.Then there are many VDD and VSS pins connected in parallel.If you look at the remainig connections, everything matches.The shorted signals at the end are probably the interface selection, hardwired to SPI on the flex cable.

author: MichR
author_rank: Contributor
timestamp: July 30, 2015, 06:51:00 am
content: Thank you for your comprehensive response.Today if I have time I will prepare the breadboard adapter board and then I'm going to use my FT2232H board to interface the display.

author: MichR
author_rank: Contributor
timestamp: July 31, 2015, 04:39:34 pm
content: Adapter board ready!(images:http://postimg.org/gallery/r3ftqdwc/)Now I'm looking at how to interface the display with FT2232 using SPI.

author: MichR
author_rank: Contributor
timestamp: August 03, 2015, 06:59:33 am
content: So I wrote the code needed for this display using the FT2232H as interface. I double checked the data was output via SPI with an oscilloscope but the display doesn't turn on.I power the display using a FT2232 pin, since the initialization sequence needs the power to be controllable and the display needs just some uA to be used. Even after initialization commands, on V1 to V5 I always measure ~3.3V (the Vcc voltage).Some other notes:In the datasheet, "timing sequence", the serial interface needs a clock period minimum of 250ns (4MHz) for Vdd from 2.7 to 4.5V so I'm using 6MHz from FT2232.I'm outputting via SPI the most significant bit first as stated on the datasheet: "the data is input in sequence starting with D7".All the commands are issued one after the other (the CS# pin is deactivated after the last byte transmitted).If needed I can place the piece of code I wrote.

author: bktemp
author_rank: Super Contributor
timestamp: August 03, 2015, 12:57:18 pm
content: 250ns is the minimum clock period, so 4MHz is the maximum clock frequency.To start the power supply only the Power Control Set command is necessary: 0x2F should start the chargepump.

author: MichR
author_rank: Contributor
timestamp: August 03, 2015, 01:30:47 pm
content: Ops I confused it due to the reciprocal.Anyway even changing the frequency down to 2MHz and issuing that command the voltage on V5 is still about 3.5V.To me it looks a communication problem. May the pinout be wrong?

author: bktemp
author_rank: Super Contributor
timestamp: August 03, 2015, 02:13:38 pm
content: Did you apply a RESET pulse before sending the data?You could try an active high CS signal.The pinout could be wrong, but since everything else matches perfectly this is unlikely. There are many SED1565 clones like ST7565 or NT75xx. They all have an almost identical pinout and are software compatible (at least the basic commands).LCDs with SPI interface can be difficult to use if you don't know the pinout and commands, because there is no feedback from the controller to check if the wiring is correct or if the commands are beeing recognized or not.My checklist when LCDs don't work:- Is the reset signal high (inactive) when sending commands?- Measure all signals directy on top of the connector while sending data to be sure every pin is soldered correctly on the PCB and no signals are swapped anywhere (can be a bit hard, but it is possible on most FFCs).

author: MichR
author_rank: Contributor
timestamp: August 03, 2015, 03:26:58 pm
content: I don't "pulse" the RST signal because (as stated in the datasheet), it should be put high after the power is stabilized. So the RST signal is low at start then it goes high after 15ms after having enabled Vdd (look at the code posted at the bottom). I also tried to make CS an active high signal but without success.I've done some researches on the net and I found several threads on a forum about this 1565 controller. Some users also posted their own code. I looked at them but they're almost the same as mine since I followed the recommended initialization procedure.I checked the RST signal during transfer and it's high all the time (after the pulse). I checked the board as you said but all the pins are correctly soldered so it's not a contact problem.Here are some parts of code if you want to have a look at them:Code:void send_spi(bool type, uint8_t * data, uint8_t length) {uint8_t buf[length + 9];//n of bytes (length of data) + 3x2 bytes for setting CS//+ 2 bytes for length + 1 byte MPSSE_DO_WRITEuint8_t i = 0;//index used for the bufferuint8_t bitmask = get_bitmask();//current bitmask (logic state of pins)//assert CS# and A0 if needed at the begin of the transmissionbuf[i++] = SET_BITS_LOW;if(type) {buf[i++] = (bitmask & ~CS) | A0;} else {buf[i++] = bitmask & ~(CS | A0);}buf[i++] = kPinDir;buf[i++] = MPSSE_DO_WRITE;//set length of data to be transmitted (length - 1) (low byte)buf[i++] = (length - 1) & 0xFF;//high bytebuf[i++] = ((length - 1) >> 8) & 0xFF;//copy the data to be transmitted in the buffermemcpy(buf + i, data, length);//increment index by the n of bytes added previouslyi += length;//de assert CS# and A0 if needed at the end of transmissionbuf[i++] = SET_BITS_LOW;if(type) {buf[i++] = bitmask | CS | A0;} else {buf[i++] = bitmask | CS & ~A0;}buf[i++] = kPinDir;ftdi_write_data(&ftdic, buf, length + 9);}void lcd_init() {uint8_t cmds[] = {LCD_BIAS_SET,//0xA2ADC_SELECT,//0xA0COMMON_OUT_MODE,//0xC0V5_VREG_RATIO,//0x20ELEC_VOL_MODE,//0x81ELEC_VOL_REG,//0x20POWER_CTRL_SET//0x2F};send_spi(0, cmds, sizeof(cmds));}void lcd_on() {set_pins(get_bitmask() | VccEn, kPinDir);//waits for power to stabilizeusleep(15000);set_pins(get_bitmask() | RST, kPinDir);}The send_spi function has been taken from the flashrom utility, and slightly modified to check my requirements.kPinDir is a mask of the directonality of the pins (I/O).

author: MichR
author_rank: Contributor
timestamp: August 05, 2015, 05:49:34 am
content: Some good news finally. I found the problem related to the SPI connection: somehow the data bits were sampled at the falling edge of the clock signal instead at the rising edge (and my configuration was correct!). That's probably an issue in libftdi or in FTDI chips in general (see here).So I've got SPI finally working. I tried to send the initialization commands to the display and on V5 I can measure 0.47V instead of 3.3V. To be sure the display succesfully took the command, I tried sending a NOP: the voltage was still 3.3V. When instead I sent 0x2F (Power control set) the V5 voltage dropped down to 0.47V (GND as reference) or -2.81V (Vdd as reference). Well it's not a so good piece of news, it should be at least -4.5V (with Vdd as reference).The 0x2F command on my oscilloscope

author: bktemp
author_rank: Super Contributor
timestamp: August 05, 2015, 06:20:28 am
content: Can you see a square wave at the charge pump capacitors?

author: MichR
author_rank: Contributor
timestamp: August 05, 2015, 06:29:23 am
content: No square wave at all. In analog mode the signal blinks (NOT TRIG'D LED flashes with the signal). In digital mode (memory) I can only see the DC component.

author: bktemp
author_rank: Super Contributor
timestamp: August 05, 2015, 07:14:34 am
content: Try sending the complete init sequence, maybe one of the other commands is needed to start an internal oscillator (0x2F should be enough for a SED1565/S1D5605, but since we do not know the controller built into the LCD we have to try some variants).If it does not work, try sending 0xAB. This command enables the internal oscillator on some other LCD controllers.

author: MichR
author_rank: Contributor
timestamp: August 05, 2015, 07:19:46 am
content: Got it! The command 0xAB was the key to start the DC converter! Now I got -7.5V on V5 (always Vdd as reference) and a sqaure wave on the charge pump capacitors.Can you tell me what kind of LCD controller might it be? Perhaps the commands are different so I want to change them on my program.

author: bktemp
author_rank: Super Contributor
timestamp: August 05, 2015, 08:54:23 am
content: 0xAB is from S1D15719. There are some other ics in the S1D157xx familiy with a more different command set.I would start at the operating voltage: Modern lcd controllers use a positive voltage, but your display generates a negative voltage. This eliminates around half of them (S1D15719 is one of them). Then you could check the pinout if the signals have the same order, because it is almost impossible to swap them on the lcd glass.If none of them matches, Sitronix has similiar controllers. Epson and Sitronix are the most common ones, but there are also other less known companies.

author: MichR
author_rank: Contributor
timestamp: August 05, 2015, 09:44:29 am
content: Thank you. I will search for it on the net.For the moment what I know is that this display is: 5V powered (and not 3.3V! => the contrast is really low at that voltage), has a 168x64 resolution and needs the internal oscillator command to make it work.Here is a proof of the working state of the display:

author: bktemp
author_rank: Super Contributor
timestamp: August 05, 2015, 10:08:32 am
content: Great to see it working!-7.5V is a bit low for 1/64 mux, so Vdd=5V could be plausible. 9-11V is a typical value for a 1/64 mux display. Since you have a 3x charge pump 3.3x should be enough (9.9V), but since charge pumps are not 100% efficient it needs either 5V, or there is another command necessary to increase the charge pump power.Try using the electronic volume set command to increase the contrast. Depending on the controller, this register is 5, 6, 7 or 8 bit wide, so by increasing the value until it overflows you have another clue for identifying the controller.The "Voltage Regulator Internal Resistor Ratio Set" command sets the coarse range of the voltage regulator, the electronic volume set command is the fine adjustment.

author: MichR
author_rank: Contributor
timestamp: August 05, 2015, 08:37:20 pm
content: Sorry for the late reply. The "Electronic volume register" is the same as 1565 controllers: 6 bit wide, from 1 to 63. The two most significant bits are Don't care.