initialization problems with CFAG320240CX-TFH-T-TS

gs_chief

New member
Hi,

We have been having some problems initializing our display. We are interfacing to a dsPIC30F4011, programming in MPLAB with the C30 compiler. We are running in 8080 mode, with a 5V source. I have checked the Vo pin, and it is set to -18.8 V. I've double checked the wiring (according to the reference manual and the example given in the thread https://forum.crystalfontz.com/showthread.php?t=5025&highlight=CFAG320240CX) , followed the example code in both, and have come up with nothing.

When we run our code (which I have attached), we get a purely black screen when we get to the "enable display" command. The lcd_init() function is the only thing called from a separate file. I've also attached a screenshot of some of our control lines in the process of sending a command to the LCD. As you can see, the WAIT line is very different than what the reference manual states it should be (it appears to be active HIGH), as well as going low after the CS line becomes inactive. We have tested our code with different delay times, but the WAIT line still goes to zero only after the CS line goes high. Do you know of any possible reasons for this?



Thanks for the help,
Derek
Simon Fraser University
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

Attachments

CF Tech

Administrator
Thank you for your post.

The demo code we supply for the CFAG320240CX uses delays instead of the wait line, so I do not have any direct experience using the wait line with that controller.

My advice would be to run every step in a super slow (long delays) sequence until you get the display initialized, then work on optimizing the timing.

Please take a look at the sample code we have for the CFAG320240CX in this thread:

https://forum.crystalfontz.com/showthread.php?t=3257

We just cleaned up the CFAG320240CX_WinTest code, so it should show the initialization algorithm clearly. Once you get something on the display using delays, then revisit the WAIT bit.
 

gs_chief

New member
Hi,

We have been following the example code given in the WinTest source file, and can find no useful differences between our code and yours. Would you mind taking a look at it, in case we have missed something important?

Also, our code does not make use of the WAIT pin in any way. We began looking at it when we couldn't get the display to initialize, and thought maybe the fact that it was acting strangely is indicative of a larger problem? Do you have any ideas on what we could try next, if you can't find any problems with our code? Any way of checking the hardware side of the display? We have access to a multi-channel logic analyzer, and the signals going to the input of the display look fine, by our reckoning.

Thanks for your help,
Derek
Simon Fraser University
 
By the looks of your code, you are operating the display in 8080 mode, but according to the data sheet, the display is shipped with the jumper set to 6800 mode. Have you removed "J68" and added "J80"?
 

gs_chief

New member
Hi CosmicVoid,

Thanks for the interest in our problem here. Yes, our supervising professor is more familiar with the 8080 interface (timings, etc), and suggested we switch it over. We were already having this problem before we switched the jumper to J80, however. We then rewrote the code for the 8080 interface.

If you have any more suggestions, please, let me know! I've been struggling with this daily for over a week now, unable to get anywhere.

Thanks,
Derek
 

CF Support

Administrator
If you're getting a pure black display, chances are that the trim pot on the back of the module is turned past where the ideal contrast would be. Is this the case?
 

CF Tech

Administrator
It could be that the display has gotten toasted on the bench. It does happen . . . all it takes is 1/2 second reverse polarity on the power (or a host of other possible incorrect connections).

If you think that could have happened, please write support@crystalfontz.com and we can arrange to test the unit you have, or somehow get you a second unit.
 

gs_chief

New member
Huh... Well, it turns out that a Vo of -11.9V is the proper voltage for my LCD. My trimpot is turned completely down, but I finally have something!

Thanks everyone for your help! One last question though: Will not being able to adjust the contrast any further be a problem? We don't foresee having to change the contrast on the fly, but is this Vo within spec for the display?

Thanks,
Derek
 

CF Tech

Administrator
That is a little odd. Let us check one out on this side. Sounds like there might be something goofy with the circuit on that one.
 
Top