pll.c
来自「基于51的单片机的PPP协议实现」· C语言 代码 · 共 46 行
C
46 行
/*/////////////////////////////////////////////////////////////////////////////
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 + =
减小字号Ctrl + -
显示快捷键?