#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
// CONFIG2
#pragma config POSCMOD = NONE // Primary Oscillator Select (Primary oscillator disabled)
#pragma config I2C1SEL = PRI // I2C1 Pin Location Select (Use default SCL1/SDA1 pins)
#pragma config IOL1WAY = ON // IOLOCK Protection (Once IOLOCK is set, cannot be changed)
#pragma config OSCIOFNC = ON // Primary Oscillator Output Function (OSC2/CLKO/RC15 functions as port I/O (RC15))
#pragma config FCKSM = CSDCMD // Clock Switching and Monitor (Clock switching and Fail-Safe Clock Monitor are disabled)
#pragma config FNOSC = FRC // Oscillator Select (Fast RC Oscillator (FRC))
#pragma config SOSCSEL = SOSC // Sec Oscillator Select (Default Secondary Oscillator (SOSC))
#pragma config WUTSEL = LEG // Wake-up timer Select (Legacy Wake-up Timer)
#pragma config IESO = OFF // Internal External Switch Over Mode (IESO mode (Two-Speed Start-up) disabled)
// CONFIG1
#pragma config WDTPS = PS32768 // Watchdog Timer Postscaler (1:32,768)
#pragma config FWPSA = PR128 // WDT Prescaler (Prescaler ratio of 1:128)
#pragma config WINDIS = OFF // Watchdog Timer Window (Windowed Watchdog Timer enabled; FWDTEN must be 1)
#pragma config FWDTEN = OFF // Watchdog Timer Enable (Watchdog Timer is disabled)
#pragma config ICS = PGx1 // Comm Channel Select (Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1)
#pragma config GWRP = OFF // General Code Segment Write Protect (Writes to program memory are allowed)
#pragma config GCP = OFF // General Code Segment Code Protect (Code protection is disabled)
#pragma config JTAGEN = OFF // JTAG Port Enable (JTAG port is disabled)
/*
*
*/
#define PB1 PORTBbits.RB7
#define PB2 PORTBbits.RB8
#define ONLED5 LATBbits.LATB10=0;
#define ONLED6 LATBbits.LATB12=0;
#define ONLED7 LATBbits.LATB6=0;
//########### DECLARACION DE VARIABLES GLOBALES ##############################
//#############################################################################
//########### DECLARACION DE FUNCIONES #######################################
void configuraciones(void);
//#############################################################################
int main(int argc, char** argv)
{
configuraciones();
while(1)
{
ONLED5
ONLED6
ONLED7
}
return (EXIT_SUCCESS);
}
void configuraciones()
{
TRISBbits.TRISB12=0;
TRISBbits.TRISB10=0;
TRISBbits.TRISB6=0;
}