Dimmer 10 intensidades com amostra em display 7 seg
* DEFINIÇÃO PIC *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include // Register definitions
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* INCLUDES DAS FUNÇÕES DE PERIFÉRICOS DO PIC *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include //PWM library functions
#include //ADC library functions
#include //Timer library functions
#include //Delay library functions
#include //I2C library functions
#include //Library functions
#include //USART library functions
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Configurações para gravação *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#pragma config FOSC = HS
#pragma config CPUDIV = OSC1_PLL2
#pragma config WDT = ON
#pragma config WDTPS = 128
#pragma config LVP = OFF
#pragma config PWRT = ON
#pragma config BOR = OFF
#pragma config BORV = 0
#pragma config PBADEN = OFF
#pragma config DEBUG = OFF
#pragma config PLLDIV = 1
#pragma config USBDIV = 1
#pragma config FCMEN = OFF
#pragma config IESO = OFF
#pragma config VREGEN = OFF
#pragma config MCLRE = ON
#pragma config LPT1OSC = OFF
#pragma config CCP2MX = ON
#pragma config STVREN = OFF
#pragma config ICPRT = OFF
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Definição e inicialização das variáveis Globais *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//Neste bloco estão definidas as variáveis globais do programa.
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Constantes internas *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
//A definição de constantes facilita a programação e a manutenção.
#define t_filtro 240
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *