Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

GLCD code goes well .. but no performance

Status
Not open for further replies.

afesheir

Member level 1
Member level 1
Joined
Feb 4, 2010
Messages
33
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
1,508
does anybody have an idea about how to interfave GLCD with PIC16F877A ..?? it works fine on simulation but no way when it is downloaded on the chip !!!!!!!!!


this is my simple code:

Code:
char GLCD_DataPort at PORTD;

sbit GLCD_CS1 at RB0_bit;
sbit GLCD_CS2 at RB1_bit;
sbit GLCD_RS  at RB2_bit;
sbit GLCD_RW  at RB3_bit;
sbit GLCD_EN  at RB4_bit;
sbit GLCD_RST at RB5_bit;

sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction  at TRISB2_bit;
sbit GLCD_RW_Direction  at TRISB3_bit;
sbit GLCD_EN_Direction  at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections



void main() {

  char *someText;


  ADCON1 = 6;                 // Changes PORTA to digital
  CMCON = 7;
  Glcd_Init();                              // Initialize GLCD
  Glcd_Fill(0x00);

//     Glcd_Set_Font(Character8x7, 8, 7, 32);// Choose font, see __Lib_GLCDFonts.c in Uses folder

    Glcd_Write_Text("TITLE1, 55, 1, 1);     // Write string
    Glcd_Write_Text("SubTit1", 1, 2, 0);     // Write string
    Glcd_Write_Text("SubTit2", 1, 3, 1);     // Write string
    Glcd_Write_Text("SubTit3", 1, 4, 1);     // Write string
    Glcd_Write_Text("SubTit4", 1, 5, 1);     // Write string

}

by the way i am using mikroC .. also the glcd itself isn't damaged because it lights up upon being powered on ..

thanks in advance, gentle men ..
 

thanks amr .. but what is meant by a driver and how can it be used ..?

in mikroC help, there is a sample code .. i copied and compiled it and the same problem present ..

any suggestion to check that my hardware glcd isn't damaged ..?

thx in advance
 
A driver is a software program that abstracts the hardware.
Does the code map to your exact hardware.
If the hardware changed, the driver shall change.
--
Amr Ali
 
  • Like
Reactions: jalil_th

    afesheir

    Points: 2
    Helpful Answer Positive Rating

    jalil_th

    Points: 2
    Helpful Answer Positive Rating
well, how to use it .. the given link is a bunch of C codes .. how can they be inserted into my project ..??

also - as a troubleshooting step - i would like to have an advice about how to test the glcd itself ..

lot of thanks eng. amr
 
What is the name of your glcd?
--
Amr Ali
 
Hi,
The mikroC code is for GLCD with KS108/107 controllers. Maybe yours is not one with KS108/107 controller but with another common T6963 controller. In this case, use the library example in mikroC under the T6963 in the help menu.
But IF your GLCD is KS108/107, then there is some problem with your hardware connections. Adjust the contrast properly.
I've used plenty of GLCD in my projects, all KS108 though. I use mikroBASIC and the internal routine.
Hope it helps.
Tahmid.
 
thanks all of u 4 ur help ..
my glcd has nothing written to indicate its name or controller type .. i tried the ks108/107 and it didn't work .. when i tried to find the T6963 code, the pinout of the glcd in the example doesn't match the pinout of my glcd ... I'm getting crazy with this problem !!!!!!!!
 
You can port the driver i hinted to your circuit, Make the necessary changes.
--
Amr
 
my glcd has 8 bit databus + 6 control bits (RST, EN, R/W, RS, CS1 and CS2)

the glcd in the example has 8 bit databus + 7 control bits (RST, FS, MD,EN, R/W, RS and CE) ..

port redirection is never a problem .. but pinout itself is different ..
 
Then you will have to change the logic as well. This is called porting.
--
Amr
 
thanks eng. amr and sorry for late reply..
what surprised me is that my screen is neither samsung ks108 nor toshiba T6963C .. it is S6B0107 .. any help in this new conditions ..?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top