Jump to content

GuilhermeArp

Membros
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. //INICIO #include <xc.h> // CONFIG #pragma config FOSC = HS #pragma config WDTE = OFF #pragma config PWRTE = OFF #pragma config BOREN = OFF #pragma config LVP = OFF #pragma config CPD = OFF #pragma config WRT = OFF #pragma config CP = OFF #define _XTAL_FREQ 4000000 int display(int numero); int C1 = 0, C2 = 0; void __interrupt() tratamento_interrupcao(void) { static int contador = 0; static int led = 1, sel_display = 1; if (INTCONbits.TMR0IF == 1) { // Reset flag after overflow INTCONbits.TMR0IF = 0; TMR0 = 131; contador++; if (contador == 1
×
×
  • Create New...