SSD2119 4-wire SPI

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm using a 3.5TFT with SSD2119 controller in 4wire spi.
I want to know how should I read GRAM data in this mode, there is no clue in datasheet.
The TFT is from crystalfontz "CFAF320240F-035T"
You can see lcd datasheet in here
http://www.crystalfontz.com/prod...

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Page 55 of the datasheet; also the note in section 7.4. It looks like it's a straight read.

Never used the chip, mind!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Page 55 of the datasheet; also the note in section 7.4. It looks like it's a straight read.

There is no info in page 55!
In page 20 there is a table that said that the RD and WR signals does not used with the SPI interface, and in section 7.4 that you said it has used WR signal.
I have not connected WR and RD signals to the MCU, and I can write the LCD successfully
But I still got no idea how to read back lcd data.

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I dare say you cant read back data and why would you want to? It is probably considered too slow to read via spi.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I dare say you cant read back data and why would you want to? It is probably considered too slow to read via spi.

For some effects it's crucial to read data back, for example when you want to modify pixel colors, calculate new pixel values etc...

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That's why you have a frame buffer in memory. It's much faster to do the manipulation there and then either refresh the whole display or just a block.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This lcd has built in frame memory, so you can use it with an avr!

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ali_dehbidi wrote:
Quote:
Page 55 of the datasheet; also the note in section 7.4. It looks like it's a straight read.

There is no info in page 55!
In page 20 there is a table that said that the RD and WR signals does not used with the SPI interface, and in section 7.4 that you said it has used WR signal.
I have not connected WR and RD signals to the MCU, and I can write the LCD successfully
But I still got no idea how to read back lcd data.

You're not using the external read and write instructions because you're using the SPI interface. But the SPI talks to internal registers, and register 22h is the read/write GRAM instruction, depending whether you have the top bit set or clear.

I assume you're looking at http://www.crystalfontz.com/prod...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
You're not using the external read and write instructions because you're using the SPI interface. But the SPI talks to internal registers, and register 22h is the read/write GRAM instruction, depending whether you have the top bit set or clear.

I have only 16bit's of data; there is no bit for WR bit in the pattern? Am I missing something? Would you attach a picture?

I love Digital
and you who involved in it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ali, I fear I have led you astray... The implication on the page I found was that there were a couple of control bits as part of the SPI message.

But reading things in more detail: the rd pin is unused in serial transfers, but there *is* a data out pin (see SDO on figure 2). It's pin 8 of the interface (page 17) - which I suppose makes the 4-wire SPI actually a 5-wire...

Normally you don't specify read or write with SPI access - but you'll normally find data from the device on the *leading* edge of the clock pulse - falling in this case. What I suspect is happening is that you write the address to the command register with the appropriate SCS and SDC levels, then successive reads will grab the data - you may need to write the data straight back again.

I don't know how this ties in with the statement that writes autoincrement and reads don't - I think you're going to have to do some poking around.