/** Generated Main Source File
Company: Microchip Technology Inc.
File Name: main.c
Summary: This is the main file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs
Description: This header file provides implementations for driver APIs for all modules selected in the GUI. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 Device : PIC16F18877 Driver Version : 2.00*//* Nome Cognome * Classe Sezione * Data * Descrizione operativa del programma
* */
#include "mcc_generated_files/mcc.h"
/* Main application */void main(void){ // initialize the device SYSTEM_Initialize();
// When using interrupts, you need to set the Global and Peripheral Interrupt Enable bits // Use the following macros to:
// Enable the Global Interrupts //INTERRUPT_GlobalInterruptEnable();
// Enable the Peripheral Interrupts //INTERRUPT_PeripheralInterruptEnable();
// Disable the Global Interrupts //INTERRUPT_GlobalInterruptDisable();
// Disable the Peripheral Interrupts //INTERRUPT_PeripheralInterruptDisable(); while (1) { //Tutto quello che metto nel while (1) verra ripetuto all'infinito //Imposto tutti i pin a 0, che però nella scheda oky3531 che è in logica negata i led sono accesi LATB=0x00; //Aspetto 500 millisecondi __delay_ms(500); //Imposto tutti i pin a 1, che però nella scheda oky3531 che è in logica negata i led sono spenti LATB=0xFF; //Aspetto 500 millisecondi __delay_ms(500); }}/** End of File*/