ezLCD+103 Driver  0.1
Driver code for the ezLCD+103
 All Files Functions Typedefs Enumerations Groups Pages
Macros | Functions
System

Macros

#define EZLCD_POWER_ON()   SETBIT(EZLCD_POWER_PORT,EZLCD_POWER_PIN);
 
#define EZLCD_POWER_OFF()   CLEARBIT(EZLCD_POWER_PORT,EZLCD_POWER_PIN);
 

Functions

void ezLCD_set_brightness (uint8_t brightness)
 
void ezLCD_backlight_off (void)
 
void ezLCD_backlight_on (void)
 
uint8_t ezLCD_ping ()
 

Detailed Description

This header contains functions and macros which manage miscellaneous system settings such as brightness, backlight, and power settings. It also contains a function to ping the display (that is, determine if the screen is ready to receive more commands.

Macro Definition Documentation

#define EZLCD_POWER_OFF ( )    CLEARBIT(EZLCD_POWER_PORT,EZLCD_POWER_PIN);

Used to turn the ezLCD+103 off

#define EZLCD_POWER_ON ( )    SETBIT(EZLCD_POWER_PORT,EZLCD_POWER_PIN);

Used to turn the ezLCD+103 on

Function Documentation

void ezLCD_backlight_off ( void  )

Turns off the backlight.

Assumptions
  • The user has initialized the MCU's SPI interface with the EZLCD_INIT_SPI() macro.
  • The user has set the MCU's SPI pins to inputs and outputs appropriately.

    • SS_BAR = OUTPUT
    • SCK = OUTPUT
    • MOSI = OUTPUT
    • MISO = INPUT
void ezLCD_backlight_on ( void  )

Turns on the backlight.

Assumptions
  • The user has initialized the MCU's SPI interface with the EZLCD_INIT_SPI() macro.
  • The user has set the MCU's SPI pins to inputs and outputs appropriately.

    • SS_BAR = OUTPUT
    • SCK = OUTPUT
    • MOSI = OUTPUT
    • MISO = INPUT
uint8_t ezLCD_ping ( )

Pings the ezLCD to determine if it is ready to receive commands. If the user's code isn't operating as expected, it may be likely that he or she is sending data to the screen too fast. The user should call this function continuously until it returns a 1 before resuming other commands.

Assumptions
  • The user has initialized the MCU's SPI interface with the EZLCD_INIT_SPI() macro.
  • The user has set the MCU's SPI pins to inputs and outputs appropriately.

    • SS_BAR = OUTPUT
    • SCK = OUTPUT
    • MOSI = OUTPUT
    • MISO = INPUT
Returns
  • 1 if ready
  • 0 otherwise.
void ezLCD_set_brightness ( uint8_t  brightness)

Sets the display brightness. This function does not change the default start-up brightness defined in UserConfig.txt

Parameters
  • brightness = The desired brightness level in the set of [0,255]. Higher numbers imply higher brightnesses.
Assumptions
  • The user has initialized the MCU's SPI interface with the EZLCD_INIT_SPI() macro.
  • The user has set the MCU's SPI pins to inputs and outputs appropriately.

    • SS_BAR = OUTPUT
    • SCK = OUTPUT
    • MOSI = OUTPUT
    • MISO = INPUT