AnsweredAssumed Answered

KEAZ128 OSC

Question asked by 蔣 維哲 on Jul 15, 2019
Latest reply on Jul 18, 2019 by Kerry Zhou

I want to using external clock.

When I set up all related parameter.

I burning program in KEAZ128 without external oscillator.

It seems to be working properly.

So,I thank that it still using internal oscillator.

What problem with my program?

 

My program like it:

 

#define ICS_C2_BDIV(x) (((uint8_t)(((uint8_t)(x))<<ICS_C2_BDIV_SHIFT))&ICS_C2_BDIV_MASK)
ICS_C1 = 0x80;
ICS_C2|=ICS_C2_BDIV(1); 
ICS_C3= 0x90; 
ICS_S &= 0xEF;
ICS_S |= 0x08;
while(!(ICS_S & 0x40)); 
   ICS_S |= 0x40; 
OSC_CR=0xA7;

Outcomes