Getting Started

(lily) #1

Chapter 11 The Butterfly LCD............................................................................


llmode is not used
id

olon(cha
0 dis n, otherwise ables n
ntrast(char
Uses the value of input from 0 to 15 to set the contrast

our messenger p at we can tr B to
e LCD. We will also add commands to set the contrast, show/hide the
r the display, set the flash rate, and send strings with flashing
haracters.

Instead of running off willy-nilly and writing software, lets start with a short
specification of what we want to test from the PC users perspective.


We will test each function by sending the following command strings to the
Butterfly:



  • PUTCdigitcharacter to test LCD_putc(uint8_t digit, char character);
    o Send PUTCdigitcharacter where character is a char to be displayed
    and digit is the LCD segment to display the input on. For example
    PUTC6A will cause the character A to be displayed on the 6th LCD
    digit.
    o Verify function by seeing the correct char in the correct position

  • PUTF to test LCD_puts_f(const char *pFlashStr, char scrollmode);
    o Verify function by seeing the correct string on the LCD

  • PUTSstring to test LCD_puts(char *pStr, char scrollmode);
    o Send PUTSstring where string is a string to be displayed. For
    example PUTSHello World! will cause the LCD to display ‘Hello
    World!’.
    o Verify function by seeing the correct string on the LCD

  • CLEAR to test LCD_Clear(void);


o scro


  • void LCD_Clear(vo );
    o Clears the LCD

  • void LCD_C r show);
    o If show = ables Colo en Colo

  • char SetCo input);
    o


PC to LCD test program..............................................................................


Lets modify
y on th


rogram so th send s ings to the utterfly
displa
colon, clea
c

Free download pdf