CONFIG LCD

From MCS Wiki AVR
Revision as of 23:20, 7 February 2013 by Admin (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Action

Configure the LCD display and override the compiler setting.

 

 

Syntax

CONFIG LCD = LCDtype , CHIPSET=KS077 | Dogm163v5 | DOG163V3 | DOG162V5 | DOG162V3 [,CONTRAST=value]

 

 

Remarks

LCDtype

The type of LCD display used. This can be :

 

40x4,16x1, 16x2, 16x4, 16x4, 20x2, 20x4, 16x1a or 20x4A.

Default 16x2 is assumed.

Chipset

KS077

Most text based LCD displays use the same chip from Hitachi. But some use the KS077 which is highly compatible but needs an additional function register to be set. This parameter will cause that this register is set when you initialize the display.

CHIPSET

DOGM

The DOGM chip set uses a special function register that need to be set.

The 16 x 2 LCD displays need DOG162V3 for 3V operation or DOG162V5 for 5V operation.

The 16 x 3 LCD displays need DOG163V3 for 3V operation or Dogm163v5 for 5V operation

CONTRAST

The optional contrast parameter is only supported by the EADOG displays. By default a value from the manufacture is used. But you might want to override this value with a custom setting.

The default values are :

- DOGM162V5 : &H74

- DOGM162V3 : &H78

- DOGM163V5 : &H7C

- DOGM163V3 : &H70

 

When you have a 16x2 display, you don't have to use this statement.

The 16x1a is special. It is used for 2x8 displays that have the address of line 2, starting at location &H8.

The 20xA is also special. It uses the addresses &H00, &H20, &H40 and &H60 for the 4 lines. It will also set a special function register.

 

The CONFIG LCD can only be used once. You can not dynamic(at run time) change the pins.

When you want to initialize the LCD during run time, you can use the INITLCD statement.

 

 

See Also

CONFIG LCDPIN , CONFIG LCDBUS , INITLCD

 

 

Example1

Example2

Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language