How to Draw Images and Text on the LCD

How to Draw Images and Text on the LCD - memory. Slow...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
How to Draw Images and Text on the LCD. .. The New Haven NHD-C160100DiZ-FSW-FBW LCM (Liquid Crystal Display Graphic Module) is a 160 column x 100 row, 16-level dot, reflective, Liquid Crystal Display with a side white LED backlight. Display data and commands are written to the device using the an i2c protocol and at speeds up to 400k bits per second. The Display Data RAM stores pixel data for the LCD and is byte addressable (D7-D0). Although the display is a 100-row (13 pages by 8 bits) by 160- column array, each byte written to the RAM sets/clears 8 vertical dots as selected by the page and column addresses. Thus, the 100 rows are divided into 12 pages of 8 lines with the 13th page only 4 lines (12 x 8 + 4 = 100 rows).
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
lcd Library The C files lcd.h and lcd.c provide the following functions that are used to initialize and write data to the LCD: Function Description Note int16 lcd_init(void); Initialize the LCD for i2c operation. MUST BE CALLED BEFORE USING THE LCD! void lcd_clear(0); Clears the LCD RAM
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: memory. Slow function - use sparingly! uint8 lcd_display(int16 mode); Sets/clears display modes 0bxxxx xxxx \\\\ \\\\___ LCD_PROPORTIONAL proportional font \\\\ \\\___ LCD_REVERSE_FONT reverse font \\\\ \\___ LCD_2X_FONT 2x font \\\\ \___ LCD_GRAPHIC_FONT write to FRAM \\\\____ LCD_REVERSE_DISPLAY reverse display \\\____ \\____ \____ void lcd_backlight(uint8 backlight); Turns the LCD backlight on/off 0 = off, 1 = on void lcd_cursor(int column, int page); Set the current LCD column/page. column=0-159, page=0-12 char lcd_putchar(char c); Writes a character (c) to the display Use lcd_cursor to position on LCD void lcd_printf(char* fmt, . ..); Writes a string to the display Use 5 x 8 font and writes to current column/page according to conventional C printf parameters. void lcd_volume(uint8 volume); Adjusts the LCD brightness Range of volume is 0-64 void lcd_image( const unsigned char* image, int column, int page); Write an image to LCD column = 0-159, page = 0-12...
View Full Document

This document was uploaded on 02/08/2012.

Page1 / 3

How to Draw Images and Text on the LCD - memory. Slow...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online