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.