Shop OBEX P1 Docs P2 Docs Learn Events
SSD2119 QVGA TFT displays (internal ram + spi) — Parallax Forums

SSD2119 QVGA TFT displays (internal ram + spi)

Peter JakackiPeter Jakacki Posts: 10,193
edited 2015-07-11 23:12 in Propeller 1
I've just started playing with one of the many displays that I get in as samples. It's a 320x240x16M TFT with touchscreen (and here) that has been lying around but I thought I should try interfacing to it. Anyway I hadn't realized that not only does it have it's own display RAM but you can also access it in 3-wire SPI mode, what a bonus.
1893550-40.jpg

Of course I am testing this out using Tachyon Forth and here is a link to my source code page which is still very basic at present.

Has anyone been using something similar? The price seems reasonable even from Element14 and I know that if you ask them for a good quote you can sometimes get a better price than from the manufacturer.
143 x 200 - 3K

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-09 01:53
    I got around to rendering the Propeller font on the display so it's quite neat to have 20 characters by 7 lines as well as graphics and up to 262K colors. Very easy to drive so I will be using these displays a lot more I think. Next step is to interface the touch screen and add some gui widgets for Tachyon.
    QVGA-v.jpg

    The current source code is here.
    639 x 490 - 107K
  • Ron SutcliffeRon Sutcliffe Posts: 420
    edited 2012-11-09 02:03
    Peter

    Thanks for sharing the code with us. The TFT's sound like a steal at that price.

    Ron.
  • Mark_TMark_T Posts: 1,981
    edited 2012-11-09 02:25
    I've just started playing with one of the many displays that I get in as samples. It's a 320x240x16M TFT with touchscreen (and here) that has been lying around but I thought I should try interfacing to it. Anyway I hadn't realized that not only does it have it's own display RAM but you can also access it in 3-wire SPI mode, what a bonus.
    1893550-40.jpg

    Of course I am testing this out using Tachyon Forth and here is a link to my source code page which is still very basic at present.

    Has anyone been using something similar? The price seems reasonable even from Element14 and I know that if you ask them for a good quote you can sometimes get a better price than from the manufacturer.
    Yes, the various ILI9320 and ILI9325 modules on eBay, for instance http://www.ebay.co.uk/itm/2-8-inch-320x240-Touch-TFT-LCD-Display-Module-SPI-Interface-ILI9320-/181008290930?pt=LH_DefaultDomain_0&hash=item2a24ef5472 and http://www.ebay.co.uk/itm/2-4-inch-TFT-LCD-module-320x240-ILI9325-touchpad-PCB-adapter-arduino-AVR-STM32-/120992686604?pt=LH_DefaultDomain_0&hash=item1c2bb9e20c
  • TubularTubular Posts: 4,703
    edited 2012-11-09 15:07
    Thats a nice find, Peter.

    Any idea what rate the SPI goes up to? Couldn't find it in the datasheet

    I see they also have a 2" variant that is 220x176

    cheers
    Lachlan
  • Mark_TMark_T Posts: 1,981
    edited 2012-11-09 15:47
    Tubular wrote: »
    Thats a nice find, Peter.

    Any idea what rate the SPI goes up to? Couldn't find it in the datasheet

    Lachlan

    15MHz, eventually if you trawl down to the electrical characteristics section it has all the timing diagrams.
  • TubularTubular Posts: 4,703
    edited 2012-11-09 18:11
    Mark_T wrote: »
    15MHz, eventually if you trawl down to the electrical characteristics section it has all the timing diagrams.

    Many thanks Mark_T
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2012-11-10 07:43
    I just took a look at the Farnell UK price for this display. As usual, change the dollars into pounds directly.

    Hey-Ho
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-11 05:18
    I just took a look at the Farnell UK price for this display. As usual, change the dollars into pounds directly.

    Hey-Ho

    Don't worry, I'm going to see what price I can get for a box of these, either from Farnell or from KENTEC.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-12 02:48
    The source code page has been updated with selectable fonts, either the Propeller font with scaling or a 5X7 font. I am also experimenting with GUI objects and loading screens from the SD card. Next thing to tackle is the 4-wire touch screen which I am looking at using 4 I/O with capacitors on each leg and correlating the readings to derive the position. Anyone interface a 4-wire without chips or A/Ds on the Prop before?

    QVGA text.jpg
    QVGA KEYPAD medium.jpg
    QVGA KEYPAD small.jpg
    QVGA KEYPAD large.jpg
    1024 x 801 - 194K
    1024 x 784 - 171K
    1024 x 768 - 171K
    1024 x 801 - 157K
  • Bill HenningBill Henning Posts: 6,445
    edited 2012-11-12 10:14
    Nice work Peter.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-12 19:10
    Nice work Peter.
    Thanks Bill, since the display is a well stocked stock item from a major supplier at an attractive price I thought it would be of interest, and of course just showing what can be done with it over SPI as is. Changing the interface to parallel should make a big difference but if it works well over SPI first then it surely will work better over parallel later.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-14 05:59
    This project is still in the very early stages but I am slowly building up some GUI objects. They are a bit rough at the moment but in the end I should be able to define a button that automatically returns it's value when pressed along with other kinds of objects too. The display object will work like a virtual character or graphic LCD within the LCD (well, that's my plan). For example, I define a 5x4 keypad using the DRAW(KEYPAD) object:
    BLUE DARKER PAPER RED PEN
    WHITE 5 4 #62 #44 DRAW(KEYPAD)
    and then a display window and it would look like this:
    KEYPAD LCD.jpg

    Well, it does look like this. However, it is at a nascent stage but I like the idea of being able to run SPI if I am a bit limited with I/O otherwise I can use various parallel interfaces for speed. I am still experimenting with the bare-bones touch screen interface using 4 I/O and 4 caps and it would be nice if I could get this to work otherwise I always have the fall-back option of a touch screen chip. The 3.5" is a good size, not too small and fits nicely into an existing enclosure. At present I can get these for just under $20 a piece.
    1024 x 803 - 605K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-14 17:05
    Am I reinventing the wheel here? I trawled through the forum a little bit but I can't see where a QVGA has been interfaced using SPI without requiring more hardware (besides the backlight power). Both Ray and Drac seem to have very nice displays but both need extra hardware. Even with the basic 3-wire SPI I can clear the screen and draw the calculator style GUI and text (previous post) in 1.675 seconds, not fast but acceptable at the moment. Another trick will be to use the VG to handle the SPI if it will work with this display.

    So, any heads up or links to other posts might be helpful. Even if I am reinventing the wheel it's great fun.
  • PepzPepz Posts: 20
    edited 2012-11-22 06:26
    Great Tft-Guru, that's cool!
    I want to do something similar with ET035009DH6: http://www.google.com/search?q=ET035009DH6
    Any thoughts if that is possible?
    I have very carefully tried to connect it but it's still blacker than black!
    Hints to get me started?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-22 22:54
    Pepz wrote: »
    Great Tft-Guru, that's cool!
    I want to do something similar with ET035009DH6: http://www.google.com/search?q=ET035009DH6
    Any thoughts if that is possible?
    I have very carefully tried to connect it but it's still blacker than black!
    Hints to get me started?

    That display does not have any internal RAM so even though the SPI and command set are very similar it doesn't support writing to the non-existent display RAM. I will have an adaptor pcb for this display which will accept the fine pitch FPC and also include the up-converter to drive the back-light and touch-screen encoder. So this is a better option or else there are plenty or similar ones to choose from such as from ego-china etc. Those displays have a huge adaptor board, I just want a small one.
  • PepzPepz Posts: 20
    edited 2012-11-23 14:59
    I forgot to tell you that i have this breakout board for it.
    I have seen it running in another configuration.
    Comments?
    brkbrd.jpg
    brkbrd-det.jpg
    781 x 408 - 88K
    594 x 357 - 95K
  • rwgast_logicdesignrwgast_logicdesign Posts: 1,464
    edited 2012-11-25 10:46
    thWhere do u get tft samples? Ive been needing a display and ive just been thinking about buying a small tv since theres already drivers but i would like a touch screen in reality, could this be easily converted to spin/pasm? I know nothig about fourth
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-26 16:11
    thWhere do u get tft samples? Ive been needing a display and ive just been thinking about buying a small tv since theres already drivers but i would like a touch screen in reality, could this be easily converted to spin/pasm? I know nothig about fourth
    I will have a small adaptor pcb for this shortly that includes the boost converter for the LED backlight as well as the touchscreen controller chip (STMPE610). So you will at the absolute minimum need 3 I/O but two of them can be the I2C lines from the EEPROM. The reset signal is generated from a "break" condition on the CS line.

    If I don't have to convert the code then it's easy for me, I don't have to do a thing! Spin however is way way too slow and PASM would require dedicating a cog as well as sitting down to code the thing. But the Forth source should be easy enough to follow if you really are determined to convert it. Of course if you were that determined then you may as well learn Forth, it's fast and it's fun.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-27 05:59
    I'm committing an adaptor pcb for this display this week but I couldn't help myself and I've made a few enhancements. Since I wanted to cut down on the number of I/O lines needed to drive this I ended up with a rather nice scheme if I say so myself. Since the SPI is only basically a clock and data signal along with a chip select I have combined all this plus the reset signal and some other controls onto the I2C bus. But wait, the I2C bus is too slow to drive this display you say. Well yes but I am still using the I2C bus lines for high speed SPI clock and data as needed while a small micro is taking care of the chip select timing as well as other tasks such as clearing the display and interfacing to the touch screen etc.

    So to talk to the display I first ask the controller nicely in I2C terms to arrange the I2C lines as pass-through SPI clock and data but have it time the chip select etc. As soon as a I2C start or stop condition is detected then this high-speed pass-through mode is aborted. The micro I'm using is a C8051F986 ($1.60 in an SSOP20 pack and 25MIPS) and sports SPI, I2C, UART, etc as well as 16-bit ADC. I'm using the ADC for interfacing to the touch screen but still allowing for a conventional touch screen chip if I feel it's needed (STMPE610). The micro is programmed in-circuit by the host Prop using another temporary I/O so it is reprogrammable by the user if needed.

    Some planned I2C commands are:
    RESET
    BACKLIGHT ON/OFF/DIM or PWM
    CLEAR SCREEN with selected color
    PLOT pixel with selected color (slow way but totally I2C standard)
    SET CURSOR X and/or Y
    DRAW 5x7 font character at current cursor (with optional scaling)
    DRAW HORIZONTAL LINE
    DRAW VERTICAL LINE
    DRAW RECTANGLE
    DRAW FILL
    SPI ASSIST - pass through all clock and data signals directly to the LCD but count the clocks and generate the chip select automatically.

    The UART is also functional and processes the same commands as the I2C except the SPI mode of course.

    So this enhancement doesn't add any real cost and I can still totally bypass the controller and talk to the display in SPI if I really wanted to but with it all I need is mixed I2C/SPI or UART. What this means is that the I just use the same I2C lines as the Prop's EEPROM so I can always interface a QVGA TFT even if there are no spare I/O available. The adaptor includes a 5V LDO as many of my 4-pin I2C headers carry 5V.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-04 22:28
    This pcb is well under way and I should have completed pcbs next week. It attaches to the rear of the display with 3M double-sided so it's never going to budge. This makes the whole display very compact and you only need an I2C bus or RX and TX (for the touch-screen) to talk to it. There's an on-board regulator so you can even feed it 5V if you want. The backlight can be dimmed under software control and all the signals are directly available on a 10-pin IDC header. The I2C bus can be purely I2C where the C8051 does all the work or it can switch to SPI blaster mode where the C8051 worries about the CS but the clock and data are taken in raw.

    P1246 TFT.png
    828 x 441 - 80K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-11 03:03
    I've got my pcbs and parts and made up one, here it is:
    P1246-R2S.jpg
    P1246-R1S.jpg
    P1246-R3S.jpg


    Now to write some firmware for the hybrid I2C interface chip and see how it goes.
    799 x 633 - 128K
    799 x 617 - 103K
    799 x 326 - 46K
  • SapiehaSapieha Posts: 2,964
    edited 2012-12-11 03:08
    Hi Peter

    Nice work.

    I've got my pcbs and parts and made up one, here it is:
    P1246-R2S.jpg
    P1246-R1S.jpg
    P1246-R3S.jpg


    Now to write some firmware for the hybrid I2C interface chip and see how it goes.
  • SRLMSRLM Posts: 5,045
    edited 2012-12-11 03:14
    Sapieha wrote: »
    Hi Peter

    Nice work.

    Agreed. The Propeller needs some more display options.
  • Bill HenningBill Henning Posts: 6,445
    edited 2012-12-11 09:36
    Looks good!
    I've got my pcbs and parts and made up one, here it is:
    P1246-R2S.jpg
    P1246-R1S.jpg
    P1246-R3S.jpg


    Now to write some firmware for the hybrid I2C interface chip and see how it goes.
  • NaliniNalini Posts: 2
    edited 2013-10-18 08:10
    Hi,


    I am beginner in tft touch panel. I have k350-QVGA tft(ssd2119 driver). It would be helpful if anyone can describe the flow -
    - initialise
    -writing data
    -display clear
Sign In or Register to comment.