📄 pll.c
字号:
/*/////////////////////////////////////////////////////////////////////////////
File Name : Pll.c
Author : Rene Trenado
Location : Motorola Applications Lab, Baja California
Date Created : September 2000
Current Revision : 0.0
Notes : This file contains the code of the InitPll function
//////////////////////////////////////////////////////////////////////////////*/
#include "pll.h"
/***********************************************************************
Function : InitPll
Parameters : None
Date : September 2000
Desc : Initializes the PLL to operate at 4.91520 MHz
***********************************************************************/
#asm
xdef _InitPLL
_InitPLL:
BCLR 5,0x36 ;turn off PLL so it can be initialized
MOV #0x00,0x38 ;Set multiplier for 4.9152MHz
MOV #0x96,0x39 ;see manual for calculations
MOV #0x80,0x3A ;Set range select
BSET 7,0x37 ;Allow automatic acquisition & tracking
BSET 5,0x36 ;turn PLL back on
HERE:
BRCLR 6,0x37,HERE ;Wait for PLL to lock
BSET 4,0x36 ;Select PLL as Source
#endasm
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -