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.

Code for implementing 16*2 LCD with HC11 uC in 4-bit mode

Status
Not open for further replies.

ZeleC

Full Member level 5
Joined
Dec 18, 2002
Messages
261
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Activity points
2,173
16*2 LCD

hello guys.
Can anyone direct me to a link or upload some source code in assembly regarding the interface of an 16*2 lcd with a hc11 uC( or any other uC) in 4-bit long mode.
thx
 

Re: 16*2 LCD

This sample provided with Proteus might give you a few pointers ( written in C though).
 

I managed to make the LCD work in 4-bit mode the problem was with the busy flag .IN 8-bit mode i used to check for DB7 , that didnt worked in 4-bit, so i replaced this routine with a delay of 40us, and now everything works.
But did anyone had this problem before(not able to read the BF)?
 

Re: 16*2 LCD

I use all my LCD's in 4 Bit mode to save pins and never had a problem to check the busy flag which is the MSB of the first Nibble that you read in.

hope this helps
 

    V

    Points: 2
    Helpful Answer Positive Rating
Re: 16*2 LCD

To read the Busy flag in 4-bit mode you must perform two read operations.

First read operation reads in the high nibble, second read operation reads in the low nibble. Amalgamate the two nibbles to form a byte indicating the busy status and ddaddress and then test the busy flag.

A single read operation (as in 8-bit mode) will throw you out of sync.
 

Re: 16*2 LCD

klugkopf said:
I have a nice PDF, for LCDs. Unfortunately, I don't remember the link, so I'll upload it.

Search by Google ....
h**p://www.optrex.com/pdfs/Dmcman_full.pdf
 

I think Iain has a point
ill try it,i was only taking a one time reading
thank you guys
 

Thank you guys for the help
its worked and here is the code for the lcd busy flag
(im using expanded mode )
there is no need to form a byte out of the two nibbles
WI PSHA
WI1 LDAA LCDCTRL ;DISPLAY NOT BUSY\
LDAB LCDCTRL
TSTA
BMI WI1
PULA
RTS
 

what is the difference between 8-bit and 4-bit LCD
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top