how to connect CFAG160160B

kayimguney

New member
i saw my mistake in "H_CHAR" (0x2) register i fixed it..

1. my wiring is correct i checked every wire like 10 times with short circuit beeper..

2. i didnt understand what u ment??

im checking with multimeter, also i have o,scope to check..

if i remove 'turn on display' part from my init i shouldt see anything on screen, right?
should i do all 13 initilization parts?

u said my code sequence looks like it should work.. in wintest code 'CS' is also used in that sequence but in your code 'CS' is always low.. i tried both but i could't make any of them work..

which one is true or are both true?

wintest code
Code:
  SET_COMMAND_ENTRY
  SET_RS_INST
  CLR_CS
  delay
  SET_E
  delay
  CLR_E
  delay
  SET_CS

  SET_DATA_ENTRY
  SET_RS_DATA
  CLR_CS
  delay
  SET_E
  delay
  CLR_E
  delay
  SET_CS
your code
Code:
  CS=LOW

  SET_COMMAND_ENTRY
  SET_RS_INST
  delay
  SET_E
  delay
  CLR_E
  delay

  SET_DATA_ENTRY
  SET_RS_DATA
  delay
  SET_E
  delay
  CLR_E
  delay
CS is active low, so, set_cs means set cs to low? or the inverse?
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 
2. i didnt understand what u ment??
I mean that you signals are not occurring too fast, but with the delays in your code it seems that is not the problem, but the scope will tell.
if i remove 'turn on display' part from my init i shouldt see anything on screen, right?
right.
should i do all 13 initilization parts?
13? My list has 10 parts. Ideally you should do them all, but I did a test on my cfag160, using only the 4 parts you listed earlier, and the display is functioning, with random pixels on screen (see attached pic).
u said my code sequence looks like it should work.. in wintest code 'CS' is also used in that sequence but in your code 'CS' is always low.. i tried both but i could't make any of them work..
Then something else is wrong.
CS is active low, so, set_cs means set cs to low? or the inverse?
set = high (inactive), clr = low (active).
 

Attachments

kayimguney

New member
can u tell anything about, that i have written two different code sequences...
wintest code and your code?

btw im online waiting for you :)
 
Last edited:
As far as I know, the two codes should work identically, the use of CS is not important unless there is more than one device on the control/data bus. I notice in both sets of code that there is no operation to put data on the bus.
Code:
CS=LOW[FONT=monospace]
[/FONT] SET_COMMAND_ENTRY[FONT=monospace]
[/FONT] SET_RS_INST[FONT=monospace]
OUTPUT data to BUS
[/FONT] delay[FONT=monospace]
[/FONT] SET_E[FONT=monospace]
[/FONT] delay[FONT=monospace]
[/FONT] CLR_E[FONT=monospace]
[/FONT] delay

SET_DATA_ENTRY[FONT=monospace]
[/FONT] SET_RS_DATA[FONT=monospace]
OUTPUT data to BUS
[/FONT] delay[FONT=monospace]
[/FONT] SET_E[FONT=monospace]
[/FONT] delay[FONT=monospace]
[/FONT] CLR_E[FONT=monospace]
[/FONT] delay
 

kayimguney

New member
SET_COMMAND_ENTRY
means set data 0x00
so when RS=1 it will be mode control reg

SET_DATA_ENTRY
means set data 0x12 to turn display off


not exactly means that..

SET_COMMAND_ENTRY can mean 0x00 or 0x01 , 0x02

and

SET_DATA_ENTRY can mean 0x32 after SET_COMMAND_ENTRY is 0x00
or
can mean 0x77 after SET_COMMAND_ENTRY is 0x01


u asked this right?
 
OK, I understand now. Your SET_COMMAND_ENTRY did not mean anything to me.

One more idea. I don't see any mention if you are using the R/W signal or you have it wired permanently low. If R/W is not low, you cannot write to the display.
 

kayimguney

New member
R/W is hardwared low..
i wont do any read operations..

u still dont understand anything about SET_COMMAND_ENTRY?? or u didnt before?
 
I didn't understand your macro before, I do now.

I can't think of any reason why your display is not working, unless the signals are not correct. You should use your scope to see if the signal is clean (no noise, ringing, low voltage levels, etc). When you measure any signal, connect your scope ground to the display ground, at the display module, and make all your measurement at the display pin, not the fpga pin.
 

kayimguney

New member
ok...
i didnt connect FGND pin to anywhere, i dont know if that would be a problem.. but i did shortcircuit test and it is shortcircuited with Vss pin..
and my fpga outputs are 3.3 volts.. and glcd takes 2.4 to Vdd as high so it wouldn't be a problem i hope..
my Vo is -12 volt..
if i set my data bus 0XFF i measure 3.3 volts from glcds data pins..

there shouldn't be any wiring problems but i'll check again..

can u tell anything else??

thank you so much for your help..
 
My Zilog cpu outputs 3.3 v to the LCD (which has a 5 v supply), and it works fine, your outputs should be ok. I do not connect the FGND, I don't think it matters either way.

The thing to do is check the control signals, especially the E signal, that they are not noisy or ringing. You can see some scope traces I posted from an earlier thread:https://forum.crystalfontz.com/showpost.php?p=23317&postcount=33
I don't know if that is helpful or not.

You may have to make your code do a loop, to repeat the signals continuously, to see on the scope, unless you have a single shot trace capture.
 

kayimguney

New member
now i have another problem.. i could have damaged my lcd :s
i checked my Vo pin and when i connect Vdd and Vss my Vee is -16 v there is no problem.. but there is 4.2 V voltage in my Vo pin and i didnt connect anything to there.. i dont think that is normal.. does it?
 
From your first post in this thread, you show the diagram with the pot between Vdd and Vee, the wiper to Vo. Did you change this wiring? Just before you said Vo was -12 v. What is different now?
 

kayimguney

New member
i didnt change anything.. i have - 12 v at second pin of pot but when i connect Vo there that -12 becomes 4.2 v.. so i checked my Vo pin without connecting -12 to there i saw 4.2 v on that pin.. just Vdd and Vss connected.. and Vdd and Vee is connect to the first and third pins of pot.. second pin has adjusted to have -12v.. but there is 4.2 volt on Vo .. Vo should be 0 before i connect anything to there right?
 
Vo should be 0 before i connect anything to there right?
I think that is right, but not sure. I can not easily disconnect my Vo wiring, so I can't tell what my display does.

Do you have a resistor, about 500 to 1000 ohms, that you can connect from Vo pin to ground, and see if 4.2 v is still on Vo pin? If so, you may be right that your display is damaged.

Do you have another display to compare with? I am going off-line now for several hours.
 

kayimguney

New member
i'll try what u have told..
i don't have any other lcd.. and this wasn't mine :S my teacher wont assign me to any projects i guess :s

thank you for your help..
 
I don't know if that is normal, but it proves that the Vo input is not short-circuit to Vdd. If you connect your pot wiper to Vo, can you change the voltage at Vo by turning the pot? Unless you can find a way to get near to -12 v at Vo, you will not be able to see anything on the screen.
 

kayimguney

New member
i think there is a problem with my pot.. i put resistors instead of pot and i got my old look of screen.. i used to hate that screen but now im so happy :) lcd is not broken :)
 

kayimguney

New member
no i didn't test yet..
what would be the problem? i mean what would u expect me to see when i check it with scope? what kind of error can be detected with scope?
 
Top