"Yes, you should set oscilator clock to 4MHz."
But how to set the 4Mhz clock. I mean please tell me the register name associated with it.... or some example program would be great..
Also I have enabled timer with the following settings. What do you expect the time in ms that my timer will tick...
TIOS = 128; //output compare select..
TC7= 65535; /* Store given value to the compare register */
TFLG1 = 128; /* Reset interrupt request flag */
TIE_C7I = 1; /* Enable interrupt */
TSCR1_TEN = 1; /* Start timer */
I tested it in my own real MCU and in simulator having a 4mz crystall, I got around 920 ms using a stop watch ..
Also in simulator I got a similar time in ms using a 4Mhz CPU clock and 2Mhz bus clock..
Also please help me with BUS clock and CPU clock. Please check assertions.
1. The bus clock supplies all perepherials like timers.
2. My code runs at CPU clock, ie at 4Mhz...
Thanks in advance