/********************************************************************
* FileName:        LightCountdown.c
* Processor:       PIC18F4520
* Compiler:        MPLAB C18 v.3.06 
*
* This file flashes the lights on the Hardware Board
*                                     
* You modify to countdown from 12 to 0 @ 0.4 second intervals
*
* Author               Date        Comment
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
// (Your name here) 

/** Processor Header Files ****************************************/     
#include <p18f4520.h> 
#include <delays.h>

// === Configuration Bits  =======================================
// 
#pragma config OSC = INTIO67
#pragma config WDT = OFF
#pragma config LVP = OFF
#pragma config BOREN = OFF
#pragma config XINST = OFF
	
/*****************************************************************
* Function:        void main(void)
******************************************************************/
#pragma code
void main (void)
{
	ADCON1 = 0b00001111;	// Sets all the pins to digital
	TRISC = 0b00000000;	// Sets all the digital PORTC pins to outputs

  	while (1) {
      		PORTC = 0b0001;			// Light RC0
		Delay10KTCYx(50);		// Delay for 2 seconds
      		PORTC = 0b1000;			// Light RC3
		Delay10KTCYx(50);		// Delay for 2 seconds
    	}
}