Hi Mac,
I follow the datasheet and Processor Expert but the chip continues without clock signal.
The code that I'm using is:
; clock inicialization
; CONFIG1: COPRS=0,LVISTOP=0,LVIRSTD=0,LVIPWRD=0,LVITRIP=0,SSREC=0,STOP=0,COPD=1
MOV #$01,CONFIG1
; CONFIG2: IRQPUD=0,IRQEN=0,OSCENINSTOP=0,RSTEN=0
CLR CONFIG2
bclr 7,OSCSC
bset 6,OSCSC
bset 5,DDRA ;OSC2
bset 5,PTA ;TESTE
nop
nop
nop
nop
nop
nop
nop
nop
; OSCSC: OSCOPT1=1,OSCOPT0=1,ICFS1=1,ICFS0=0,ECFS1=0,ECFS0=0,ECGON=0,ECGST=0
MOV #$E0,OSCSC
; Wait
LDHX #0 ; Main delay counter
for_delay0:
LDA #5 ; Delay code
for_delay_A_0:
DECA ; Delay code
BCC for_delay_A_0 ; Delay code
AIX #1
CPHX #CGM_DELAY
BNE for_delay0
; Enable External Clock Generator
; OSCSC: ECGON=1
BSET $01,OSCSC
while_Cpu0: ; Wait for external oscillator stabilization
BRCLR 0,OSCSC,while_Cpu0
I don't know where is the mistake.
Thanks a lot.
Edson