Main Page Data Structures File List Data Fields Globals Related Pages

# gfxdriver.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Defines
#define | LCD_IOBASE0 0x600
| Base address of the first LCD controller.
#define | LCD_IOBASE1 0x500
| Base address of the second LCD controller.
#define | LCD_CLOCK 2000
| The brightness PWM signal is derived from the LCD_CLOCK.
#define | LCD_MINPWMON 50
#define | LCD_MINPWMOFF 10
#define | LCD_WIDTH 122
| Width of the LCD display.
#define | LCD_HEIGHT 32
| Height of the LCD display.
#define | LCD_PAGES ((LCD_HEIGHT+7)/8)
| Number of LCD pages.
## Functions
void | LCD_Init ()
| LCD_Init() must be called, before using any of the other LCD functions.
void | LCD_Done ()
| Shut down the LCD controller.
void | LCD_Clear (unsigned char pattern=0x00)
void | LCD_Update (Bitmap *bm)
void | LCD_SetBrightness (int level)
| Set display brightness.

## Define Documentation

#define LCD_CLOCK 2000

| The brightness PWM signal is derived from the LCD_CLOCK. Some displays have constraints on the duty cycle of the clock signal, so the minimum and maximum duty cycles can be set by LCD_MINPWMON and LCD_MINPWMOFF (in timer ticks) Note: If you have problems with your LCD, you should try higher PWM values first! I had a real debugging nightmare when i got random pixels on my display, only to find out that the timing was too tight.. 50 and 10 should do for any SED1520 driven display, while still allowing brightness control between 4 and 99.2% (i even tried heating it with a hairdryer, because the display controller seems to get slower when it's warm :) Definition at line 33 of file gfxdriver.h.

#define LCD_HEIGHT 32

| Height of the LCD display. This should always be a multiple of 8 pixels, because SED1520 Displays are organized in pages of 8 vertical pixels per byte. Definition at line 57 of file gfxdriver.h.

#define LCD_IOBASE0 0x600

| Base address of the first LCD controller. Definition at line 8 of file gfxdriver.h. Referenced by LCD_Clear(), LCD_Done(), LCD_Init(), and LCD_Update().

#define LCD_IOBASE1 0x500

| Base address of the second LCD controller. Definition at line 13 of file gfxdriver.h. Referenced by LCD_Clear(), LCD_Done(), LCD_Init(), and LCD_Update().

#define LCD_MINPWMOFF 10

| Definition at line 35 of file gfxdriver.h.

#define LCD_MINPWMON 50

| Definition at line 34 of file gfxdriver.h.

#define LCD_PAGES ((LCD_HEIGHT+7)/8)

| Number of LCD pages. Usually (LCD_HEIGHT+7)/8 Definition at line 63 of file gfxdriver.h. Referenced by LCD_Clear(), and LCD_Update().

#define LCD_WIDTH 122

| Width of the LCD display. Definition at line 49 of file gfxdriver.h. Referenced by LCD_Clear(), and LCD_Update().

## Function Documentation

void LCD_Clear | ( | unsigned char | pattern = 0x00 | ) |

void LCD_Done | ( |  | ) |

| Shut down the LCD controller. Definition at line 220 of file sed1520.cpp. References hal_stop_timer(), pfe_enable_pio(), PIO_IPD, and PIO_IPU.

void LCD_Init | ( |  | ) |

| LCD_Init() must be called, before using any of the other LCD functions. The display gets initialized, and cleared. Definition at line 191 of file sed1520.cpp. References LCD_Clear(), LCD_SetBrightness(), LCD_Update(), pfe_enable_bus(), pfe_enable_pcs(), and pfe_enable_timer().

void LCD_SetBrightness | ( | int | level | ) |

  | Set display brightness. This function MUST be called during initialization, because it sets up the vertical refresh timer for the LCD. (the brightness PWM signal is derived from that clock) Parameters:
  level | brigthness level 0..255
Definition at line 168 of file sed1520.cpp. References hal_init_timer(), hal_start_timer(), LCD_CLOCK, LCD_MINPWMOFF, and LCD_MINPWMON. Referenced by LCD_Init().

void LCD_Update | ( | Bitmap * | bm | ) |