• We recently switched our forum platform. If you experience any issues please email support@crystalfontz.com

CFAG timing

Zog

New member
I have a CFAG12864B-YYH-V. In my project, I need to continually copy data from external memory into the LCD as fast as possible. The timing diagram says that it takes a minimum of 1000ns to send an instruction to the LCD. However, it doesn't seem like the device can actually execute one instruction every 1000ns. If I try to send instructions this quickly, the device doesn't work.

I don't want to check the busy status of the LCD before sending each instruction, so about how long should I need to wait between instructions?
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

Zog

New member
All right, I'll try polling the flag. I assume the LCD can handle a status read instruction while another instruction is taking place. Otherwise the busy flag would be kinda pointless. Right?
 

CF Tech

Administrator
Yes the busy can be read while the display is processing another instruction.

The theory of the busy flag is that the bus cycle is much faster than the instruction execution time.

I have found on the character displays, that you can set up a read of the port, and then the busy flag will update without regard to the other lines. That way you can just check that one pin in a loop instead of cycling through a whole read. If it works, that will allow you to respond on average more quickly to the busy flag becoming clear. I do not know if that is true for this controller, but you might give it a try.
 

Zog

New member
>I do not know if that is true for this controller, but you might give it a try.

This seems to work. Once the status read instruction is sent, the busy flag can continuously be polled without starting a new status read instruction.

I've been trying to create a grayscale effect by quickly flipping between 2 separate images. In theory, pixels that are set in both images should appear black, pixles set in neither image should be white, and pixels in a single image gray. With the fast status polling, I get decent gray pixels, but the screen flickers pretty bad. I'll probly give up on it unless someone has an idea I could try.

People have created high quality grayscale using essentially this technique on TI graphing calculators. On the calc, software interrupts are used to swap the two planes, but they are syncronized to the LCD refresh.
 

CF Tech

Administrator
I think on that display, if you poke around on the controller (or look in the data sheet) you should be able to find "FRM" signal. You might be able to synchronize on it.

You might be a able to update a "half-size" (=1/4 area) window fast enough for it not to flicker.

In any case it is going to be hard to get a grey-scale out of that display.
 

kattice

New member
Got working?

Zog,

Were you able to make it work?

I'm working with CFAG12864B-TMI-V LCD. I am running the LCD with Z8Encore controller. I do have internal and external flash. I have not done any coding for external flash, but as for the internal, it's working. The Z8Encore runs off from 19.44MHz. The LCD spec. states that the tcyc is 1000nSec (min). I find think kinda confusing. The 1000nSec is 1MHz. Since I'm running at 19.44MHz, this is about 51nSec. The Z8 takes about 2 or 3 clock cycle to excute a command (general I/O). Once you initialize LCD, you can write data. It takes about 200nSec to display 8bits pixels. I don't read the status from LCD.

As for the grey scale, do you have the ratio that determines the grey level?
 

Zog

New member
No I haven't had a chance. I'll play with it more once finals are over.

As for the ratio, I was using 1 refresh on one buffer and 3 refreshes on the other buffer.
 
Top