示例#1
0
/*--------------------------------------------------------------------------------------------------

  Name         :  LcdContrast

  Description  :  Set display contrast.

  Argument(s)  :  contrast -> Contrast value from 0x00 to 0x7F.

  Return value :  None.

  Notes        :  No change visible at ambient temperature.

--------------------------------------------------------------------------------------------------*/
void lcdContrast( BYTE contrast )
{
    setModeCmd3310();

    //  LCD Extended Commands.
    lcdSend( 0x21 );

    // Set LCD Vop (Contrast).
    lcdSend( 0x80 | contrast );

    //  LCD Standard Commands, horizontal addressing mode.
    lcdSend( 0x20 );
}
示例#2
0
void lcdPrint(char *text)
{
    int i;

    for (i=0;i<strlen(text);i++)
    {
        lcdSend(text[i], 0x03);
    }
}
示例#3
0
void lcdCmd(uint8_t cmd)
{
    lcdSend(cmd, 0x01);
}