
#ifndef HARDWAREPROFILE_H
#define HARDWAREPROFILE_H
//On the PIC18F87J50 Family of USB microcontrollers, the PLL will not power up and be enabled
//by default, even if a PLL enabled oscillator configuration is selected (such as HS+PLL).
//This allows the device to power up at a lower initial operating frequency, which can be
//advantageous when powered from a source which is not gauranteed to be adequate for 48MHz
//operation.  On these devices, user firmware needs to manually set the OSCTUNE<PLLEN> bit to
//power up the PLL.
//Basically the CPU clock is established via the pragma section with PLL Prescaler=3 (b'cause 12MHz crystal)
//CPUDIV=1 for 48MHz output. If PLL not enabled, the clock speed would be 12MHz
#define CLOCK_FREQ 				12000000		//no pll applied yet.
#define GetSystemClock()  		CLOCK_FREQ   
#define GetInstructionClock() 	(GetSystemClock()/4)

/*************** 				Hardware				*****************/
#define KEY7_CTRL		LATEbits.LATE6			//need to output LATE6 low to enable a single key press on KEY7
#define KEY7_CTRL_TRIS	TRISEbits.TRISE6	
#define KEY7			PORTBbits.RB4
#define LED_GATE		LATAbits.LATA5			//emitter gate for all LEDs.
#define LED_GATE_TRIS	TRISAbits.TRISA5
#define LED				LATCbits.LATC3
#define LED_TRIS		TRISCbits.TRISC3
#define LED_OFF				1
#define LED_ON				0

#endif
