Author | Serkan Ayyıldız Copyright (c) 2006..2009, all rights reserved. |
Adapted-by | Joep Suijs |
Compiler | >=2.2 |
Library for KS0108 compatible graphic lcd with 128x64 resolution.
No dependency found
const byte GLCD_WHITE = 0x00
const byte GLCD_X_PIXELS = 128
const byte GLCD_BLACK = 0x01
const KS0108_CMD_COLUMN = 0x40
const byte GLCD_COLOR_BITS = 1
const byte GLCD_Y_PIXELS = 64
const KS0108_CMD_OFF = 0x3E
var byte glcd_pen_color = GLCD_BLACK
const KS0108_RIGHT = 1
const KS0108_CMD_ON = 0x3F
const byte _font_5x7_table[] = {
const KS0108_CMD_TOP_RAM = 0xC0
var byte lcd_background_color = GLCD_WHITE
const KS0108_CMD_PAGE = 0xB8
const KS0108_LEFT = 0
lcd_write_char(byte in x, byte in y, byte in ch )
ks0108_write_char(byte in x, byte in y, byte in ch )
ks0108_write_byte(byte in x, byte in y, byte in veri)
glcd_init()
lcd_on()
glcd_write_pixel(byte in x, byte in y)
lcd_off()
lcd_fill(byte in data)
_ks0108_column(byte in side, byte in column)
_ks0108_data()
_ks0108_write(byte in side, byte in data)
_ks0108_page(byte in side , byte in page)
_ks0108_inst()
const byte GLCD_WHITE = 0x00
No documentation found
const byte GLCD_X_PIXELS = 128
No documentation found
const byte GLCD_BLACK = 0x01
constant colors
const KS0108_CMD_COLUMN = 0x40
No documentation found
const byte GLCD_COLOR_BITS = 1
black & white, monochrome
const byte GLCD_Y_PIXELS = 64
No documentation found
const KS0108_CMD_OFF = 0x3E
No documentation found
var byte glcd_pen_color = GLCD_BLACK
Default pen color
const KS0108_RIGHT = 1
No documentation found
const KS0108_CMD_ON = 0x3F
No documentation found
const byte _font_5x7_table[] = {
_font_5x7_table[] - character table 91 * 5 bytes = 455
const KS0108_CMD_TOP_RAM = 0xC0
No documentation found
var byte lcd_background_color = GLCD_WHITE
Default background color
const KS0108_CMD_PAGE = 0xB8
No documentation found
const KS0108_LEFT = 0
No documentation found
lcd_write_char(byte in x, byte in y, byte in ch )
Same as ks0108_write_char, but can use external or user defined font library.
ks0108_write_char(byte in x, byte in y, byte in ch )
Writes an inverted character to the display using internal font definition. note: the vertical position of chars is in 8-bit steps.
ks0108_write_byte(byte in x, byte in y, byte in veri)
ks0108_write_byte - write byte to display x = pixel column y = pixel row (will be divided by 8)
glcd_init()
lcd_init - Initialize the graphic LCD. Call before using any other LCD function.
lcd_on()
Purpose: Turn the display on
glcd_write_pixel(byte in x, byte in y)
Purpose: Turn a pixel on a graphic LCD on or off Inputs: 1) x - the x coordinate of the pixel 2) y - the y coordinate of the pixel
lcd_off()
Purpose: Turn the display off
lcd_fill(byte in data)
Purpose: Fill the LCD screen with the passed in color Inputs: ON - turn all the pixels on OFF - turn all the pixels off
_ks0108_column(byte in side, byte in column)
Purpose: Set the column address Inputs: The column address (0 - 63)
_ks0108_data()
Purpose: Specify reads and writes are data
_ks0108_write(byte in side, byte in data)
_ks0108_write - Write a byte of data to the specified chip Inputs: 1) side - which chip to write the data to 2) data - the byte of data to write
_ks0108_page(byte in side , byte in page)
Purpose: Set the page number Inputs: A page number (0 - 7)
_ks0108_inst()
Purpose: Specify reads and writes are instructions
ks0108_read_byte(byte in x, byte in y) return byte
ks0108_read_byte - read byte to display x = pixel column y = pixel row (will be divided by 8)
_ks0108_read(byte in side) return byte
Purpose: Reads a byte of data from the specified chip Ouputs: A byte of data read from the chip
16f877 | 16f877_glcd_ks0108.jal |
16f877a | 16f877a_glcd_ks0108.jal |
18f4550 | 18f4550_glcd_ks0108.jal |