LCD HD44780 0x86

Thread Starter

stmp44

Joined Jul 17, 2009
8
I have a program for 8051 were many instructions are being passed to lcd at (0x86); and it is being sent when rs = 0 , means it should be taken as command not data

sorry for my ignorance, but what does (0x86) mean ? what is the program trying to do with that
 

AlexR

Joined Jan 16, 2008
732
Your question is not clear and its hard to figure out what exactly you want to know.
Are you asking what resides at location 0x86 in the 8051,
or how will the LCD interpret 0x86 passed to it as data,
or are you asking what 0x86 means without reference to either LCD or 8051 commands.

A sample of the code might help us understand what your question is about.
 
I would suggest do download the HD44780 datasheet (no the LCD datasheet) and check what 0x86 means if sent as command. Just take the command spec and see what happen if you send the bits 1000 0110 (which is 0x86).

Ciao,

Mauro
 

Thread Starter

stmp44

Joined Jul 17, 2009
8
Your question is not clear and its hard to figure out what exactly you want to know.
Are you asking what resides at location 0x86 in the 8051,
or how will the LCD interpret 0x86 passed to it as data,
or are you asking what 0x86 means without reference to either LCD or 8051 commands.
I want to ask that how LCD will interpret it, I am not sure if it is getting passed as data or as command, You can see the code at http://www.microdigitaled.com/8051/Code/Example%2012-2.txt

lcdcmd is being called like

Rich (BB code):
lcdcmd(0x06);
lcdcmd(0x86);
I just want to know what are these statements doing
 
Last edited:

Thread Starter

stmp44

Joined Jul 17, 2009
8
Thanks
So In other words with lcdcmd(0x86); we are just telling the lcd that at what position it needs to print the character ?
 

AlexR

Joined Jan 16, 2008
732
The MSDelay() function is a mSec delay routine. It consists of two loops, the outside loop takes the value passed to the function to tell it how many times to perform the inside loop.

The inside loop loops around 1275 times which the author of the program has determined takes his processor 1 mSec. If your clock speed is different to the author's you may have to tweak this value.

So if you wanted a 2mSec delay you would pass the value 2 to MSDelay() when you called it I.E. you would call
MSDelay(2);
 
The delay is needed to meet the timing specs for the character display. LCD character displays are orders of magnitude slower than microcontrollers and microprocessors.
 
Top