Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

1.8" TFT Not working

Status
Not open for further replies.

Montassar Ghanmy

Junior Member level 2
Joined
Feb 17, 2015
Messages
21
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
159
I recently got a new 1.8" TFT LCD .. I learnt that it's using ST7735 IC as a controller..
However I'm not even able to get the backlight to work.
The pins goes as:
-RST
-CS
-D/C
-DIN
-CLK
-VCC
-BL
-GND

I Connected the BL to both 3.3V and 5V but no luck.
Anyone experienced with these displays can help me ??
Thank you !!!
 

Hi,

You need the datasheet.

It seems you even don't know it the backlight is LED or CCFL...

Klaus
 

Re: 1.8" TFT Not working

These cheap modules from ebay come with not much info about them.
Obiouvsly there is always the datasheet of the controller itself but I beleive the backlight has nothing to with it ??

- - - Updated - - -

Thank you for your quick reply ,,, The code looks neat but how about the back light itself ?? Wouldn't applying 5V directly make the TFT go white ?? Mine doesn't..

- - - Updated - - -

acac802b80eed91401593ad78792417bf230c992_375x500.jpg

This is a picture of the TFT
 

Hi,

In the internet i found this:
***
TFT -> Arduino Uno
1-RST -> Digital 8
2-CS -> Digital 10
3-D/C -> Digital 9
4-DIN -> Digital 11
5-CLK -> Digital 13
6-VCC -> 5V
7-BL -> 5V
8-GND -> GND
***
But it seems that "BL" is the supply pin...and it needs some code to control tge backlight.

Klaus
 

Ok , I just learnt that the pne I have uses samsung s6d02a1 controller not st7735 ... but the modules are very similar
@klaus
I'm trying to interface this to an STM32F4 .. i have to convert the arduino library... Anyway to verify if my code does not work or is it the TFT itself ???
I thought checking if the backlight works was a good first step.

The module is totally new , it would be a shame if it's faulty.
 

Hi,

It seems to test the backlight you need to supply BL and you need to communicate with the controller.

Klaus
 

@Easyrider83 Amazing !! Adding the resistor made the TFT backlight work like a charm !!

I'm stuck though with converting the arduino library for the S6D02A1 for my STM32F4 https://github.com/sumotoy/TFT_S6D02A1

Any help ?? I appreciate your support !
 

I gave you a library for STM32. It also works with RTOS. Why do you want to spend a time for arduino?
 

It turned out that the driver IC is not ST7735 , but it is S6D02A1 from samsung.

I found the library for arduino https://github.com/sumotoy/TFT_S6D02A1/ and I'm trying to convert it .

I'm struggling with this code the most
Code:
static const uint8_t PROGMEM	// Multiple LCD init commands removed
  S6D02A1[] = {                  // S6D02A1 support only now
	29,
	0xf0,	2,	0x5a, 0x5a,				// Excommand2
	0xfc,	2,	0x5a, 0x5a,				// Excommand3
	0x26,	1,	0x01,					// Gamma set
	0xfa,	15,	0x02, 0x1f,	0x00, 0x10,	0x22, 0x30, 0x38, 0x3A, 0x3A, 0x3A,	0x3A, 0x3A,	0x3d, 0x02, 0x01,	// Positive gamma control
	0xfb,	15,	0x21, 0x00,	0x02, 0x04,	0x07, 0x0a, 0x0b, 0x0c, 0x0c, 0x16,	0x1e, 0x30,	0x3f, 0x01, 0x02,	// Negative gamma control
	0xfd,	11,	0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x01, 0x01, 0x00, 0x1f, 0x1f,							// Analog parameter control
	0xf4,	15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C, 0x36, 0x00, 0x3C, 0x36, 0x00,	// Power control
	0xf5,	13, 0x00, 0x70, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x66, 0x06,				// VCOM control
	0xf6,	11, 0x02, 0x00, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x06, 0x01, 0x00,							// Source control
	0xf2,	17, 0x00, 0x01, 0x03, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x08, 0x08,	//Display control
	0xf8,	1,	0x11,					// Gate control
	0xf7,	4, 0xc8, 0x20, 0x00, 0x00,	// Interface control
	0xf3,	2, 0x00, 0x00,				// Power sequence control
	0x11,	DELAY, 50,					// Wake
	0xf3,	2+DELAY, 0x00, 0x01, 50,	// Power sequence control
	0xf3,	2+DELAY, 0x00, 0x03, 50,	// Power sequence control
	0xf3,	2+DELAY, 0x00, 0x07, 50,	// Power sequence control
	0xf3,	2+DELAY, 0x00, 0x0f, 50,	// Power sequence control
	0xf4,	15+DELAY, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C, 0x36, 0x00, 0x3C, 0x36, 0x00, 50,	// Power control
	0xf3,	2+DELAY, 0x00, 0x1f, 50,	// Power sequence control
	0xf3,	2+DELAY, 0x00, 0x7f, 50,	// Power sequence control
	0xf3,	2+DELAY, 0x00, 0xff, 50,	// Power sequence control
	0xfd,	11, 0x00, 0x00, 0x00, 0x17, 0x10, 0x00, 0x00, 0x01, 0x00, 0x16, 0x16,							// Analog parameter control
	0xf4,	15, 0x00, 0x09, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x07, 0x00, 0x3C, 0x36, 0x00, 0x3C, 0x36, 0x00,	// Power control
	0x36,	1, 0x08,					// Memory access data control
	0x35,	1, 0x00,					// Tearing effect line on
	0x3a,	1+DELAY, 0x05, 150,			// Interface pixel control
	0x29,	0,							// Display on
	0x2c,	0							// Memory write
  };


// Companion code to the above tables.  Reads and issues
// a series of LCD commands stored in PROGMEM byte array.
void TFT_S6D02A1::commandList(const uint8_t *addr) {
	uint8_t  numCommands, numArgs;
	uint16_t ms;

	numCommands = pgm_read_byte(addr++);   // Number of commands to follow
  
	while (numCommands--) {                 // For each command...
		writecommand(pgm_read_byte(addr++)); //   Read, issue command
		numArgs  = pgm_read_byte(addr++);    //   Number of args to follow
		ms       = numArgs & DELAY;          //   If hibit set, delay follows args
		numArgs &= ~DELAY;                   //   Mask out delay bit
		while (numArgs--) {                   //   For each argument...
			writedata(pgm_read_byte(addr++));  //     Read, issue argument
		}
		if (ms) {
			ms = pgm_read_byte(addr++); // Read post-command delay time (ms)
			if (ms == 255) ms = 500;     // If 255, delay for 500 ms
			delay(ms);
		}
	}
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top