BeRTOS
Typedefs | Functions
lcd_hd44.h File Reference

Hitachi HD44780 and clones LCD module. More...

#include "cfg/cfg_lcd_hd44.h"
#include <cfg/compiler.h>

Go to the source code of this file.

Defines

Values for CONFIG_LCD_ROWS.

Select the number of rows which are available on the HD44780 Display.

#define LCD_HD44_ROWS_2   2
#define LCD_HD44_ROWS_4   4
Values for CONFIG_LCD_COLS.

Select the number of columns which are available on the HD44780 Display.

#define LCD_HD44_COLS_16   16
#define LCD_HD44_COLS_20   20
Hitachi HD44 commands.
#define LCD_CMD_DISPLAY_INI   0x30
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_SETFUNC   0x38
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_SET8BIT   0x30
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_DISPLAY_ON   0x0F
 Switch on display.
#define LCD_CMD_DISPLAY_OFF   0x08
 Switch off display.
#define LCD_CMD_CLEAR   0x01
 Clear display.
#define LCD_CMD_CURSOR_BLOCK   0x0D
 Show cursor (block)
#define LCD_CMD_CURSOR_LINE   0x0F
 Show cursor (line)
#define LCD_CMD_CURSOR_OFF   0x0C
 Hide cursor.
#define LCD_CMD_DISPLAYMODE   0x06
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_SET_CGRAMADDR   0x40
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_RESET_DDRAM   0x80
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_SET_DDRAMADDR   0x80
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_DISPLAY_SHIFT   0x18
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_MOVESHIFT_LEFT   0x00
 8 bits, 2 lines, 5x7 dots
#define LCD_CMD_MOVESHIFT_RIGHT   0x04
 8 bits, 2 lines, 5x7 dots

Typedefs

typedef uint8_t lcdpos_t
 Type for combined LCD cursor position (x,y).

Functions

void lcd_waitBusy (void)
 Wait until the LCD busy flag clears.
void lcd_moveTo (uint8_t addr)
 Move the cursor to addr, only if not already there.
void lcd_setReg (uint8_t val)
 Write a value in LCD data register, waiting for the busy flag.
void lcd_putc (uint8_t a, uint8_t c)
 Write the character c on display address addr.
void lcd_remapChar (const char *glyph, char code)
 Remap the glyph of a character.

Detailed Description

Hitachi HD44780 and clones LCD module.

Author:
Bernie Innocenti <bernie@codewiz.org>
Stefano Fedrigo <aleph@develer.com>

Definition in file lcd_hd44.h.


Typedef Documentation

typedef uint8_t lcdpos_t

Type for combined LCD cursor position (x,y).

Definition at line 99 of file lcd_hd44.h.


Function Documentation

void lcd_putc ( uint8_t  addr,
uint8_t  c 
)

Write the character c on display address addr.

NOTE: argh, the HD44 lcd type is a bad beast: our move/write -> write optimization requires this mess because display lines are interleaved!

Definition at line 338 of file lcd_hd44.c.

void lcd_remapChar ( const char *  glyph,
char  code 
)

Remap the glyph of a character.

glyph - bitmap of 8x8 bits. code - must be 0-7 for the Hitachi LCD-II controller.

Definition at line 363 of file lcd_hd44.c.