glcd_nokia_5110

library for GLCD with pcd8544 controller used in Nokia 3310/5110

Author Andre Miller Copyright © 2008..2021, all rights reserved.
Adapted-by Richard Zengerink, Sebastien Lelong, Paul D'haene, Rob Jansen
Compiler 2.5r5

Description

library for Nokia 3310/5510 display with pcd8544 controller.


Sources

Data sheet PCD8544.


Dependencies


Summary

Global variables/contants

Procedures

Private

Functions


API details

Global variables/contants

Procedures

  • nokia_contrast(byte in contrast)

    Set display contrast
    contrast -> value from 0x00 to 0x7F
    

  • nokia_goto(byte in x, byte in y)

    Set the current position for data (x = 0->83, y = 0->5)
    

  • nokia_clear_screen()

    Clear the LCD data memory
    

  • glcd_write_pixel(byte in x, byte in y)

    Plot a pixel at given absolute (x, y) location.
    x, y -> Absolute pixel coordinates
    glcd_pen_color should be set before calling, to plot 
    appropriate pixel colors.
    

  • graphic_to_nokia(byte in graph[])

    prints any bitmap graphics (for instance created with fastLCD
    http://www.amontec.com/lcd_nokia_3310.shtml) to lcd
    just create: const byte graphic[] = { graphic max 504 bytes} and call
    graphic_to_nokia( graphic)
    

  • nokia_init()

    Send LCD initialization commands
    

  • glcd_cache_update()

    Copy the changed area of the cache to the lcd.
    Call this procedure after writing to cache.
    When the glcd_cache_changed flag has not been set, lcd_cache_update simply
    returns. Only the cache between the low & high watermark pointers is
    updated
    

  • glcd_clear_cache()

    Clear the cache; glcd_cache_update must be called next.
    

  • glcd_write_char(byte in x, byte in y, byte in char)

    write a char at position (x,y), using font previously selected with
    glcd_font_use(FONT_ID). Honor glcd_background_color variable, and indirectly
    glcd_pen_color, such as:
    * glcd_background_color can be GLCD_BLACK. If so, pen color will be white (inverted)
    * if glcd_background_color isn't GLCD_BLACK, then background color will be white, and
    pen color will be white ("normal").
    when using glcd_common library, a glcd'put pseudo-variable will be defined,
    and be called as an output device (eg. glcd = "x")
    

Private

Functions


Related samples

Here are the list of samples which use this library:

16f182516f1825_glcd_nokia_5110_image.jal
18f455018f4550_glcd_nokia_5110_image.jal
18f455018f4550_glcd_nokia_5110_gfx.jal
18f455018f4550_glcd_nokia_5110_pixel.jal
18f455018f4550_glcd_nokia_5110_sprite.jal
18f455018f4550_glcd_nokia_5110_font.jal