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.

help me in interfacing a lcd with a 8051 microcontroller

Status
Not open for further replies.

embebed

Newbie level 1
Joined
Mar 26, 2011
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,297
hey,
someone plz help me in understanding the initialization code for interfacing a lcd
i am using keil software and i am doing programming in c language although i have read many initialization programs written in c but i am not able to understand what is the purpose of each command we send during initialization and why we send them please help me to understand these commands please
 

Hi I'm having problem in Proteus while interfacein LCD with AT89C51.
Hereby I'm attaching the circuit diagram and my program.
Please help me to get through this . .
Thank you in advance
 

Attachments

  • lcd.rar
    26 KB · Views: 127

Please Please any one help me here.
Its really urgent.>>>....
Please
 

Which is the LCD you are using? Can you please specify the model?
 

I'm using LM032L LCD.
I've attached the attachments of my design with this.
Please take a look at that also . . .
 

Attachments

  • lcd.zip
    28.8 KB · Views: 110

My problem is that when I Simulate my design by using the program I've written, It does not show anything in the LCD.
Not even the cursor blinks,
I want to know whether it is fault with my design or my programming or both.
Please help me in this.
 

I went through your code. I will explain what those commands mean (to the best of my knowledge; I am also a beginner)

MOV A,#38H
This command will set the lcd to 8 bit interface mode. You might know that lcd can be interfaced in 4 bit and 8 bit mode.Also 2 lines will be used for displaying data.

MOV A,#0EH
This will turn on the display. The cursor is also turned on with cursor blink off.

MOV A,#01H
This will clear the display.

MOV A,#06H
This will increment the cursor position.

MOV A,#80H
This will set the DDRAM address to 0000000.(starting address)

MOV A,#'B'
ACALL DAT
NOP
ACALL DELAY
MOV A,#'I'
ACALL DAT
NOP
ACALL DELAY
MOV A,#'N'
ACALL DAT
NOP
ACALL DELAY
MOV A,#'I'
ACALL DAT
NOP
ACALL DELAY

I think this will display 'BINI' on the screen.


To know the commands for the lcd, just google for it. You will find it.
 

As per LCD datasheet...
STEP1: Write Function set [0x38] into Command Register.. [8 bit interfacing, Multiple Line, 5x7 font size]
STEP2: Give 4ms delay
STEP3: Same Step 1
STEP4: Give 1ms delay
STEP5: Same Step 1
STEP6: Write the cursor/display shift [0x1C] into Command Register with delay... [Shift Entire display into right]
STEP7: Write Display ON/OFF control [0x0C] into Command Register with Delay... [No cursor and No blink]
STEP8: Write Entry mode set [0x06] into Command Register with Delay... [Increment without shift]
STEP9: Write Home cursor [0x02] into command register with Delay...[Home cursor]
STEP10: Write Clear display [0x01] into command register with delay... [Clear Display]

The above said all the things meaning for LCD [2x16] initialization... All the details is clearly given in datasheet...
 
  • Like
Reactions: tinto

    tinto

    Points: 2
    Helpful Answer Positive Rating
I didn't get the simulation working yet.
I tried the above code also.
But it didn't helped me.
Please, if their are any tutorials regarding LCD simulation in proteus, let me know.
I want urgent help.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top