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.

lcd_cmd(0x38); //8-bit interface,2 lines ?

Status
Not open for further replies.

bianchi77

Advanced Member level 4
Joined
Jun 11, 2009
Messages
1,313
Helped
21
Reputation
44
Reaction score
20
Trophy points
1,318
Location
California
Activity points
9,442
Guys what's the init command for 8bit 20x4 lcd ?
I used
lcd_cmd(0x38); //8-bit interface,2 lines for two lines,

Thank you
 

If you want to display only two lines in the LCD in question then the same command still holds.
 

I want to display 4 lines...., what's the init command ?
thanks
 

hello,

I allready used a 4x16car LCD with a front I2C interface, in 4 bits mode.
For this 4 lines of 16 cars LCD
Init was done for 2 lines modes
but take care about the beginning of each line adress

Code:
// ref : ODT OCM-20416D-A2023 LCD Module  8/4/1999
// LCD Command
#define LCD_CLEAR 0x01
#define LCD_HOME  0x02
#define Display_ON 0x0C
#define Display_OFF 0x08
#define LCD_LINE1 0x80      // 0x00 + bit D7=1 
#define LCD_LINE2 0xC0      // 0x40 + bit D7=1 
#define LCD_LINE3 0x94      // 0x14 + bit D7=1 
#define LCD_LINE4 0xD4      // 0x54 + bit D7=1
 
The commands that you listed are for third and fourth lines respectively.
What is the command/instruction to make the LCD operate on 3 and 4 lines respectively just as (0X38) is used for 2 lines mode?
 

hello,


There is no specifique bit setting commande in the init sequence to specifie 4 lines
in the datasheet you can specifie only 1 or 2 lines ,with parameter N
that is !
after you use the above adress ..to acces line 3 or 4...

see detalls in specsheet ..
 

Attachments

  • LCD_OCM_20416D.pdf
    780.7 KB · Views: 145

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top