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.

Problem with interfacing Graphic LCD with PIC16F877A

Status
Not open for further replies.

tariq7868

Junior Member level 1
Joined
Mar 29, 2009
Messages
19
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,424
Hello,

I am trying to interface graphic LCD 240x128 (part: T240128 v1.1) with PIC16F877A. I used MicroC compiler's example coding & also simulated on proteus. On Proteus simulation, LCD worked alright, but when i set up the hardware, LCD is showing only a bar of line (Sometimes on top, or middle or bottom (after resetting)). I have adjusted the "V0" (contrast) to -15V, & have checked all the grounds & VCCs. And have set configuration byte as = 7FA3. I tested the PIC16F877A by LED Blinking Program. I also have attached the project, code, hex (Note: coding done in MikroC Compiler).
Please, Help me, what could be the problem?
 

Attachments

  • 240x128.zip
    205.5 KB · Views: 107

Re: Graphic LCD problem!

i think you are using demo version of mikro c compiler...download it from torrent... google for the 2009 version of Mikro c compiler..

by the way you use these config for the glcd

Code:
#include        "__T6963C.h"
                            
// T6963C module connections
char T6963C_dataPort at PORTD;                   // DATA port

sbit T6963C_ctrlwr  at RC2_bit;                  // WR write signal
sbit T6963C_ctrlrd  at RC1_bit;                  // RD read signal
sbit T6963C_ctrlcd  at RC0_bit;                  // CD command/data signal
sbit T6963C_ctrlrst at RC4_bit;                  // RST reset signal
sbit T6963C_ctrlwr_Direction  at TRISC2_bit;     // WR write signal
sbit T6963C_ctrlrd_Direction  at TRISC1_bit;     // RD read signal
sbit T6963C_ctrlcd_Direction  at TRISC0_bit;     // CD command/data signal
sbit T6963C_ctrlrst_Direction at TRISC4_bit;     // RST reset signal

// Signals not used by library, they are set in main function
sbit T6963C_ctrlce at RC3_bit;                   // CE signal
sbit T6963C_ctrlfs at RC6_bit;                   // FS signal
sbit T6963C_ctrlmd at RC5_bit;                   // MD signal
sbit T6963C_ctrlce_Direction  at TRISC3_bit;     // CE signal direction
sbit T6963C_ctrlfs_Direction  at TRISC6_bit;     // FS signal direction
sbit T6963C_ctrlmd_Direction  at TRISC5_bit;     // MD signal direction

// End T6963C module connections
may it will work...but be sure about your compiler because it has demo limit cannot build code more than 250 words i think....so be sure of it...
 

Re: Graphic LCD problem!

i ran the simulation directly from the hex file provided by the examples, & the simulation was working alright. & i burned the same hex file into 16f877a.... I am getting just a line most of the time in middle (as i mentioned above).

---------- Post added at 08:36 ---------- Previous post was at 08:30 ----------

My LCD has 18pins (slightly different from the lcd used in proteus), & doesn't have "MD" pin. So i grounded the "CE", "FS", MD" pins while simulating in proteus as well as in actual hardware(except MD pin as it wasnt available)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top