Entradas

Mostrando entradas de diciembre, 2011

libreria flex_lcd

// flex_lcd.c // These pins are for the Microchip PicDem2-Plus board, // which is what I used to test the driver.  Change these // pins to fit your own board. #define LCD_DB4   PIN_C4 #define LCD_DB5   PIN_C5 #define LCD_DB6   PIN_C6 #define LCD_DB7   PIN_C7 // #define LCD_RS    PIN_C0 #define LCD_RW    PIN_C1 #define LCD_E     PIN_C2 // If you only want a 6-pin interface to your LCD, then // connect the R/W pin on the LCD to ground, and comment // out the following line. #define USE_LCD_RW   1 //======================================== #define lcd_type 2        // 0=5x7, 1=5x10, 2=2 lines #define lcd_line_two 0x40 // LCD RAM address for the 2nd line int8 const LCD_INIT_STRING[4] = {  0x20 | (lcd_type << 2), // Func set: 4-bit, 2 lines, 5x8 dots  0xc,                    // Display on  1,     ...