• 时钟1


           近来由于电赛的需要,所以学了一下MSP430,与以前的51的系列的单片机的设置还是有很多的不同,由于牵涉很多的寄存器的设置,因此编程比较麻烦。其实类似于MSP430这样的单片机,首先要过的一关就是晶振,从硬件上讲,晶振正常工作决定你的芯片正常工作;从软件上来讲,晶振的设置涉及到你的芯片的机器周期大小,机器周期的进而关系到你的时序等等。

          所以,还是看了一下user guide中的basic clock中相关的东西,做了一些笔记,并结合实验进行来验证。

    首先是关于DCO(Digitally-Controlled Oscillator),

    The DCO is an integrated ring oscillator with RC-type characteristics. As with any RC-type oscillator,frequency varies with temperature, voltage, and from device to device. The DCO frequency can be adjusted by software using the  DCOx, MODx, and RSELx bits. The digital control of the oscillator allows frequency stabilization despite its RC-type characteristics.

    很多的模拟电路中并不使用RC滤波电路也基于其随着温度变化的稳定性影响

    Adjusting the DCO frequency After a PUC,the internal resistor is selected for the DC generator, RSELx = 4, and DCOx = 3, allowing the DCO to start at a mid-range frequency. MCLK and SMCLK are sourced from DCOCLK. Because the CPU executes code from MCLK, which is sourced from the fast-starting DCO, code execution begins from PUC in less than 6 µs. The typical DCOx and RSELx ranges and steps are shown in Figure 4−5. The DCO temperature coefficient can be reduced by using an external resistor ROSC  tied to DVCC to source the current for the DC generator. Figure 4−6 shows the typical relationship of fDCO vs. temperature for both the internal and external resistor options. Using an external ROSC reduces the DCO temperature coefficient to approximately 0.1%/C. See the device-specific data sheet for parameters. ROSC also allows the DCO to operate at higher frequencies. For example, the internal resistor nominal value is approximately 300 kΩ, allowing the DCO to operate up to approximately 5 MHz. When using an external ROSC of approximately 100 kΩ the DCO can operate up to approximately 10 MHz. The user shouldtake care to not exceed the maximum MCLK frequency specified in the datasheet, even though the DCO is capable of exceeding it.选择外部电阻的时候还是依据datasheet,为保证稳定性也要留有一定的富余

    今天暂时到此,有什么问题希望大家批评指正!

  • 相关阅读:
    一些至理名言
    移除快捷方式上面那个丑陋的小箭头
    一些浏览器插件
    yahoo给出的关于网站优化的建议
    javascript 事件流
    关于mongodb的一些笔记
    WebStorm
    给go添加各种package
    工具类 util.Date 日期类
    几种简单排序算法
  • 原文地址:https://www.cnblogs.com/farbeyond/p/5204687.html
Copyright © 2020-2023  润新知