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
/* | |
SSD1306 - Display monocromático OLED 128x64 | |
Autor: Tiago | |
Compilador: MikroC PRO PIC | |
Criado em: 26/12/2014 por Tiago | |
*/ | |
/* Fundamental Command */ | |
#define SSD1306_SETCONTRAST 0x81 | |
#define SSD1306_ENTIREDISPLAYON_RESUME 0xA4 |
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
/* | |
Projeto: Timer utilizando o PIC16F628A e display LCD | |
Autor: Tiago | |
Compilador: MikroC PRO PIC | |
Clock: INTOSC 4MHz | |
Blibliotecas Utilizadas: LCD | |
Criado em: 29/12/12 por Tiago | |
Modificado em: 22/01/15 por Tiago | |
- Adicionado pisca-pisca do caracter ':' no display LCD | |
- Alterado e movido o código que decrementa os segundos e minutos para a rotina de interrupção |
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
/* | |
PCF8583 - Clock and calendar with 240 x 8-bit RAM | |
Autor: Tiago | |
Compilador: MikroC PRO PIC | |
Criado em: 03/11/2014 por Tiago | |
Modificado em: 23/01/2015 | |
- Possibilidade de trabalhar com dois PCF8583 no mesmo barramento | |
*/ | |
/* Endereços disponíveis */ |
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
/* | |
PROJETO: RTC com PCF8583 | |
MCU: PIC16F628A | |
COMPILADOR: MikroC PRO PIC | |
AUTOR: Tiago | |
Bibliotecas Utilizadas: PCF8583, Conversions, Eeprom, LCD, Software_I2C | |
Criado em: 03/11/2014 | |
Modificado em: 23/01/2015 | |
- Adicionado o endereço do dispositivo | |
*/ |
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; |
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
#include "DS1631.h" | |
/* Pinos do LCD */ | |
sbit LCD_RS at RB0_bit; | |
sbit LCD_EN at RB1_bit; | |
sbit LCD_D4 at RB2_bit; | |
sbit LCD_D5 at RB3_bit; | |
sbit LCD_D6 at RB4_bit; | |
sbit LCD_D7 at RB5_bit; | |
sbit LCD_RS_Direction at TRISB0_bit; |
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
/* | |
DS1631.c - High-Precision Digital Thermometer and Thermostat library for MikroC PRO PIC | |
Author: Tiago Melo | |
Blog: microcontrolandos.blogspot.com.br | |
*/ | |
#include "DS1631.h" | |
static int DS1631_Read( char address, char reg ) | |
{ |
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
//Mascara de bits usado para escrever um digito no display | |
char DisplayCatodoComum[] = { 63, 6, 91, 79, 102, 109, 125, 7, 127, 111 }; | |
char contador = 1; //conta de 0 até 99. | |
char flags = 0; //usado para salvar o estado do botao | |
char digitoDasUnidades; //usado para guardar o digito das unidades ( 0...9 ) | |
char digitoDasDezenas; //usado para guardar o digito das dezanas ( 0...9 ) | |
void main() | |
{ |
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
//Interrupção Externa do pino INT0 | |
void interrupcaoExterna0() iv IVT_ADDR_INT0 | |
{ | |
//tratamento da interrpção... | |
} |
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
/* | |
Toda vez que pressionarmos o botão, o LED irá alternar-se. | |
*/ | |
//Interrupção Externa do pino INT0 | |
void interrupcaoExterna0() iv IVT_ADDR_INT0 | |
{ | |
PINB.B0 = 1; //alternamos o valor do pino PB0 | |
} |
NewerOlder