[go: up one dir, main page]

JP2006172030A - Method for obtaining time data in digital processing device - Google Patents

Method for obtaining time data in digital processing device Download PDF

Info

Publication number
JP2006172030A
JP2006172030A JP2004362219A JP2004362219A JP2006172030A JP 2006172030 A JP2006172030 A JP 2006172030A JP 2004362219 A JP2004362219 A JP 2004362219A JP 2004362219 A JP2004362219 A JP 2004362219A JP 2006172030 A JP2006172030 A JP 2006172030A
Authority
JP
Japan
Prior art keywords
time data
time
bus
digital processing
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004362219A
Other languages
Japanese (ja)
Inventor
Hiroto Hideshima
裕人 秀島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Original Assignee
Meidensha Corp
Meidensha Electric Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Meidensha Corp, Meidensha Electric Manufacturing Co Ltd filed Critical Meidensha Corp
Priority to JP2004362219A priority Critical patent/JP2006172030A/en
Publication of JP2006172030A publication Critical patent/JP2006172030A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electric Clocks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To reduce the load of a CPU substantially by shortening the control time of the CPU substantially for obtaining time data from a clock device connected to the CPU through an I2C bus. <P>SOLUTION: In a device which directly controls an I2C bus by the software processing of an CPU 11, and performs digital processing based on the time data obtained from a clock IC device (RTC) 15 connected to the I2C bus, the time data is obtained from the clock device through the I2C device at the time of start-up of the device and is stored in an internal memory 13. At each interrupt of a constant frequency from an internal timer 11A, the time data stored in the internal memory is incremented by the time corresponding to the frequency, and the time data stored in the internal memory is read out when it is needed. The present invention includes an acquirement of time data from the clock device at regular time intervals or at a specified time, and rewriting of the time data stored in the internal memory with the acquired time data. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、I2Cバスを介して入出力デバイスを接続したディジタル処理装置において、時計デバイスがもつ時刻データをI2Cバス経由でディジタル処理装置のCPU側に取得する方法に関する。   The present invention relates to a method of acquiring time data of a clock device to the CPU side of the digital processing device via the I2C bus in a digital processing device connected with input / output devices via the I2C bus.

I2Cバス(商品名)は、フィリップス社が1980年代に提唱したもので、2本の信号線SCL(Serial Clock)とSDA(Serial Data)によって、どちらかというと比較的近い場所にあるデバイス間の情報伝達を行うためのシリアルインターフェースである。マスタ/スレーブの関係性を持ち、2本の信号線だけで接続が可能、複数のデバイスが接続可能などの特徴を持ち、従来は家電中心で発展したが、近年はディジタルリレーにも採用されている。   The I2C bus (trade name) was proposed by Philips in the 1980s, and it is more or less between devices that are relatively close by two signal lines SCL (Serial Clock) and SDA (Serial Data). This is a serial interface for transmitting information. It has a master / slave relationship and can be connected with only two signal lines. It has the characteristics that multiple devices can be connected. Conventionally, it has been developed mainly for home appliances. Yes.

I2Cバスに接続されるデバイスにはメモリ、LCD(液晶)ドライバ、スイッチなど多種多様なものが揃っており、その中の一つのデバイスとして時計IC(RTC)がある。時計ICは日時データの歩進が主な処理であり、その日時データの取得や設定を、I2Cバスを介して行うことになる。   Devices connected to the I2C bus include a wide variety of devices such as memories, LCD (liquid crystal) drivers, and switches, and one of them is a clock IC (RTC). The clock IC mainly processes date / time data, and the date / time data is acquired and set via the I2C bus.

I2Cバスは、図5に示すように、I2Cバス・コントローラIC1をバスのマスタとして接続し、その他のデバイス2、3、4、5、…をスレーブとして接続し、ディジタル処理装置本体6との間で種々のデータを入出力するのが一般的である(例えば、非特許文献1参照)。   As shown in FIG. 5, the I2C bus connects the I2C bus controller IC1 as a master of the bus and other devices 2, 3, 4, 5,. In general, various data are input and output (see, for example, Non-Patent Document 1).

しかし、より安価な製品を求められる昨今、I2Cバス・コントローラIC1を省き、ディジタル処理装置本体6に搭載するCPUのソフトウェア処理によってI2Cバスを直接制御する方式もある。
インターネットURL(http://jp.semiconducters.philips.com/buses/i2c/facts/index.html)、検索日(2004年9月10日)。
However, there is a method in which the I2C bus controller IC1 is omitted and the I2C bus is directly controlled by software processing of a CPU mounted on the digital processing device main body 6 in recent years when a cheaper product is required.
Internet URL (http://jp.semiconducters.philips.com/buses/i2c/facts/index.html), search date (September 10, 2004).

I2Cバス・コントローラを省き、簡易的にCPUに直結したI2Cバスを構成した場合、そのバス制御をソフトウェアで行うと、以下の問題がある。   When the I2C bus controller that omits the I2C bus controller and is simply connected directly to the CPU is configured to control the bus by software, there are the following problems.

I2Cバスで定められた幅(バスの速度により異なり、通常は数μs)のクロック信号(SCL)を生成し、データ(SDA)の出力/取得を行うが、この幅の信号を連続して生成した場合、1バイトあたり数十μs程度の信号制御時間が必要となり、入出力するデータ数が多くなるほど、その制御時間も比例して長くなる。   Generates a clock signal (SCL) with a width defined by the I2C bus (usually several μs depending on the bus speed) and outputs / acquires data (SDA). In this case, a signal control time of about several tens of μs per byte is required, and as the number of input / output data increases, the control time also increases in proportion.

RTCからの時刻データ取得に、I2Cバス制御をソフトウェアで実行すると、複数バイトのデータ(例えば年、月、日、時、分、秒、曜日を各1バイトとすると7バイト)を入出力するのに、数十μs〜数百μsの制御時間が必要となる。   When I2C bus control is executed by software to acquire time data from the RTC, multiple bytes of data (for example, 7 bytes if the year, month, day, hour, minute, second and day of the week are 1 byte each) are input and output. In addition, a control time of several tens μs to several hundreds μs is required.

近年の高機能CPUにとっては、上記の数十μs〜数百μsに渡る信号制御時間はRTCからの時刻データ取得にだけ用いるには多すぎる時間であり、処理の無駄でもある。また、日時情報のようなデータは、常に更新されるべきデータであり、常時歩進される日時データを頻繁にRTCから取得していたのでは、前述の処理の無駄が比例して多くなる。   For a high-performance CPU in recent years, the signal control time over several tens of μs to several hundreds of μs is too much time to be used only for acquiring time data from the RTC, and is also a waste of processing. Further, data such as date / time information is data that should be constantly updated, and if the date / time data that is constantly advanced is frequently acquired from the RTC, the waste of the above-described processing increases in proportion.

本発明の目的は、I2Cバスを介して接続された時計デバイスからCPUへの時刻データ取得に、CPUの制御時間を大幅に短縮してその負荷を大幅に軽減できる時刻データ取得方法を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a time data acquisition method capable of greatly reducing the control time of a CPU and greatly reducing the load for acquiring time data from a clock device connected via an I2C bus to the CPU. It is in.

本発明は、前記の課題を解決するため、I2Cバスを介して接続された時計デバイスへのアクセスは装置の起動時に1回だけ行い、このとき取得した時刻データを内部メモリに保存し、その後はCPUがもつ内部タイマによるCPUへの一定周期の割り込みの都度、該周期に相当する時間だけ内部メモリに保存する時刻データをインクリメントしておき、CPUが時刻データを必要とするときに内部メモリから取得するようにしたもので、以下の方法を特徴とする。   In order to solve the above-mentioned problems, the present invention accesses the timepiece device connected via the I2C bus only once at the time of starting the apparatus, stores the time data obtained at this time in the internal memory, and thereafter Each time an internal timer of the CPU interrupts the CPU at a certain period, the time data stored in the internal memory is incremented for a time corresponding to the period, and is acquired from the internal memory when the CPU needs the time data. This is characterized by the following method.

(1)ディジタル処理装置本体に搭載するCPUのソフトウェア処理によってI2Cバスを直接制御し、I2Cバスに接続されるデバイスとの間でデータを入出力し、前記デバイスの1つになる時計デバイスから前記I2Cバス経由で取得する時刻データを基にディジタル処理を行うディジタル処理装置において、
前記CPUは、
ディジタル処理装置の起動時に、前記時計デバイスから前記I2Cバス経由で時刻データを取得する過程と、
前記過程で取得した前記時刻データを前記ディジタル処理装置の内部メモリに保存する過程と、
内蔵タイマからの一定周期の割り込みの都度、該周期に相当する時間だけ前記内部メモリに保存する時刻データをインクリメントする過程と、
前記時刻データを必要とする時に前記内部メモリに保存する時刻データを読み出す過程と、
を備えたことを特徴とする。
(1) The I2C bus is directly controlled by software processing of a CPU mounted on the digital processing apparatus main body, data is input / output to / from a device connected to the I2C bus, and the clock device that is one of the devices In a digital processing apparatus that performs digital processing based on time data acquired via an I2C bus,
The CPU
Acquiring time data from the timepiece device via the I2C bus at the time of activation of the digital processing device;
Storing the time data acquired in the process in an internal memory of the digital processing device;
A process of incrementing time data stored in the internal memory for a time corresponding to the period each time an interrupt of a certain period from the built-in timer,
Reading the time data stored in the internal memory when the time data is needed;
It is provided with.

(2)ディジタル処理装置本体に搭載するCPUのソフトウェア処理によってI2Cバスを直接制御し、I2Cバスに接続されるデバイスとの間でデータを入出力し、前記デバイスの1つになる時計デバイスから前記I2Cバス経由で取得する時刻データを基にディジタル処理を行うディジタル処理装置において、
前記CPUは、
ディジタル処理装置の起動時に、前記時計デバイスから前記I2Cバス経由で時刻データを取得する過程と、
前記過程で取得した前記時刻データを前記ディジタル処理装置の内部メモリに保存する過程と、
内蔵タイマからの一定周期の割り込みの都度、該周期に相当する時間だけ前記内部メモリに保存する時刻データをインクリメントする過程と、
前記時刻データを必要とする時に前記内部メモリに保存する時刻データを読み出す過程と、
一定時間毎または特定される時刻に、前記時計デバイスから前記I2Cバス経由で時刻データを取得し、該時刻データで前記内部メモリに保存されている時刻データを書替える過程と、
を備えたことを特徴とする。
(2) The I2C bus is directly controlled by software processing of a CPU mounted on the digital processing apparatus main body, data is input to and output from a device connected to the I2C bus, and the clock device that is one of the devices In a digital processing apparatus that performs digital processing based on time data acquired via an I2C bus,
The CPU
Acquiring time data from the timepiece device via the I2C bus at the time of activation of the digital processing device;
Storing the time data acquired in the process in an internal memory of the digital processing device;
A process of incrementing time data stored in the internal memory for a time corresponding to the period each time an interrupt of a certain period from the built-in timer,
Reading the time data stored in the internal memory when the time data is needed;
Obtaining time data from the clock device via the I2C bus at regular time intervals or at a specified time, and rewriting the time data stored in the internal memory with the time data;
It is provided with.

以上のとおり、本発明によれば、I2Cバスを介して接続された時計デバイスへのアクセスは装置の起動時に1回だけ行い、このとき取得した時刻データを内部メモリに保存し、その後はCPUがもつ内部タイマによるCPUへの一定周期の割り込みの都度、該周期に相当する時間だけ内部メモリに保存する時刻データをインクリメントしておき、CPUが時刻データを必要とするときに内部メモリから取得するようにしたため、時計デバイスからCPUへの時刻データ取得に、CPUの制御時間を大幅に短縮してその負荷を大幅に軽減できる。   As described above, according to the present invention, the clock device connected via the I2C bus is accessed only once when the device is started up, and the time data acquired at this time is stored in the internal memory, after which the CPU The time data stored in the internal memory is incremented by the time corresponding to the period every time the CPU interrupts the CPU by a certain period, and the CPU acquires the time data from the internal memory when the time data is needed. Therefore, it is possible to greatly reduce the control time of the CPU and greatly reduce the load for acquiring time data from the clock device to the CPU.

さらに、一定時間毎または特定される時刻に、時計デバイスから時刻データを取得し、該時刻データで内部メモリに保存されている時刻データを書替えることにより、内部タイマの誤差による時刻データのズレを補正することができる。   Furthermore, by acquiring time data from the clock device at regular time intervals or at a specified time, and rewriting the time data stored in the internal memory with the time data, the time data shift due to the error of the internal timer It can be corrected.

(実施形態1)
図1は、本発明の実施形態を示すディジタル処理装置の構成図であり、ディジタルリレーに適用した場合である。
(Embodiment 1)
FIG. 1 is a block diagram of a digital processing apparatus showing an embodiment of the present invention, which is applied to a digital relay.

ディジタルリレーの基本構成は、マイクロコンピュータ構成で保護リレー演算をするディジタル演算部10と、保護対象からの電流や電圧信号をディジタルデータで取得するアナログ入力部20と、保護演算の整定値入力や保護対象のしゃ断器トリップ出力等のためのディジタル入出力部30と、上位コンピュータ等とのデータ通信のための伝送制御部40とをシステムバスで接続し、さらに外部装置として保護対象の動作状態等を表示するためのパネルディスプレイ装置50が接続される。   The basic configuration of the digital relay is as follows: a digital operation unit 10 that performs a protection relay operation in a microcomputer configuration; an analog input unit 20 that acquires a current and voltage signal from a protection target as digital data; and a set value for protection operation and protection The digital input / output unit 30 for trip output of the target circuit breaker and the transmission control unit 40 for data communication with the host computer or the like are connected by a system bus, and the operation state of the protection target as an external device A panel display device 50 for displaying is connected.

ディジタル演算部10は、同図にCPUボード構成例で示すように、CPU11と、保護演算プログラムを保存するフラッシュROM12と、内部データを保存するメモリ(RAM)13とを内部バスで接続する。CPU11は、直接接続したI2Cバスを介して、設定値等を保存する不揮発性メモリ14と、時刻データの歩進動作をするRTC(時計IC)15と、LCD(液晶)ドライバやスイッチなどその他のデバイス16との間のデータ入出力を可能にする。   As shown in the configuration example of the CPU board in the figure, the digital arithmetic unit 10 connects a CPU 11, a flash ROM 12 that stores a protection arithmetic program, and a memory (RAM) 13 that stores internal data via an internal bus. The CPU 11 includes a non-volatile memory 14 that stores setting values and the like, a RTC (clock IC) 15 that performs a time data stepping operation, an LCD (liquid crystal) driver, a switch, and other devices via a directly connected I2C bus. Data input / output with the device 16 is enabled.

以上までの基本構成になるディジタルリレーにおいて、本実施形態では、CPU11に内蔵するタイマ11Aなどの資源を利用して、フラッシュROM12等にプログラムとして保存しておく時刻データ取得制御ソフトウェアの実行によって時刻データを取得する。   In the digital relay having the basic configuration described above, in this embodiment, time data is obtained by executing time data acquisition control software stored as a program in the flash ROM 12 or the like using resources such as the timer 11A built in the CPU 11. To get.

上記の時刻データ取得制御ソフトウェアは、図2に時刻データ取得を主要処理として示すフローチャートに対応した構成とる。同図において、ディジタルリレーを起動したとき、メモリ13のクリアなど、各部および各種デバイスに必要な初期化を行う(S1)。次に、CPU11の命令実行により、I2Cバス経由でRTC15から時刻データをCPU11側に読み出し、この時刻データをメモリ13へ保存する(S2)。その後は、CPU11によるリレーデータ取得やリレー演算など、ディジタルリレーがもつ本来の処理を実行する(S3)。この処理(S3)に際して、時刻データが必要な場合は、RTC15からの取得に代えて、メモリ13に保存されている時刻データを読み出す。   The above time data acquisition control software has a configuration corresponding to the flowchart shown in FIG. In the figure, when the digital relay is activated, initialization necessary for each unit and various devices such as clearing the memory 13 is performed (S1). Next, the time data is read from the RTC 15 to the CPU 11 side via the I2C bus by executing the instruction of the CPU 11, and the time data is stored in the memory 13 (S2). Thereafter, the original processing of the digital relay such as relay data acquisition and relay calculation by the CPU 11 is executed (S3). In this process (S3), when the time data is necessary, the time data stored in the memory 13 is read instead of being acquired from the RTC 15.

ここで、メモリ13に保存されている時刻データは、内部タイマ11AによるCPU11への割り込みで更新されている(S4)。例えば、内部タイマ11Aは、1秒などの一定周期でCPU11に割り込みを発生し、この割り込みでCPU11がメモリ13に保存されている時刻データを更新(時分秒などの時刻データを一定周期の時間分に相当する値だけインクリメント)する。   Here, the time data stored in the memory 13 is updated by an interruption to the CPU 11 by the internal timer 11A (S4). For example, the internal timer 11A generates an interrupt to the CPU 11 at a constant cycle such as 1 second, and the CPU 11 updates time data stored in the memory 13 by this interrupt (time data such as hour / minute / second is updated at a fixed cycle time. Increment by a value corresponding to minutes).

したがって、RTC15へのアクセスは最初の処理(S2)の一回のみ行い、取得した時刻データをメモリ13に展開しておき、その後は、CPU11の内部タイマ11Aで割り込み処理を実行させ、メモリ13に展開された時刻データをソフトウェア的に歩進させておく。そして、CPU11が時刻データを取得する際は当該メモリ13の時刻データから取得する。   Therefore, the access to the RTC 15 is performed only once in the first process (S2), and the acquired time data is expanded in the memory 13, and then the interrupt process is executed by the internal timer 11A of the CPU 11, and the memory 13 The developed time data is advanced in software. And when CPU11 acquires time data, it acquires from the time data of the said memory 13. FIG.

図2に示す本実施形態のフローチャートと対比させるため、図3に従来の時刻データ取得処理のフローチャートを示す。図3では繰り返し行われる処理の1つとして、CPU11からRTC15へアクセスして時刻データを取得、メモリ13への保存を行う(S3B)。リレー演算などに時刻データが必要な場合は、メモリ13に保存された時刻データを用いて処理を行う(S3A)。繰り返し行われるRTC15へのアクセス(S3B)は、前記のように、1回の読み出しに数十μs〜数百μsに渡る信号制御時間を要し、CPUの負荷を高めてしまう。   For comparison with the flowchart of the present embodiment shown in FIG. 2, a flowchart of a conventional time data acquisition process is shown in FIG. In FIG. 3, as one of repeated processes, the CPU 11 accesses the RTC 15 to acquire time data and store it in the memory 13 (S3B). When time data is required for relay calculation or the like, processing is performed using the time data stored in the memory 13 (S3A). Repeated access to the RTC 15 (S3B) requires a signal control time of several tens of μs to several hundreds of μs for one reading as described above, and increases the load on the CPU.

以上のとおり、本実施形態では、RTC15に対する時刻データの初期設定と最初の1回の読み出しを行う場合以外はアクセスを行う必要がなく、これにより、I2Cバス経由のRTC15へのアクセス頻度、回数を極力削減することができ、CPU11の制御時間の大幅な削減及び無駄な処理を無くすことができる。   As described above, in the present embodiment, it is not necessary to perform access except for the initial setting of the time data to the RTC 15 and the first reading, and thus the access frequency and the number of times to the RTC 15 via the I2C bus can be set. As much as possible, the control time of the CPU 11 can be greatly reduced and useless processing can be eliminated.

(実施形態2)
本実施形態のフローチャートを図4に示し、実施形態1の処理に加えて、定周期でRTCから時刻データを取得して内部メモリの時刻データを書替える方法とする。
(Embodiment 2)
A flowchart of this embodiment is shown in FIG. 4, and in addition to the processing of the first embodiment, the time data is acquired from the RTC at a fixed cycle and the time data in the internal memory is rewritten.

実施形態1では時刻データの設定を行う場合以外は、初期化時の一回のみしかアクセスを行わないが、本実施形態では一定時間(例えば1時間)の経過を待ち(S5)、この時刻に一回だけRTC15から時刻データを読み出し、初期化時に展開したメモリ13へ再度、展開する(S6)。   In the first embodiment, except for the case of setting time data, access is performed only once at the time of initialization. However, in this embodiment, a certain time (for example, one hour) is waited (S5), and at this time The time data is read from the RTC 15 only once and expanded again in the memory 13 expanded at initialization (S6).

本実施形態によれば、内部タイマ11Aの誤差による時刻データのズレを一定周期(またはCPU11における特定の処理終了時など)で補正することが可能になる。   According to the present embodiment, it is possible to correct a time data shift due to an error of the internal timer 11A at a constant cycle (or at the end of a specific process in the CPU 11).

なお、以上までの実施形態はディジタルリレーに適用した場合を示すが、本発明は時刻データを必要とする他のディジタル処理装置に適用して同等の作用効果を得ることができる。例えば、定周期に監視情報を取得する遠方監視制御装置、時刻データを基に機器の制御内容や処理内容を切り替えるプログラマブルコントローラや自動制御装置などに適用できる。   Although the above embodiments show the case where the present invention is applied to a digital relay, the present invention can be applied to other digital processing devices that require time data to obtain the same effect. For example, the present invention can be applied to a remote monitoring and control device that acquires monitoring information at regular intervals, a programmable controller or an automatic control device that switches control contents and processing contents of devices based on time data.

本発明の実施形態1を示すディジタルリレー基本構成およびCPUボード例。The digital relay basic composition and CPU board example which show Embodiment 1 of this invention. 実施形態1における時刻データ取得方法のフローチャート。5 is a flowchart of a time data acquisition method according to the first embodiment. 従来のRTCアクセス例のフローチャート。The flowchart of the example of the conventional RTC access. 本発明の実施形態2における時刻データ取得方法のフローチャート。The flowchart of the time data acquisition method in Embodiment 2 of this invention. I2Cバスの接続構成例。The connection structural example of an I2C bus.

符号の説明Explanation of symbols

10 演算部
11 CPU
11A 内部タイマ
12 フラッシュROM
13 内部メモリ(RAM)
14 不揮発性メモリ
15 RTC(時計ICデバイス)
16 その他デバイス
10 arithmetic unit 11 CPU
11A Internal timer 12 Flash ROM
13 Internal memory (RAM)
14 Nonvolatile memory 15 RTC (clock IC device)
16 Other devices

Claims (2)

ディジタル処理装置本体に搭載するCPUのソフトウェア処理によってI2Cバスを直接制御し、I2Cバスに接続されるデバイスとの間でデータを入出力し、前記デバイスの1つになる時計デバイスから前記I2Cバス経由で取得する時刻データを基にディジタル処理を行うディジタル処理装置において、
前記CPUは、
ディジタル処理装置の起動時に、前記時計デバイスから前記I2Cバス経由で時刻データを取得する過程と、
前記過程で取得した前記時刻データを前記ディジタル処理装置の内部メモリに保存する過程と、
内蔵タイマからの一定周期の割り込みの都度、該周期に相当する時間だけ前記内部メモリに保存する時刻データをインクリメントする過程と、
前記時刻データを必要とする時に前記内部メモリに保存する時刻データを読み出す過程と、
を備えたことを特徴とするディジタル処理装置における時刻データ取得方法。
The I2C bus is directly controlled by software processing of the CPU mounted on the digital processing apparatus main body, data is input / output to / from the device connected to the I2C bus, and the clock device that is one of the devices passes through the I2C bus. In a digital processing apparatus that performs digital processing based on time data acquired in
The CPU
Acquiring time data from the timepiece device via the I2C bus at the time of activation of the digital processing device;
Storing the time data acquired in the process in an internal memory of the digital processing device;
A process of incrementing time data stored in the internal memory for a time corresponding to the period each time an interrupt of a certain period from the built-in timer,
Reading the time data stored in the internal memory when the time data is needed;
A time data acquisition method in a digital processor characterized by comprising:
ディジタル処理装置本体に搭載するCPUのソフトウェア処理によってI2Cバスを直接制御し、I2Cバスに接続されるデバイスとの間でデータを入出力し、前記デバイスの1つになる時計デバイスから前記I2Cバス経由で取得する時刻データを基にディジタル処理を行うディジタル処理装置において、
前記CPUは、
ディジタル処理装置の起動時に、前記時計デバイスから前記I2Cバス経由で時刻データを取得する過程と、
前記過程で取得した前記時刻データを前記ディジタル処理装置の内部メモリに保存する過程と、
内蔵タイマからの一定周期の割り込みの都度、該周期に相当する時間だけ前記内部メモリに保存する時刻データをインクリメントする過程と、
前記時刻データを必要とする時に前記内部メモリに保存する時刻データを読み出す過程と、
一定時間毎または特定される時刻に、前記時計デバイスから前記I2Cバス経由で時刻データを取得し、該時刻データで前記内部メモリに保存されている時刻データを書替える過程と、
を備えたことを特徴とするディジタル処理装置における時刻データ取得方法。
The I2C bus is directly controlled by software processing of the CPU mounted on the digital processing apparatus main body, data is input / output to / from the device connected to the I2C bus, and the clock device that is one of the devices passes through the I2C bus. In a digital processing apparatus that performs digital processing based on time data acquired in
The CPU
Acquiring time data from the timepiece device via the I2C bus at the time of activation of the digital processing device;
Storing the time data acquired in the process in an internal memory of the digital processing device;
A process of incrementing time data stored in the internal memory for a time corresponding to the period each time an interrupt of a certain period from the built-in timer,
Reading the time data stored in the internal memory when the time data is needed;
Obtaining time data from the clock device via the I2C bus at regular time intervals or at a specified time, and rewriting the time data stored in the internal memory with the time data;
A time data acquisition method in a digital processor characterized by comprising:
JP2004362219A 2004-12-15 2004-12-15 Method for obtaining time data in digital processing device Pending JP2006172030A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004362219A JP2006172030A (en) 2004-12-15 2004-12-15 Method for obtaining time data in digital processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004362219A JP2006172030A (en) 2004-12-15 2004-12-15 Method for obtaining time data in digital processing device

Publications (1)

Publication Number Publication Date
JP2006172030A true JP2006172030A (en) 2006-06-29

Family

ID=36672731

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004362219A Pending JP2006172030A (en) 2004-12-15 2004-12-15 Method for obtaining time data in digital processing device

Country Status (1)

Country Link
JP (1) JP2006172030A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010067030A (en) * 2008-09-11 2010-03-25 Yokogawa Denshikiki Co Ltd Navigation apparatus
JP2010085227A (en) * 2008-09-30 2010-04-15 Brother Ind Ltd Electronic device
CN116149160A (en) * 2023-01-10 2023-05-23 均胜群英(南京)新能源汽车系统研究院有限公司 A system time timing method based on vehicle charging pile

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04134511A (en) * 1990-09-27 1992-05-08 Seiko Epson Corp information processing equipment
JP2002243875A (en) * 2001-02-16 2002-08-28 Nec Corp Terminal device and method of controlling real-time clock
JP2003271263A (en) * 2002-03-15 2003-09-26 Toshiba Corp Information processing apparatus, time information control method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04134511A (en) * 1990-09-27 1992-05-08 Seiko Epson Corp information processing equipment
JP2002243875A (en) * 2001-02-16 2002-08-28 Nec Corp Terminal device and method of controlling real-time clock
JP2003271263A (en) * 2002-03-15 2003-09-26 Toshiba Corp Information processing apparatus, time information control method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010067030A (en) * 2008-09-11 2010-03-25 Yokogawa Denshikiki Co Ltd Navigation apparatus
JP2010085227A (en) * 2008-09-30 2010-04-15 Brother Ind Ltd Electronic device
US8402299B2 (en) 2008-09-30 2013-03-19 Brother Kogyo Kabushiki Kaisha Electronics device having timekeeping function and computer-readable record medium storing program for timekeeping function
CN116149160A (en) * 2023-01-10 2023-05-23 均胜群英(南京)新能源汽车系统研究院有限公司 A system time timing method based on vehicle charging pile
CN116149160B (en) * 2023-01-10 2025-06-20 均胜群英(南京)新能源汽车系统研究院有限公司 A system time timing method based on vehicle charging pile

Similar Documents

Publication Publication Date Title
US20090135678A1 (en) Electronic circuit controlling the operation of peripheral members of the watch
CN113671894B (en) Functional unit and control device
EP0657793A1 (en) Radio-corrected electronic timepiece
JP2006172030A (en) Method for obtaining time data in digital processing device
JP7040081B2 (en) Timer measuring device, electronic clock, timer measuring method and program
CN111694697A (en) Semiconductor device and debug system
JP6816765B2 (en) Vehicle display device
JP2004252702A (en) IIC device access method for control circuit with IIC bus
JP2007079670A (en) Screen data generation device
JP5251353B2 (en) Information processing device
KR101900729B1 (en) Method for running PLC operating system
CN108628699B (en) ECC-based FLASH data exception processing method and device
CN113176935A (en) Intelligent updating method and device for timed task, electronic equipment and storage medium
CN115355594B (en) A timed remote control method based on time correction
JP7482751B2 (en) Register Control Unit
JP7505315B2 (en) Image processing device and setting data management system
CN110299118B (en) Liquid crystal control circuit, electronic watch and liquid crystal control method
US4468133A (en) Electronic timepiece
JP6437158B1 (en) Engineering tools
GB2143656A (en) Electronic timepiece with microprocessor
JPS599732A (en) Automatic correcting system of timer
JPS6217847Y2 (en)
JP5564854B2 (en) Control device
JP2023161696A (en) Real-time clock module and electronic equipment
JPS623458B2 (en)

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090901

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100406