Carlos Gomez / lcd1100
Committer:
Carlos_Gomez
Date:
Sat Jul 21 04:02:41 2012 +0000
Revision:
0:63329911c8c0
Child:
1:6b0d8c274965
20 de Julio de 2012

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Carlos_Gomez 0:63329911c8c0 1 //////////////////////////////////////////////////////
Carlos_Gomez 0:63329911c8c0 2 /*
Carlos_Gomez 0:63329911c8c0 3 esta libreria fue adaptada por Carlos Gomez y Hector V
Carlos_Gomez 0:63329911c8c0 4 argas para uso enel proyecto de fin de carrera en
Carlos_Gomez 0:63329911c8c0 5 ingenieria electronica
Carlos_Gomez 0:63329911c8c0 6 en la Universidad de los Llanos - Villavicencio - Colombia
Carlos_Gomez 0:63329911c8c0 7 */
Carlos_Gomez 0:63329911c8c0 8 //////////////////////////////////////////////////////
Carlos_Gomez 0:63329911c8c0 9 /// lcd1100.c
Carlos_Gomez 0:63329911c8c0 10 ///
Carlos_Gomez 0:63329911c8c0 11 /// Badr Ghatasheh (demonspells)
Carlos_Gomez 0:63329911c8c0 12 /// 11/3/2011
Carlos_Gomez 0:63329911c8c0 13 //////////////////////
Carlos_Gomez 0:63329911c8c0 14 #ifndef LCD1100_H
Carlos_Gomez 0:63329911c8c0 15 #define LCD1100_H
Carlos_Gomez 0:63329911c8c0 16 #include "mbed.h"
Carlos_Gomez 0:63329911c8c0 17
Carlos_Gomez 0:63329911c8c0 18 #define CMD 0
Carlos_Gomez 0:63329911c8c0 19 #define DATA 1
Carlos_Gomez 0:63329911c8c0 20 class lcd1100 {
Carlos_Gomez 0:63329911c8c0 21 public:
Carlos_Gomez 0:63329911c8c0 22 lcd1100(PinName _sclk,PinName _sda,PinName _cs,PinName _rst);
Carlos_Gomez 0:63329911c8c0 23 //Inicializa la LCD
Carlos_Gomez 0:63329911c8c0 24 void Lcd_Init(void);
Carlos_Gomez 0:63329911c8c0 25 //Limpia la LCD
Carlos_Gomez 0:63329911c8c0 26 void Lcd_Clear(void);
Carlos_Gomez 0:63329911c8c0 27 void SetX(char x);
Carlos_Gomez 0:63329911c8c0 28 void SetY(char y);
Carlos_Gomez 0:63329911c8c0 29 //sed the position of cursor X(0 to 96) and Y(0 to 7)each position in "Y" is 8*y pixels
Carlos_Gomez 0:63329911c8c0 30 //pone el cursor en la posicion X,Y*8
Carlos_Gomez 0:63329911c8c0 31 //los valores aceptables para Y son de 0 a 96 y para Y de 0 a 9
Carlos_Gomez 0:63329911c8c0 32 void Gotoxy(char x,char y);
Carlos_Gomez 0:63329911c8c0 33 //dibuja una linea vertical
Carlos_Gomez 0:63329911c8c0 34 void VLine(char x,char y,char on);
Carlos_Gomez 0:63329911c8c0 35 //dibuja una linea Horizontal
Carlos_Gomez 0:63329911c8c0 36 void Line(unsigned char x,unsigned char y,unsigned char y2,unsigned char on);
Carlos_Gomez 0:63329911c8c0 37 //imprime un caracter
Carlos_Gomez 0:63329911c8c0 38 void print_char(char c);
Carlos_Gomez 0:63329911c8c0 39 //imprime un String
Carlos_Gomez 0:63329911c8c0 40 void printf_lcd(char *s);
Carlos_Gomez 0:63329911c8c0 41 //imprime una imagen
Carlos_Gomez 0:63329911c8c0 42 void cargar_imagen(char *dir);
Carlos_Gomez 0:63329911c8c0 43 char bitaddr;
Carlos_Gomez 0:63329911c8c0 44 private:
Carlos_Gomez 0:63329911c8c0 45 DigitalOut sclk;
Carlos_Gomez 0:63329911c8c0 46 DigitalOut sda;
Carlos_Gomez 0:63329911c8c0 47 DigitalOut cs;
Carlos_Gomez 0:63329911c8c0 48 DigitalOut rst;
Carlos_Gomez 0:63329911c8c0 49 // lookup table, here you can modify the font
Carlos_Gomez 0:63329911c8c0 50 static const char FontLookup1[48][5];
Carlos_Gomez 0:63329911c8c0 51 static const char FontLookup2[48][5];
Carlos_Gomez 0:63329911c8c0 52 //envia datos los datos a la LCD1100
Carlos_Gomez 0:63329911c8c0 53 void Lcd_Write(bool cd,unsigned char c);
Carlos_Gomez 0:63329911c8c0 54 };
Carlos_Gomez 0:63329911c8c0 55
Carlos_Gomez 0:63329911c8c0 56 #endif