#include "sysconfig.h"
#include "lcd.h"
#include "spi.h"
#include <avr/pgmspace.h>
Defines | |
| #define | G_FONT_DEFAULT_7PX font_standard_7px |
| #define | CHAR_UNDEFINED {0xFF, 0x81, 0x81, 0x81, 0xFF, 0xaa, 0xaa} |
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_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_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_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) | |
| 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 | lcd_clear (void) |
| lcd_clear This function is used to clear the Display | |
| void | graphic_view (void) |
| graphic_view This function is creates the default Display output in this Design | |
Variables | |
| const uint8_t font_standard_7px[96][7] | PROGMEM |
| font_standard_7px This is the Character translation table to display Characters with a height of 7 Pixels | |
It contains all functions which are neccessary to create
an output on the Graphic LCD with the Controller C167/AVR90USB.
It is NOT controller specfic.
| #define CHAR_UNDEFINED {0xFF, 0x81, 0x81, 0x81, 0xFF, 0xaa, 0xaa} |
| #define G_FONT_DEFAULT_7PX font_standard_7px |
Referenced by lcd_send_char().
| void graphic_view | ( | void | ) |
graphic_view This function is creates the default Display output in this Design
| void |
References lcd_clear(), lcd_send_char(), and lcd_send_string().
Referenced by main().
| void init_lcd | ( | void | ) |
font_standard_5px This is the Character translation table to display Characters with a height of 5 Pixels
| void |
| void |
References DD_SPI_LCD_CS, DISPLAY_1_TO_9_BIAS, DISPLAY_ADC_NORMAL, DISPLAY_ADC_REVERSE, DISPLAY_BOOSTER_RATIO_4x, DISPLAY_BOOSTER_STEP_UP_VALUE, DISPLAY_DISPLAY_NORMAL, DISPLAY_ELECTRIC_VOLUME_MODE, DISPLAY_ELECTRIC_VOLUME_REGISTER, DISPLAY_INTERNAL_RESISTOR_RATIO, DISPLAY_NORMAL_OUTPUT_DIRECTION, DISPLAY_ON, DISPLAY_POWER_CONTROL, DISPLAY_REVERSE_OUTPUT_DIRECTION, DISPLAY_START_LINE, DISPLAY_STATIC_INDICATOR_OFF, DISPLAY_STATIC_INDICATOR_REGISTER, HIGH, lcd_command(), lcd_reset(), LOW, my_delay(), and SPI_MasterTransmit().
Referenced by main().
| void lcd_clear | ( | void | ) |
lcd_clear This function is used to clear the Display
| 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)
| 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)
| 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)
| signal | The Resetlevel (LOW/HIGH) drives the Resetpin |
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')
| 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) |
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)
| x | The Startpixel on the X-Axis |
| 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) |
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')
| 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) |
References lcd_send_bitmask(), lcd_send_char(), and lcd_set_start().
Referenced by graphic_view(), and temperature().
| 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)
| x | The Startpixel on the X-Axis | |
| y | The Startpixel on the Y-Axis |
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)
| value | The Byte we want to mirror |
Referenced by lcd_send_bitmask(), and lcd_send_char().
| const uint8_t font_standard_7px [96][7] PROGMEM |
font_standard_7px This is the Character translation table to display Characters with a height of 7 Pixels
| void |
1.5.8