Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Trouble in function setting of LCD module..

Status
Not open for further replies.

chesskin

New Member
i have a problem .. while function setting of the LCD module.. there is a bit to be set either High or Low to control 2-line display or 1-line display respectively... however.. i found a piece of datasheet that is suitable to both 4x20 character and 2x20 character ...

if in 4x20 character... first~fourth lines, how can 2 or 1 line display control them..?
 
You need to consult the datasheet for your specific module, four line modules work in a number of different ways - probably the most common method is as two seperate two line displays, with an extra line switching between the two displays.
 
The 4*20 displays that I have used are arranged as if they were 2*40 displays that had been chopped in half and the right half glued below. When you write to the display, location 00 is the first character on line 1, location 0x40 (64 decimal) is line 2, 0x14 (20) is line 3 and 0x54 (84) is line 4.

So, if you just write to location 0 it will fill line 1 and then line 3. It will then ignore the next 24 characters (64-40) and then fill line 2 and then line 4.

Nigel, where have you seen a display that has an extra line to switch between them.

Mike.
 
The LCD I have and used with Nigel’s tutorials is 4 x 40 and has 2 controller chips and 2 enable wires, 1 for the top 2 lines and 1 for the bottom 2.
 
Yes, the 4*40 displays have to have 2 chips. The OP's question was about 4*20 displays which are normally done as a split display as I posted earlier.

Mike.
 
THANKS ALL

It means.. Set the bit High (2-line display) for really 2-line or 4-line display in a 4x20 LCD??
 
chesskin said:
THANKS ALL

It means.. Set the bit High (2-line display) for really 2-line or 4-line display in a 4x20 LCD??

You don't have to set any bit to display characters on line 3 and 4.

As Pommie has told you, just keep on writing characters to line1 and the extra characters will automatically appears on line 3. Same applies to line2, with the extra characters appear on line 4.

But if your line1 or line 2 has less than 20 characters, then you have to move the cursor to character position 21st before sending the next character.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top