Skip to content

Instantly share code, notes, and snippets.

@Microcontrolandos
Created January 22, 2015 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Microcontrolandos/71d7c9faec9f35199fab to your computer and use it in GitHub Desktop.
Save Microcontrolandos/71d7c9faec9f35199fab to your computer and use it in GitHub Desktop.
/*
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