Hi Alex,
I have found a pdf that helped me with the delay, so I have made this code:
void main(void) {
TSCR1_TEN=1; // Enable timer
TIOS_IOS0 = 1; // Set bit 0 as output compare
us_delay(8);
for( ; ; ) {} /* wait forever */
}
void us_delay(int useconds)
{
TSCR2_PR = 0; // Prescale = 1
TC0 = (useconds * 16) + TCNT; // 16MHz * useconds = # of ticks
TFLG1 = TFLG1_C0F_MASK; // Reset flag
while (TFLG1_C0F==0); // Wait for time out
}
But, how many ticks does it take to call and return to/from a function?
As I said before I have MC68HC912 board, and if I'm not wrong, the crystal frequency is 32MHz.
And what is FLL?
Thanks
Message Edited by JamesWorthy on 03-15-200603:22 PM