Shop OBEX P1 Docs P2 Docs Learn Events
Run a 2.4" TFT display with only a max of 3 prop pins? — Parallax Forums

Run a 2.4" TFT display with only a max of 3 prop pins?

eagletalontimeagletalontim Posts: 1,399
edited 2014-06-05 21:33 in Propeller 1
I have a few of these laying around :

http://www.ebay.com/itm/2-4-TFT-LCD-Module-Display-Touch-Panel-PCB-adapter-/190477028273

What I am wanting to do is a VERY SIMPLE circuit board that can plug into this display and then I can use the Prop to control output to the screen. I am not interested in using the touch screen capability and would like to find this same screen without the touch capability....that is a different thing though.

I am hoping to output only text to this screen and update only specific text at a rate of 5 times a second if possible. The slowest I could go would be 2 times a second. I have the screen set to 8 bit mode and was wondering if I could use a 74HC595 to send the output to the screen so I would only use 3 prop pins. Anyone willing to pitch in some ideas on this?

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-06-04 19:14
    I have a few of these laying around :

    http://www.ebay.com/itm/2-4-TFT-LCD-Module-Display-Touch-Panel-PCB-adapter-/190477028273

    What I am wanting to do is a VERY SIMPLE circuit board that can plug into this display and then I can use the Prop to control output to the screen. I am not interested in using the touch screen capability and would like to find this same screen without the touch capability....that is a different thing though.

    I am hoping to output only text to this screen and update only specific text at a rate of 5 times a second if possible. The slowest I could go would be 2 times a second. I have the screen set to 8 bit mode and was wondering if I could use a 74HC595 to send the output to the screen so I would only use 3 prop pins. Anyone willing to pitch in some ideas on this?

    The S6D1121 controller on that display apparently allows SPI interface:
    The S6D1121 allows serial interface transfer, using the chip select line (CSB), serial transfer clock line (SCL), register select line
    (RS), serial input data (SDI), and serial output data (SDO). For a serial interface, the IM0/ID pin function uses an ID pin.
    I'll look into a bit more.

    EDIT: Yes, the CSB, SCL, and SDI is all you need.
    Set IM[3:0] to VSS VDD3 VSS ID to select Serial peripheral interface (SPI) E_RDB,TSO[0] (SDI, SDO)

    Don't know if you can get to these pins though.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2014-06-04 19:43
    I am not familiar with this display as I bought them for tinkering about a year or so ago. I am just now getting around to playing with these now. This would be my first time messing with spi, parallel, or serial data other than the parallax 2x16 display, so I will need some help getting this working :)
  • tonyp12tonyp12 Posts: 1,951
    edited 2014-06-04 20:09
  • eagletalontimeagletalontim Posts: 1,399
    edited 2014-06-04 21:13
    With the way I have my main circuit set up, I only have access to 3 prop pins. This is why I am trying to get this to work in some way.
  • jmgjmg Posts: 15,173
    edited 2014-06-05 00:34
    .. I have the screen set to 8 bit mode and was wondering if I could use a 74HC595 to send the output to the screen so I would only use 3 prop pins. Anyone willing to pitch in some ideas on this?

    You could use 2-3 HC595 and drive them as CLK, DI, LD, but you would be write only.

    With a 40 pin header, it might be smarter to look for a cheapo 40 pin Micro that can be a simple serial slave.
    The Atmel AT89LP51/AT89LP52 are 82c/25+ in DIP40
  • eagletalontimeagletalontim Posts: 1,399
    edited 2014-06-05 18:16
    I am looking to only write to the screen, but if read is necessary to output to the screen and I have to use more than 3 prop pins, this will not work. The current circuit board uses a 6 pin plug and one of the traces I left off on one of the pins so I have a total of 5 pins (Positive, Negative, P1, P2, P3) The display will be located about 4 feet away from the main board.
  • jmgjmg Posts: 15,173
    edited 2014-06-05 18:54
    I am looking to only write to the screen, but if read is necessary to output to the screen and I have to use more than 3 prop pins, this will not work.

    A smarter slave can allow you to store Foreground and background colours and then you send pixels, so your link bandwidth is better used.

    A LP52 can run 8/9 bit classic UART to Xtal/16 in std UART mode, and up to Xtal/2N in SPI half duplex (LP52 always generates SCLK, so Prop needs Slave-spi code). It has an optional 1.8432MHz on-chip RC oscillator.(no PLL)

    The 8K code in LP52 could store some simple font info, which can save even more link bandwidth.
    (or, you can use a Prop as link-slave, but that's a little expensive)

    One approach could be to use a Prop slave for proof-of-concept, and move to LP52-slave for volume production.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-06-05 19:41
    Three HC595 chips should do the trick. It will be slow but it would work.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2014-06-05 19:50
    How slow? I am a little confused with jmg's post as I don't understand the difference between UART and SPI or slave-spi. I thought all that needed to be done was to send 8 bits to the screen (since it is set to 8 bit mode) using the HC595 which can output 8 'bits'.

    Would it be just as slow as connecting 8 pins directly to the prop as I have done before and gotten the screen to turn blue and print "this is a test" on the screen? It took I think 8 seconds to complete this task using Spin as this is the only language I understand on the PROP.
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2014-06-05 20:09
    I guess every time you toggle one bit, you have to send out 24 bits, so as a rough guess, 24x slower.

    But if you feel keen and want to code some pasm you can get it fast again. pasm code to talk to these displays exists, so all you would need is a few lines that take a long and send it out serially.
  • eagletalontimeagletalontim Posts: 1,399
    edited 2014-06-05 20:56
    So what is this LP52 chip and how would it work with 3 prop pins? Is it just one chip that is all that would be needed?

    Prop
    > LP52
    > Display pins?

    Would I still be using the same pins as what is already soldered to the board or would I have to remove the screen from the board and tap into the display only? If the "middle chip" is like RAM, maybe having a 200ms delay between calculated delay and displayed data would be ok.. Faster would be better too. I have also looked some other LCD displays, but they are quite expensive for what I am hoping to accomplish... Especially the graphic LCD's. It is strange how a TFT display is cheaper than a graphical LCD display....
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2014-06-05 21:33
    You need to send more than 8-bits because that's only the data itself and you need to strobe and select command/data etc just as you would with a normal 8-bit character LCD. If anyone is going to suggest a small micro for the display slave then you may as well make that a Prop then, the code is way easier etc. I use small micros for peripheral slaves but you have to write code that's specific not just for the core but also for that particular chip and then somehow get that compiled code into the chip and hopefully not have to debug it. I wouldn't suggest this path if you are already struggling with simple serial. Personally you are far better off getting a similar display that actually allows you to select SPI mode, I have some 3.5" touchscreen versions that I use in this manner, and it is a breeze to interface. So do yourself a huge favor right now before you regret going down a painful path and order one of those SPI displays (usually parallel/serial as in SPI).
Sign In or Register to comment.