Created
January 22, 2015 23:04
-
-
Save Microcontrolandos/71d7c9faec9f35199fab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Compilador: MikroC PRO PIC | |
Autor: Tiago | |
Blog: microcontrolandos.blogspot.com.br | |
Bibliotecas Utilizadas: SSD1306, Soft_I2C | |
*/ | |
/* Pinos */ | |
sbit Soft_I2C_Sda at PORTB.B0; | |
sbit Soft_I2C_Scl at PORTB.B1; | |
sbit Soft_I2C_Sda_Direction at TRISB.B0; | |
sbit Soft_I2C_Scl_Direction at TRISB.B1; | |
/* Imagem gerada pela ferramenta GLCD Bitmap Editor, display KS0108 */ | |
const code char Logo[1024] = { ... }; | |
void main() | |
{ | |
Soft_I2C_Init(); //Inicializa a comunicação I2C | |
SSD1306_Init(); //Inicializa o display | |
SSD1306_Fill( 0 ); //Limpa o display | |
SSD1306_Out8( 0, 0, "Tiago", 0 ); //Imprime o texto na linha 0, coluna 0, com as cores invertida | |
Delay_ms( 5000 ); //Aguarda 5ms | |
SSD1306_Image( Logo, 1 ); //Desenha a imagem | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment