Modified code after changed Reference Frequency to 100MHz