lcd.h File Reference

This is the header file for using the Graphic-LCD
. More...

Go to the source code of this file.

Defines

#define LCD_12H_VISUALISATION
#define DD_SPI_LCD_CS   PB6
#define LCD_PORT   PORTB
#define LCD_COMMAND_PIN   PB5
#define LCD_RESET_PIN   PB7
#define PAGE0   0xB0
#define PAGE1   0xB1
#define PAGE2   0xB2
#define PAGE3   0xB3
#define PAGE4   0xB4
#define PAGE5   0xB5
#define PAGE6   0xB6
#define PAGE7   0xB7
#define PAGE8   0xB8
#define DISPLAY_blank_5PX   10
#define DISPLAY_C_5PX   11
#define DISPLAY_DEGREE_5PX   12
#define PIXEL_5PX   5
#define PIXEL_7PX   7
#define DISPLAY_ON   0xAF
#define DISPLAY_OFF   0xAE
#define DISPLAY_START_LINE   0x40
#define DISPLAY_PAGE_ADDRESS   0xB0
#define DISPLAY_COLUMN_UPPER_BIT   0x10
#define DISPLAY_COLUMN_LOWER_BIT   0x00
#define DISPLAY_ADC_NORMAL   0xA0
#define DISPLAY_ADC_REVERSE   0xA1
#define DISPLAY_DISPLAY_NORMAL   0xA6
#define DISPLAY_DISPLAY_REVERSE   0xA7
#define DISPLAY_ALL_POINTS_OFF   0xA4
#define DISPLAY_ALL_POINTS_ON   0xA5
#define DISPLAY_1_TO_9_BIAS   0xA2
#define DISPLAY_1_TO_7_BIAS   0xA3
#define DISPLAY_RESET   0xE2
#define DISPLAY_NORMAL_OUTPUT_DIRECTION   0xC0
#define DISPLAY_REVERSE_OUTPUT_DIRECTION   0xC8
#define DISPLAY_POWER_CONTROL   0x28
#define DISPLAY_INTERNAL_RESISTOR_RATIO   0x20
#define DISPLAY_ELECTRIC_VOLUME_MODE   0x81
#define DISPLAY_ELECTRIC_VOLUME_REGISTER   0x00
#define DISPLAY_STATIC_INDICATOR_ON   0xAD
#define DISPLAY_STATIC_INDICATOR_OFF   0xAC
#define DISPLAY_STATIC_INDICATOR_REGISTER   0x00
#define DISPLAY_BOOSTER_RATIO_2x   0xF8
#define DISPLAY_BOOSTER_RATIO_3x   0xF8
#define DISPLAY_BOOSTER_RATIO_4x   0xF8
#define DISPLAY_BOOSTER_RATIO_5x   0xF9
#define DISPLAY_BOOSTER_RATIO_6x   0xFB
#define DISPLAY_BOOSTER_STEP_UP_VALUE   0x00
#define DISPLAY_POWERSAVE   0x00
#define DISPLAY_NO_OPERATION   0xE3

Functions

void init_lcd (void)
 font_standard_5px This is the Character translation table to display Characters with a height of 5 Pixels
void lcd_data (void)
 lcd_data This function tells the LCD (DOG-LM 128x64) that the next byte is a Databyte (This function only drives the "A0" Pin of the LCD to high)

void lcd_clear (void)
 lcd_clear This function is used to clear the Display
void lcd_command (void)
 lcd_command This function tells the LCD (DOG-LM 128x64) that the next byte is a Commandbyte (This function only drives the "A0" Pin of the LCD to low)

void lcd_reset (uint8_t signal)
 lcd_reset This function is used to reset the LCD (used on startup) (Via signal the Resetpin of the LCD is driven to LOW/HIGH)

void lcd_set_start (uint8_t x, uint8_t y)
 lcd_set_start This function is used to set a "new" startpoint on the LCD (used to identify the position from which should be written)

void lcd_set_column (uint8_t x)
uint8_t lcd_send_char (uint8_t x, uint8_t y, uint8_t px, uint8_t c)
 lcd_set_column This function is used to set a "new" startcolumn (x-Axis) on the LCD (used to identify the column from which we start writing then)

uint8_t lcd_send_bitmask (uint8_t x, uint8_t y, uint8_t c)
 lcd_send_bitmask This function is used to send only one Bitmask (i.e. '0b10101111')
uint8_t lcd_send_string (uint8_t x, uint8_t y, uint8_t px, char *string)
 lcd_send_string This function is used to send a String (i.e. 'hello world')
uint8_t mirror_byte (uint8_t value)
 mirror_byte This function is used to mirror a Byte (LSB -> MSB and so on) (This is used if the Display is physically used in 12:00 mode -
otherwise the Characters will be broken)

void graphic_view (void)
 graphic_view This function is creates the default Display output in this Design


Detailed Description

This is the header file for using the Graphic-LCD
.

It handles all LCD specific functions.
It could be used with C167 AND AVR90USB


Define Documentation

#define DD_SPI_LCD_CS   PB6

#define DISPLAY_1_TO_7_BIAS   0xA3

#define DISPLAY_1_TO_9_BIAS   0xA2

Referenced by init_lcd().

#define DISPLAY_ADC_NORMAL   0xA0

Referenced by init_lcd().

#define DISPLAY_ADC_REVERSE   0xA1

Referenced by init_lcd().

#define DISPLAY_ALL_POINTS_OFF   0xA4

#define DISPLAY_ALL_POINTS_ON   0xA5

#define DISPLAY_blank_5PX   10

#define DISPLAY_BOOSTER_RATIO_2x   0xF8

#define DISPLAY_BOOSTER_RATIO_3x   0xF8

#define DISPLAY_BOOSTER_RATIO_4x   0xF8

Referenced by init_lcd().

#define DISPLAY_BOOSTER_RATIO_5x   0xF9

#define DISPLAY_BOOSTER_RATIO_6x   0xFB

#define DISPLAY_BOOSTER_STEP_UP_VALUE   0x00

Referenced by init_lcd().

#define DISPLAY_C_5PX   11

#define DISPLAY_COLUMN_LOWER_BIT   0x00

Referenced by lcd_set_start().

#define DISPLAY_COLUMN_UPPER_BIT   0x10

Referenced by lcd_set_start().

#define DISPLAY_DEGREE_5PX   12

#define DISPLAY_DISPLAY_NORMAL   0xA6

Referenced by init_lcd().

#define DISPLAY_DISPLAY_REVERSE   0xA7

#define DISPLAY_ELECTRIC_VOLUME_MODE   0x81

Referenced by init_lcd().

#define DISPLAY_ELECTRIC_VOLUME_REGISTER   0x00

Referenced by init_lcd().

#define DISPLAY_INTERNAL_RESISTOR_RATIO   0x20

Referenced by init_lcd().

#define DISPLAY_NO_OPERATION   0xE3

#define DISPLAY_NORMAL_OUTPUT_DIRECTION   0xC0

Referenced by init_lcd().

#define DISPLAY_OFF   0xAE

#define DISPLAY_ON   0xAF

Referenced by init_lcd().

#define DISPLAY_PAGE_ADDRESS   0xB0

#define DISPLAY_POWER_CONTROL   0x28

Referenced by init_lcd().

#define DISPLAY_POWERSAVE   0x00

#define DISPLAY_RESET   0xE2

#define DISPLAY_REVERSE_OUTPUT_DIRECTION   0xC8

Referenced by init_lcd().

#define DISPLAY_START_LINE   0x40

Referenced by init_lcd(), and lcd_set_start().

#define DISPLAY_STATIC_INDICATOR_OFF   0xAC

Referenced by init_lcd().

#define DISPLAY_STATIC_INDICATOR_ON   0xAD

#define DISPLAY_STATIC_INDICATOR_REGISTER   0x00

Referenced by init_lcd().

#define LCD_12H_VISUALISATION

#define LCD_COMMAND_PIN   PB5

Referenced by lcd_command(), and lcd_data().

#define LCD_PORT   PORTB

Referenced by lcd_command(), lcd_data(), and lcd_reset().

#define LCD_RESET_PIN   PB7

Referenced by lcd_reset().

#define PAGE0   0xB0

#define PAGE1   0xB1

#define PAGE2   0xB2

#define PAGE3   0xB3

#define PAGE4   0xB4

#define PAGE5   0xB5

#define PAGE6   0xB6

#define PAGE7   0xB7

#define PAGE8   0xB8

#define PIXEL_5PX   5

#define PIXEL_7PX   7


Function Documentation

void graphic_view ( void   ) 

graphic_view This function is creates the default Display output in this Design

Parameters:
void 
Returns:
void

References lcd_clear(), lcd_send_char(), and lcd_send_string().

Referenced by main().

void init_lcd ( void   ) 

void lcd_clear ( void   ) 

lcd_clear This function is used to clear the Display

Parameters:
void 
Returns:
void

References DD_SPI_LCD_CS, lcd_data(), lcd_set_start(), and SPI_MasterTransmit().

Referenced by graphic_view().

void lcd_command ( void   ) 

lcd_command This function tells the LCD (DOG-LM 128x64) that the next byte is a Commandbyte (This function only drives the "A0" Pin of the LCD to low)

Parameters:
void 
Returns:
void

References LCD_COMMAND_PIN, and LCD_PORT.

Referenced by init_lcd(), and lcd_set_start().

void lcd_data ( void   ) 

lcd_data This function tells the LCD (DOG-LM 128x64) that the next byte is a Databyte (This function only drives the "A0" Pin of the LCD to high)

Parameters:
void 
Returns:
void

References LCD_COMMAND_PIN, and LCD_PORT.

Referenced by lcd_clear(), lcd_send_bitmask(), and lcd_send_char().

void lcd_reset ( uint8_t  signal  ) 

lcd_reset This function is used to reset the LCD (used on startup) (Via signal the Resetpin of the LCD is driven to LOW/HIGH)

Parameters:
signal The Resetlevel (LOW/HIGH) drives the Resetpin
Returns:
void

References LCD_PORT, LCD_RESET_PIN, and LOW.

Referenced by init_lcd().

uint8_t lcd_send_bitmask ( uint8_t  x,
uint8_t  y,
uint8_t  c 
)

lcd_send_bitmask This function is used to send only one Bitmask (i.e. '0b10101111')

Parameters:
x The Startpixel on the X-Axis
y The Startpixel on the Y-Axis
c The Byte we want to send (wites one column and 8(8Bit) lines)
Returns:
uint8_t The width of the written Bitmask (ever 1)

References DD_SPI_LCD_CS, lcd_data(), lcd_set_start(), mirror_byte(), and SPI_MasterTransmit().

Referenced by lcd_send_string().

uint8_t lcd_send_char ( uint8_t  x,
uint8_t  y,
uint8_t  px,
uint8_t  c 
)

lcd_set_column This function is used to set a "new" startcolumn (x-Axis) on the LCD (used to identify the column from which we start writing then)

Parameters:
x The Startpixel on the X-Axis
Returns:
void lcd_send_char This function is used to send a Character (i.e. 'a')
Parameters:
x The Startpixel on the X-Axis
y The Startpixel on the Y-Axis
px The height of the Character (5px or 7px - so 5 or 7)
c The Character (translated with the Character drwaing table on the top of the file)
Returns:
uint8_t The width of the Character (X-Axis)

References DD_SPI_LCD_CS, G_FONT_DEFAULT_7PX, lcd_data(), lcd_set_start(), mirror_byte(), and SPI_MasterTransmit().

Referenced by graphic_view(), and lcd_send_string().

uint8_t lcd_send_string ( uint8_t  x,
uint8_t  y,
uint8_t  px,
char *  string 
)

lcd_send_string This function is used to send a String (i.e. 'hello world')

Parameters:
x The Startpixel on the X-Axis
y The Startpixel on the Y-Axis
px The height of the strings characters (5px or 7px - so 5 or 7)
string The String (translated with the Character drawing table on the top of the file)
Returns:
uint8_t The endposition of the String (X-Axis)

References lcd_send_bitmask(), lcd_send_char(), and lcd_set_start().

Referenced by graphic_view(), and temperature().

void lcd_set_column ( uint8_t  x  ) 

void lcd_set_start ( uint8_t  x,
uint8_t  y 
)

lcd_set_start This function is used to set a "new" startpoint on the LCD (used to identify the position from which should be written)

Parameters:
x The Startpixel on the X-Axis
y The Startpixel on the Y-Axis
Returns:
void

References DD_SPI_LCD_CS, DISPLAY_COLUMN_LOWER_BIT, DISPLAY_COLUMN_UPPER_BIT, DISPLAY_START_LINE, lcd_command(), and SPI_MasterTransmit().

Referenced by lcd_clear(), lcd_send_bitmask(), lcd_send_char(), and lcd_send_string().

uint8_t mirror_byte ( uint8_t  value  ) 

mirror_byte This function is used to mirror a Byte (LSB -> MSB and so on) (This is used if the Display is physically used in 12:00 mode -
otherwise the Characters will be broken)

Parameters:
value The Byte we want to mirror
Returns:
uint8_t The mirrored Byte

Referenced by lcd_send_bitmask(), and lcd_send_char().


Generated on Mon Jan 12 21:12:08 2009 for BlueTemp by  doxygen 1.5.8