[an error occurred while processing this directive]
|
Выдержка из start.asm:
;====================================================================
; 6.4 Set clock ratio (ignore subclock)
;====================================================================
#if CLOCKSPEED != NOCLOCK
SETB I:CKSCR:2 ; set main clock
# if CLOCKSPEED > MAINCLOCK
MOV A, I:CKSCR ; copy clock register
AND A, #0xFC ; set x1 for PLL
# if CLOCKSPEED == PLLx2
OR A, #0x01 ; set x2 for PLL
# elif CLOCKSPEED == PLLx3
OR A, #0x02 ; set x3 for PLL
# elif CLOCKSPEED == PLLx4
OR A, #0x03 ; set x4 for PLL
#
endif
MOV I:CKSCR, A ; write back
CLRB I:CKSCR:2 ; enable PLL, PLL is not switched
; to the MCU yet but after stabi-
; lizing it switchs on its own to
; higher speed (see below)
# endif ; CLOCKSPEED > MAINCLOCK
#endif ; CLOCKSPEED != NOCLOCK
E-mail: info@telesys.ru