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.

Routine for LCD DDRAM addressing

Status
Not open for further replies.

2010ee179

Member level 2
Joined
Jun 22, 2011
Messages
43
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,288
Location
Pakistan
Activity points
1,555
Hey guys, I've got LM1000TGR 16x1 LCD...
It's ddram address are:
0x80 to 0x87 for left 8 characters
0xC0 to 0xC7 for right 8 characters

I just don't know how to tell microcontroller that you've reached to 0x87 now you need to jump to 0xC0 for next character to be printed.
I'm using pic16f877a and high tech c compiler....

Can someone provide me a routine which could tell me at which address of LCD I am standing.
 

Re: lcd ddram addressing

I would rewrite the write_to_lcd routine and the set_position routine to keep track of the position there (by means of a global variable) as I were writing characters, then I would make the jumps when needed
 

Re: lcd ddram addressing

Well the problem is, I don't know how to keep track of position of cursor..:|
 

Re: lcd ddram addressing

If you post the libraries that you are using I can give a suggestion... In between, that LCD is Hitachi compatible, meaning that at the initialization you need to define a positive or negative increment witch will increment/decrement DRAM position automatically when a write operation is performed..
Before you write the first character you need to define the DRAM position for that char, for example 0x80, that would be the 1st char from 1st line.. after you write this character the DRAM position is auto incremented/decremented (as defined on initialization) so that the next character write will be done to position 0x81..

So you just have to spy on the position setting subroutine (somewhere on your library) and set one global variable with that position.. then in the subroutine that writes the character for the lcd, you need to incremented/decremented (as defined on initialization) the global variable that keeps track of the position... finally, before the character writing operation, you need to check if the position that will be written is valid (if is bigger than 0x87), and if need, perform the jump by setting the DRAM position to 0xC0...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top