question on CPU clock frequency MC9S08RE16

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

question on CPU clock frequency MC9S08RE16

1,696 Views
stevec
Contributor III
I am using a 16MHz clock The manual says that the CPU operates "at the input frequency of the oscillator" so I am assuming 16 MHz. However toggling an output bit  using bclr and bset shows this takes approx 600 nS. As the bclr takes 5 machine cycles this makes each machine cycle equal to about 120nS.This shows the CPU operating at 8Mhz not 16Mhz. Is the manual wrong? It shows the CPU being driven by the output of the oscillator before it goes to the divide by 2 block which produces the bus clock.

Steve
Labels (1)
0 Kudos
Reply
2 Replies

635 Views
tonyp
Senior Contributor II
The manual is OK.

The CPU clock and bus clock are related but not the same.  All instructions run at the bus clock which (for 9S08 series) is half the CPU clock.  With a 16MHz CPU, you'll get an 8MHz bus.  By instruction machine cycles, you should think bus clock cycles.


Message Edited by tonyp on 2008-08-28 06:35 PM
0 Kudos
Reply

635 Views
stevec
Contributor III
Thanks for that. I thought that instructions ran on the CPU and therefore at the 16MHz rate. I'll have to cut a  few corners to get the speed up then. Probably assembler (so more question!)

Steve
0 Kudos
Reply