siemens s65 tft - part 2 - it's working!

By cun83 on 13:51

Filed Under: , , , , , , , , , , ,



I finally got my screen to work! Here are some background information AND working standalone Arduino code/sketch to test your S65 TFT!

More after the jump...
I actually got it to work a while ago, but had no time to brag post about it.Lesson learned: Always triple check you soldering if something is not working at all!
The weird image at the top of this post is a test image I send to the LCD, and it's finally working! But more on that in another, probably way too long, post. Here's a teasing picture though:




Ok, now the useful stuff and background information:

  • Arduino test sketch (see end of post), works on Arduino Duemilanove. (It should work on every Arduino board, as it does not use hardware SPI or anything special really). It only works for LS020 type S65 screens though. If you change all the hexadecimal values for the init sequences it will work with others display types as well.

    Pins: RS 4; RESET 17 (Analog 3); CS 16 (Analog 2); CLK 13; DAT 11
    You can change the pins in the test sketch if you like. Look up the corresponding pins on the LCD on Christian's site (see below).

    The sketch will initialize the display, so that it is ready to receive commands or image data. You can see that the sketch is finished when the on-board LED on pin 13 starts blinking. The display is working if you see a random noise pattern on your screen. (I.e. a darkish mix of randomly colored pixels. May be hard to see without backlight on, but you should definitly be able to tell if you look closely even without backlight.)

  • Great information on the hardware side of things: Christian Kranz's very informative site on the S65 display

  • Great information about the software,hardware, init codes, shutdown codes, etc.: mikrocontroller.net
    Most text is in German, but there is a lot of information in English as well, especially in the middle and to the end of this long thread. Be sure to check this post and download the attached PDF. Pretty much all the information you need is in the PDF, and it's in English!
     
  • Working S65 library for all Arduinos: Watterott Eletronics - S65 Shield Project
    I am using this lib right now, with quite a few modification. (Again, more on that later). Be sure to check the pin-outs in the documentation! (Should be the same as in my test sketch below on Duemilanove and Diecimilla).

Hopefully, I will be able to post some more basic info, like a Fritzing sketch later today or tomorrow. Now it's time for a coffee break for me, and time for you to test your display !

For your convenience: Download of the sketch. The download sketch still has a lot of testing rubbish in it, so i suggest you just copy and paste the posted code below.

-----------------------------------------------------------------------
Arduino sketch:
-----------------------------------------------------------------------

// lcd pins connected to corresponding lcd pins
#define RS (4)
#define RESET (17)
#define CS (16)
#define CLK (13)
#define DAT (11)

void setup() { 
   // set  output pins
   pinMode(RESET, OUTPUT);
   digitalWrite(RESET,LOW); 
    pinMode(CS, OUTPUT);
   digitalWrite(CS,HIGH);    
   pinMode(RS, OUTPUT);
   pinMode(CLK, OUTPUT);
   pinMode(DAT, OUTPUT);

   /**************************
    *
    * init starts here
    *
    **************************/

   delay(100); // wait a bit for everything to settle down... who knows

   digitalWrite(CS, HIGH);
   digitalWrite(RS, HIGH);
   digitalWrite(RESET, LOW);
   delay(50);
   digitalWrite(RESET, HIGH);
   delay(50);
   digitalWrite(CS,LOW);

   /**************************
    * INIT 1: Display software reset
    **************************/
   sendIntToLCD(0xFDFD);
   sendIntToLCD(0xFDFD);

   //important delay of 50ms
   delay(50);

   /**************************
    * INIT 2
    **************************/
  sendIntToLCD(0xEF00);
   sendIntToLCD(0xEE04);
   sendIntToLCD(0x1B04);
   sendIntToLCD(0xFEFE);
   sendIntToLCD(0xFEFE);
   sendIntToLCD(0xEF90);
   sendIntToLCD(0x4A04);
   sendIntToLCD(0x7F3F);
   sendIntToLCD(0xEE04);
   sendIntToLCD(0x4306);

   //important delay of 7ms
   delay(7);

   /**************************
    * INIT 3
    **************************/
  sendIntToLCD(0xEF90);
   sendIntToLCD(0x0983);
   sendIntToLCD(0x0800);
   sendIntToLCD(0x0BAF);
   sendIntToLCD(0x0A00);
   sendIntToLCD(0x0500);
   sendIntToLCD(0x0600);
   sendIntToLCD(0x0700);
   sendIntToLCD(0xEF00);
   sendIntToLCD(0xEE0C);
   sendIntToLCD(0xEF90);
   sendIntToLCD(0x0080);
   sendIntToLCD(0xEFB0);
   sendIntToLCD(0x4902);
   sendIntToLCD(0xEF00);
   sendIntToLCD(0x7F01);
   sendIntToLCD(0xE181);
   sendIntToLCD(0xE202);
   sendIntToLCD(0xE276);
   sendIntToLCD(0xE183);

   //important delay of 50ms
   delay(50);

   /**************************
    * INIT 4
    **************************/
   sendIntToLCD(0x8001);
   sendIntToLCD(0xEF90);
   sendIntToLCD(0x0000);

   // were done, display doesnt need to listen anymore
   digitalWrite(CS, HIGH);

   pinMode(13, OUTPUT);
}

void loop() {
   // blink onboard led to signal end of init
   digitalWrite(13,HIGH);
   delay(250);
   digitalWrite(13,LOW);
   delay(250);
}

void sendIntToLCD(unsigned int value) 
{      
 shiftOut(DAT, CLK, MSBFIRST, (value >> 8) & 0xFF);
 shiftOut(DAT, CLK, MSBFIRST, value & 0xFF);
}
-----------------------------------------------------------------------
End sketch
-----------------------------------------------------------------------

6 comments for this post

> "Working S65 library for all Arduinos: Watterott Eletronics - S65 Shield Project
I am using this lib right now, with quite a few modification."

Can you tell what modifications you have made? Your example works well, but S65Display library seems not to work at all :(

Posted on February 19, 2011 at 7:57 PM  

Sorry, I cannot remember after this long time.

You may need to adjust the pin numbers for the 5 lines in the header file of the library. Or check if they are the same as in my code snipped above, if thats code is working already.

I'll dig up the old code if that's not working.

Posted on February 19, 2011 at 10:08 PM  

setting the pin numbers was the first thing i've tried, but with no luck :(

thanks for the help, i have absolutely no idea what can be wrong besides that

Posted on February 20, 2011 at 12:17 AM  
This comment has been removed by the author.
Posted on February 22, 2011 at 12:32 PM  

so maybe you could dig up that old code, please?

Posted on February 22, 2011 at 1:59 PM  

It’s really a nice and helpful piece of info. I’m happy that you shared this useful information with us. Please keep us informed like this. Thanks for sharing.
top led tv price in dubai 2019

Posted on February 15, 2019 at 11:12 AM  

Post a Comment