RELIANCE 45C341模拟输入卡
从看门狗计时器读取一天中的时间有两种方法。首先是通过将Te位(命令寄存器的位7)设置为逻辑零(0),然后读取时间寄存器的内容,停止外部时间寄存器跟踪内部时间寄存器。使用这种技术可以消除在读取过程中时间发生变化的可能性。在读取结束时,Te位被设置为逻辑1,允许外部时间寄存器恢复跟踪内部时间寄存器。当外部时间寄存器停止时,内部时间寄存器继续计时,因此不会丢失时间。这是推荐的方法。从看门狗计时器读取时间的第二种技术是读取外部时间寄存器,而不停止内部寄存器的跟踪。不建议这样做,因为在读取过程中可能会更新寄存器,从而导致读取错误数据。
There are two techniques for reading the Time of Day from the Watchdog Timer. The first is to halt the external Time of Day registers from tracking the internal Time of Day registers by setting the Te bit (Bit 7 of the Command Register) to a logic zero (0), then reading the contents of the Time of Day registers. Using this technique eliminates the chance of the Time of Day changing while the read is taking place. At the end of the read, the Te bit is set to a logic one (1) allowing the external Time of Day registers to resume tracking the internal Time of Day Registers. No time is lost as the internal Time of Day Registers continue to keep time while the external Time of Day registers are halted. This is the recommended method. The second technique for reading the Time of Day from the Watchdog Timer is to read the external Time of Day registers without halting the tracking of the internal Registers. This is not recommended as the registers may be updated while the reading is taking place, resulting in erroneous data being read.