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.

[PIC] lcd problem(mb162abc)

Status
Not open for further replies.

polinde

Newbie level 1
Newbie level 1
Joined
Sep 18, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
12
Hi
iam using pic16f877a with lcd (lmb162abc) and write small programme to test the lcd but not work i test this programme and this connection on proteus simulator and work fine but not work in real circuit
i use 10Mhz crystal and use 4bit connection

this is my code

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
 
 void main()
 {
   TRISD = 0;
    PORTD = 0xFF;
    TRISD = 0xff;
 
         LCD_Init();       
 
        LCD_Cmd(_LCD_CLEAR);       // Clear display
        LCD_Cmd(_LCD_CURSOR_OFF);  // Turn cursor off
        while(1)
        {
 Lcd_out(1,1,"hello") ;
 
        }
}


please help me
 
Last edited by a moderator:

I think you need to provide more detail. Are these calls 'LCD_Init', 'LCD_Cmd', and 'Lcd_out' functions you created, or do they come with some library? It looks like you are setting all the port D pins as inputs, so that won't work (unless those other functions are changing this). Is there a schematic?
 

As PORTD is used for LCD remove the below mentioned two lines from the code.


Code C - [expand]
1
2
PORTD = 0xFF;
    TRISD = 0xff;

 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top