Hi 3v0, thanks by the answer but the lib, link, inc phats are well defined... well they are like you told me.. e:\microchip\MCC18\lib; e:\microchip\MCC18\LKR; e:\microchip\MCC18\h.
maybe the student version have no features for this? I don't know... but I would like to know if some one tell me...
Any one knows if exist a errors manual? I'm trying to find it in the manuals of the compiler but until now I didn't found any thing... If you know please post a link to it. Thanks
To contribute for who needs... I used the 3 codes in the first post of this threat, then because my pic and hardware are different (18f452) my chages was:
GLCD.H
#include <p18f452.h>
//#define __18C452_H
#define GLCD_Data PORTD
#define b_GLCD_GCS1 LATBbits.LATB2
#define b_GLCD_GCS2 LATBbits.LATB1
#define b_GLCD_RS LATEbits.LATE1
#define b_GLCD_RW LATEbits.LATE0
#define b_GLCD_E LATEbits.LATE2
#define b_GLCD_On LATBbits.LATB0
#define b_GLCD_BL LATAbits.LATA0 // Not used in my project
For test purposes, i tried to comment out " return LL; " line, then program goes through but it is not able to display anything on the GLCD.
Here is attached m GLCD.c file ( modified to complement CS1 and CS2 with "1-" solution from Pommie's idea.
For my GLCD, if i read well the datasheet i found :
CSx AREcomplemented,
E is not complemented.
R/W': R is not complemented, W is complemented,
RS (D/I', D: Data, I: Instruction): D is not complemented, I is complemented RST pin is not available on my GLCD.
Any help will be much appreciated, because i can't find why the programs hangs during Init function.
If i comment outreturn glcdData;, then program runs properly.
But it only lights the left hand side board, if i try to Put a Message that is located in the middle on the display it is not working properly !
What should i do to have all display available ?
If i put a text longer than pos (64,64) then the display returns to x = 0 position but keeps y postions ( see attached picture for message : "50/50" written at x=50 y=50
Here are the instruction i used to display the attached picture:
Code:
glcd_SetPos(10,0); // Positionner le curseur (x,y)
glcd_PutMessage("Graphic"); // Ecrire un message
glcd_SetPos(50,50);
glcd_PutMessage("50/50"); // Write "50/50" at position x=50 y=50
glcd_SetPos(0,63);
glcd_PutMessage("0,63"); // Write "0,63" at position x=0 y=63
glcd_Plot(63,32);
glcd_Box(12,35,25,45);
glcd_HorizontalLine(10,40,50);
By the way :
Can someone tell me why glcd_Read returns glcdData , why this is usefull ?
It looks that glcd_Data is never been changed during glcd_Read function ...
if i understand well, gllcd_Read function sets some pins to proper state and do only glcdData = GLCD_DATA;
I finally succeeded to get hkBattousai GLCD library working ...
( I've got a problem with CS2 pin )
But this library looks getting outstanding results :
- It looks that it is reverse displaying method : White on Black instead of Black on White
Is there a way to change this ?
- When i try to display a long text that uses the 2 controllers ( CS1 and CS2 ) :
Text well displayed until x position is < 63,
when x position is > 63 the rest of text 1 pixel shifted up.
( see my attached capture, "n is (10,32)" is centered with the beginning to the text.
Also "o" letter is also a bit overwritten. ( 2 pixels are missing at the right hand side )
- When i try to display only one pixel with Plot function, i do not get anything on the screen.
I will appreciate your help and advices,
Best Regards,
hello hkbattousai,
i have a similar graphical lcd like the one that you have, i got it from turkey, its a wg12864b and i'm using a pic 18f4550 micro controller.
i have wired up the lcd to my pic using a breadboard and i will attach a potentiometer to adjust the contrast soon, but the problem is that my lcd does even come on! i burned the code successfully to the pic and everything looks wired properly, i hope you could help me . i shall attach the code and and my project schematic. to open the second file simply remove the .zip at the end of the extension and open using proteus simulator
^ Your zip file is not opening, it is corrupt.
The C file is a very big (+2000 lines) and messy (probably in Spanish), thus very hard to understand and I couldn't find any glcd commands in it.
Can you briefly write here (between
^ Your zip file is not opening, it is corrupt.
The C file is a very big (+2000 lines) and messy (probably in Spanish), thus very hard to understand and I couldn't find any glcd commands in it.
Can you briefly write here (between
Code:
tags) your relevant glcd code?[/QUOTE]
thanks hkbattousai for the quick response, i dont know much about glcd part of the code as it was sent to meby another programmer . my goal is to write a small game on my graphical lcd. if you could show me how to get my glcd working and putting some graphics on it then i might succeed in writing my game for it. i'll reupload the schematic. thanks again.