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 in LCD display in PIC 16f876 with 16x2 lcd display

Status
Not open for further replies.

arup

Member level 2
Member level 2
Joined
Sep 6, 2004
Messages
46
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
441
pic16f876 lcd

Dear Sir,

I am using 16x2 lcd module (HY-1602F6 printed on LCD MODULE PCB) with PIC16F876A.I am using PORTB.My connection is as follows:
EN -> RB3
RS -> RB2
R/W - > gnd(i want only write operation)

DB7......DB4(LCD data pin 11 to 14) -> PB7...PB4
Other LCD pins are as usual.
Crystal : 20MHz

After executing lcd routine :

My lcd display is not what i wanted to.I have seen only block of black characters.

Same lcd code(with little change i.e sending data with lower port bits) i have tested for other board where control lines were(RS,EN) from PORTA and DATA LINES were RD3...RD0. and crystal 4MHz And it's working perfectly OK.

I have attached the lcd code for review.Pls can anybody give me solution to this issue??
init_LCD() -> lcd initialization routine
putch() -> writting one char on lcd.this calls another routine called
lcd_write()
attached files are in .txt format - init.txt and lcd.txt

rgds,

Arup
 

pic16f876 + lcd

Code:
void LCD_CONTROL(void){
        LCD_EN = 1;
        asm("nop");
        asm("nop");
        asm("nop");
        asm("nop");
        LCD_EN = 0;
}

for 4Mhz signal EN = 4uS
for 20Mhz signal EN = 0.8uS
 

16f876

hello,

in the following code....
for 4MHz .....i have omitted L1....L4
only for 20MHz those 4 lines are included.

void LCD_CONTROL(void){
LCD_EN = 1;
asm("nop"); ...............L1
asm("nop"); ...............L2
asm("nop"); ...............L3
asm("nop"); ...............L4
LCD_EN = 0;
}

arup
 

pic lcd not displaying

the issue is settled now.It was because of low voltage ICSP programming mode.It was not allowing RB3 to be gen purpose I/O and i was using RB3 as EN signal of lcd.Now i got rid of this my high voltage pgmm.. mode.



thanks

Arup
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top