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
/* | |
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 | |
} |
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
/* | |
EXEMPLO | |
MCU: PIC12F675 | |
Clock: INTOSC 4MHz | |
Compilador: MikroC PRO PIC | |
Autor: Tiago | |
Bibliotecas Utilizadas: LCD595, Conversions, Lcd_Constants | |
Ligação dos pinos: | |
74HC595 <-> LCD |
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
/* | |
LCD595 - LCD com 74HC595( Shift Register ) | |
Autor: Tiago | |
Compilador: MikroC PRO PIC | |
Criado em: 18/06/2014 por Tiago | |
Modificado em: 23/01/2015 por Tiago | |
- Adicionado as funções: LCD_Chr_CP e LCD_Out_CP | |
- Alterado as funções LCD_Chr e LCD_Out | |
- Alterado o nome da função LCD595_Write4Bit para LCD595_Send | |
/* |
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
/* | |
MCP41XXX/MCP42XXX - Single/Dual Digital Potenciometer with SPI interface | |
Autor: Tiago | |
Compilador: MikroC PRO PIC | |
Criado em: 17/10/2014 por Tiago | |
Modificado em: 23/01/2015 por Tiago | |
- Suporte para o MCP42XXX | |
- Comandos disponíveis para o usuário | |
*/ |
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
/* | |
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; |
NewerOlder