You are on page 1of 1

/* * File: tutorial11.c * Author: Teklu * * Created on June 25, 2012, 11:38 AM */ #include<p18f26k22.h> #include <stdio.h> #include <stdlib.

h> #pragma #pragma #pragma #pragma #pragma #pragma config config config config config config FOSC=HSMP PLLCFG=OFF PRICLKEN=OFF FCMEN=ON IESO=OFF HFOFST=ON

#pragma config WDTEN= OFF #pragma config LVP= OFF #pragma config DEBUG= OFF void main(void) { short count = 0; TRISCbits.TRISC6 = 0; TRISCbits.TRISC7 = 0; LATCbits.LATC6=0; LATCbits.LATC7=1; OSCCONbits.SCS=2/3; //CONFIG BITS FOR TUTORIAL 3 ONLY OSCCONbits.IRCF=7; // CONFIG BITS FOR TUTORIAL 3 ONLY while(1) { if(count>10000) { count=0; LATCbits.LATC6= ! LATCbits.LATC6; LATCbits.LATC7= ! LATCbits.LATC7; } else { count++; } } }

You might also like