#include <hidef.h>      /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */

 void Init(){
    //configurare procesor
	SOPT   = 0x00;	  	 /* Disable COP	*/
    ICGC2  = 0X00;       // Set up ICG control register 2
    ICGC1  = 0X78;       // Set up ICG for FEE, 4MHz external crystal, busclk = 8MHz
  
    //asteptare pornire FLL (LOCK = 1)
    while(!(ICGS1 & 0x08));    

    // configurare PORT F
    PTFDD = 0xFF;	 
 }


void main(void) {

  Init();
  EnableInterrupts; /* enable interrupts */
  /* include your code here */
  
  PTFD = 0xA5;

  for(;;) {
 
 } /* loop forever */
  /* please make sure that you never leave main */
}
