question on CPU clock frequency MC9S08RE16

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

question on CPU clock frequency MC9S08RE16

1,694 次查看
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
标签 (1)
0 项奖励
回复
2 回复数

633 次查看
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 项奖励
回复

633 次查看
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 项奖励
回复