Dimmer controlador por pic18f4550

1338 palavras 6 páginas
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* DEFINIÇÃO PIC *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <p18F4550.h> // Register definitions
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* INCLUDES DAS FUNÇÕES DE PERIFÉRICOS DO PIC *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <pwm.h> //PWM library functions
#include <adc.h> //ADC library functions
#include <timers.h> //Timer library functions
#include <delays.h> //Delay library functions
#include <i2c.h> //I2C library functions
#include <stdlib.h> //Library functions
#include <usart.h> //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

Relacionados