zoukankan      html  css  js  c++  java
  • 时钟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,为保证稳定性也要留有一定的富余

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

  • 相关阅读:
    Java遍历JsonObject对象
    fastjson.JSONObject之对象与JSON转换方法
    Java HotSpot VM中的JIT编译
    JAVA 反射类 捕获异常 method.invoke方法如何捕获异常
    手动调用hibernate的参数校验器和springboot参数校验器 验证
    Netty-Socketio API
    Netty-socketio集成redis,服务端集群推送消息
    mysql 导出csv格式数据解决乱码
    自建dns服务器
    MySQL 8.0 克隆(clone)插件快速搭建主从复制
  • 原文地址:https://www.cnblogs.com/farbeyond/p/5204687.html
Copyright © 2011-2022 走看看