How to set the Bus Clock with 4Mhz

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

How to set the Bus Clock with 4Mhz

480 Views
gopinatharaveti
Contributor I

Hi,

I am using a S08AW16A controller with a external source clock of 4Mhz. I need to set the BUS Clock with 4Mhz. Any suggestions guys.

Labels (1)
0 Kudos
3 Replies

358 Views
Leojunin
Contributor III

What programming language do you use? You should read:

http://cache.nxp.com/files/microcontrollers/doc/data_sheet/MC9S08AC16.pdf?fpsp=1&WT_TYPE=Data%20Shee...

from page 127

I give a little help ...

ICGC1 = 0xA0

ICGC2 = 0x00

Check ICGS1 register. You should wait for CLKST0:1 = 1: 0, and the bit REFST = 0

I have not programmed on the chip but I think you go out there on track.

Saludos

0 Kudos

358 Views
gopinatharaveti
Contributor I

I am using assembly language. I have already been through the data sheet. Below are my configurations to set a 4MHz Bus clock from a 4MHz Ext Source Clock.

ICGC1_INIT          equ %01011010   ; Select FBE (FLL bypassed external i.e., Ext. XTAL/R) and disable loss of clock

ICGC2_INIT          equ %00000001   ; Thus ICGOUT = (4MHz * 4)/2 = 8MHz

0 Kudos

358 Views
Leojunin
Contributor III

ICGC1 = %10110000 or $B0

HGO should be 1 because it is a higher frequency to 1MHz

RANGE is indistinct because not use the FLL

REFS = 0 is external clock oscilator; REFS = 1 External crystal or resonator

CLKS = 1:0, It is true! I was wrong to read.

The last two to yours taste.

ICGC2 = $00

0 Kudos