Cfag12232d-yyh-n

linuxmarine

New member
I am unable to get the LCD to display anything...
Here is the assembly code I am using. I went by the CFAG_WinTestDlg.cpp file as an example.

Any help would be greatly appreciated.

Thanks...
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.

What micro are you using?

Where are the definitions of the macros ("CLR_A0","SET_E1", "CLR_E1" & etc)?

Where is the delay routine?
 

linuxmarine

New member
CF Tech said:
Thank you for your post.

What micro are you using?

Where are the definitions of the macros ("CLR_A0","SET_E1", "CLR_E1" & etc)?

Where is the delay routine?
What micro are you using?
PIC16F74
1 usec instructions

Where are the definitions of the macros ("CLR_A0","SET_E1", "CLR_E1" & etc)?
Code:
CLR_A0				MACRO
	BCF	A0
	nop
	ENDM

SET_A0				MACRO
	BSF	A0
	nop
	ENDM

CLR_E1				MACRO
	BCF	E1
	nop
	ENDM

SET_E1				MACRO
	BSF	E1
	nop
	ENDM

CLR_E2				MACRO
	BCF	E2
	nop	
	ENDM

SET_E2				MACRO
	BSF	E2
	nop
	ENDM
Where is the delay routine?
What delay routines???? The documentation did not say anything about delay routines... But then that's why I am here..

Thank you for your help...
I think the documentation needs a wee bit more stuff... ;)
 

CF Tech

Administrator
Try putting a 1mS delay everywhere you have the "nop".

That would be "overkill" . . . but let's see if it then works.
 

linuxmarine

New member
Thanks, I will try that. :)
also there appears to be a 15 ms delay with some parts I noticed in this forum???

Does this part require a negative power supply at all?
 

linuxmarine

New member
That did not work, here is what I have so far???
I would have figured I should see some sort of output at this point?
 

Attachments

The display does not require a negative voltage. Maybe your contrast setting is too low. What is the voltage on Vo (pin 4)? If you make Vo go to 0 volts or a little negative, you ought to see the screen go dark.

If I were you, I'd remove this from your init sequence:
Code:
;	read modify write off
  	movlw	0xEE				;
etc,etc.
as it is only meant to be used after the RMW on command is in effect.

You could also try using the reset (0xE2) command at the beginning of your init.
 
Last edited:

linuxmarine

New member
Thanks for the help Cosmicvoid!!!

I made those changes, but still nothing??

I ran my negative power supply to -2 Volts and the screen went dark like you said....

There has to be something that I am missing...
 
Then it looks like the display is not accepting your commands. Can you troubleshoot the signals to the display, perhaps with a scope, to verify the voltage levels and timing meet the data sheet requirements? It looks like your delay routines are probably microseconds instead of milliseconds, but thats fine since the minimum cycle time is 1us, and would make it easier to see stuff on a scope. Verify that your ports are really set as outputs, and there is no hookup error.

Are you sure the R/W pin is low? I see no explicit use of the RW_PIN macro.

Are you using a 5 volt supply for the PIC? What clock speed?

Shouldn't there be a 'goto' at the start of your program, before the data table, to jump to your init code? Or are you not showing all your code. The end of your code is 'left open', too.

Also, all of your table data goes to E1 strobe; shouldn't the first 61 go to E1 and the last 61 go to E2? But that is not important just now.
 

linuxmarine

New member
Well, as it turns out the LCD was bad, after fighting the thing all week, I took it out replaced it with a second one, and everything so far runs like a champ! :)

Thank you to everyone for helping me!!!
 
Top