LCD functions


Functions

int LCD_Getpos (void)
char LCD_Setpos (char row, char column)
char LCD_Home (char clear)
char LCD_Putchar (char chardata)
char LCD_Putstr (char *strdata)
char LCD_Backlight (char back_en)
void LCD_SWLine_Mode (int lines)

Detailed Description

This module provides functions to control an LCD connected to HRD6. Currently 2X20 and 4X20 character displays are supported. By default IpacInit initializes displays to work in 2X20 mode, if you are using a 4X20 you will have to call LCD_SWLine_Mode to access the lower 2 lines. These functions run in the foreground and can cause ms wait times, the longest one being the LCD_Home function, which takes at least 15ms to complete. Also see LCD_printf in Ipac.h for formatted output.
See also:
LCD_printf

Function Documentation

char LCD_Backlight char  back_en  ) 
 

Turns the backlight on and off

Parameters:
back_en ON for on and OFF for off
Returns:
0

int LCD_Getpos void   ) 
 

get the current cursor postion. This function returns the current cursor position, the row is the 8MSB, the column is the 8LSB.

Returns:
the cursor position

char LCD_Home char  clear  ) 
 

return the cursor to home and clear the screen if clear is set This function returns the cursor to it's home position, if clear is non zero the screen will be cleared. This function takes at least 15ms to complete due to a hardware delay.

Parameters:
clear If non zero clears the screen.
Returns:
0

char LCD_Putchar char  chardata  ) 
 

Write a character to the current cursor location

Parameters:
chardata the character to write
Returns:
0

char LCD_Putstr char *  strdata  ) 
 

Write a string to the current cursor location

Parameters:
strdata the string to write
Returns:
0

char LCD_Setpos char  row,
char  column
 

set the cursor position. Sets the current cursor position.

Parameters:
row the row the new cursor positon will be.
column the column the new cursor position will be.
Returns:
0

void LCD_SWLine_Mode int  lines  ) 
 

Change the line mode This changes the number of lines the LCD functions assume the LCD has. By default this is 2.

Parameters:
lines the number of lines to use(2 or 4)
Returns:
0


Generated on Fri Mar 3 17:25:46 2006 for EMAC-HCS12-SDK by  doxygen 1.4.6