TWI781031B - Calibration method and electronic device thereto - Google Patents
Calibration method and electronic device thereto Download PDFInfo
- Publication number
- TWI781031B TWI781031B TW110149272A TW110149272A TWI781031B TW I781031 B TWI781031 B TW I781031B TW 110149272 A TW110149272 A TW 110149272A TW 110149272 A TW110149272 A TW 110149272A TW I781031 B TWI781031 B TW I781031B
- Authority
- TW
- Taiwan
- Prior art keywords
- level
- value
- waveform
- output waveform
- input
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000006243 chemical reaction Methods 0.000 claims description 17
- 230000008859 change Effects 0.000 claims description 10
- 238000012937 correction Methods 0.000 claims description 9
- 206010072268 Drug-induced liver injury Diseases 0.000 claims description 3
- 101100420776 Arabidopsis thaliana SYN1 gene Proteins 0.000 description 20
- VUDQSRFCCHQIIU-UHFFFAOYSA-N DIF1 Natural products CCCCCC(=O)C1=C(O)C(Cl)=C(OC)C(Cl)=C1O VUDQSRFCCHQIIU-UHFFFAOYSA-N 0.000 description 20
- 101150001108 DIF1 gene Proteins 0.000 description 20
- 238000001514 detection method Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 10
- 101100396286 Homo sapiens IER3 gene Proteins 0.000 description 8
- 102100036900 Radiation-inducible immediate-early gene IEX-1 Human genes 0.000 description 8
- 101100194363 Schizosaccharomyces pombe (strain 972 / ATCC 24843) res2 gene Proteins 0.000 description 6
- 101100194362 Schizosaccharomyces pombe (strain 972 / ATCC 24843) res1 gene Proteins 0.000 description 4
- 230000007423 decrease Effects 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/16—Controlling the light source by timing means
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/10—Controlling the light source
- H05B47/175—Controlling the light source by remote control
-
- H—ELECTRICITY
- H05—ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
- H05B—ELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
- H05B47/00—Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
- H05B47/20—Responsive to malfunctions or to light source life; for protection
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/40—Control techniques providing energy savings, e.g. smart controller or presence detection
Landscapes
- Dc Digital Transmission (AREA)
- Measurement Of Current Or Voltage (AREA)
- Tests Of Electronic Circuits (AREA)
- Analysing Materials By The Use Of Radiation (AREA)
Abstract
Description
本發明係有關於一種電子裝置,特別是有關於一種使用一數位可定址照明介面(digital addressable lighting interface;DALI)的電子裝置。The present invention relates to an electronic device, in particular to an electronic device using a digital addressable lighting interface (DALI).
數位可定址照明介面(digital addressable lighting interface;DALI)通常應用於照明控制系統中。一主機裝置可藉由DALI,關啟或關閉遠端的照明設備,或是調整遠端照明設備的亮度。A digital addressable lighting interface (DALI) is generally used in a lighting control system. A host device can turn on or off the remote lighting equipment, or adjust the brightness of the remote lighting equipment through DALI.
本發明之一實施例提供一種校正方法,用以校正一輸出波形,該校正方法包括,偵測輸出波形;當輸出波形由一第一位準轉為一第二位準時,致能一計時器;偵測一輸入波形;當輸入波形由一第三位準轉為一第四位準時,讀取計時器,用以得到一計數值;當計數值大於一標準值時,減少輸出波形維持於第二位準的時間;當計數值小於標準值時,增加輸出波形維持於第二位準的時間。One embodiment of the present invention provides a calibration method for calibrating an output waveform. The calibration method includes: detecting the output waveform; when the output waveform changes from a first level to a second level, enabling a timer ;Detect an input waveform; when the input waveform changes from a third level to a fourth level, read the timer to obtain a count value; when the count value is greater than a standard value, reduce the output waveform to maintain at The time of the second level; when the count value is less than the standard value, increase the time for the output waveform to maintain the second level.
本發明之另一實施例提供一種電子裝置,透過一數位可定址照明介面匯流排,與一終端裝置進行溝通。本發明之電子裝置包括一控制電路、一第一輸入輸出電路、一轉換電路以及一第二輸入輸出電路。控制電路產生一輸出波形。第一輸入輸出電路用以輸出輸出波形。轉換電路轉換輸出波形,用以產生一差動信號對予數位可定址照明介面匯流排,並轉換數位可定址照明介面匯流排接收到的一回覆,用以產生一輸入波形。第二輸入輸出電路接收輸入波形,並提供輸入波形予控制電路。當輸出波形由一第一位準轉為一第二位準時,控制電路致能一計時器。當輸入波形由一第三位準轉為一第四位準時,控制電路讀取計時器,用以得到一計數值。當計數值大於一標準值時,控制電路減少輸出波形維持於第二位準的時間。當計數值小於標準值時,控制電路增加輸出波形維持於第二位準的時間。Another embodiment of the present invention provides an electronic device that communicates with a terminal device through a digital addressable lighting interface bus. The electronic device of the present invention includes a control circuit, a first input-output circuit, a conversion circuit and a second input-output circuit. The control circuit generates an output waveform. The first input-output circuit is used for outputting output waveforms. The conversion circuit converts the output waveform to generate a differential signal pair to the DILI bus, and converts a reply received by the DILI bus to generate an input waveform. The second input-output circuit receives the input waveform and provides the input waveform to the control circuit. When the output waveform changes from a first level to a second level, the control circuit enables a timer. When the input waveform changes from a third level to a fourth level, the control circuit reads the timer to obtain a count value. When the count value is greater than a standard value, the control circuit reduces the time for the output waveform to maintain the second level. When the count value is less than the standard value, the control circuit increases the time for the output waveform to maintain the second level.
本發明之校正方法可經由本發明之電子裝置來實作,其為可執行特定功能之硬體或韌體,亦可以透過程式碼方式收錄於一紀錄媒體中,並結合特定硬體來實作。當程式碼被電子裝置、處理器、電腦或機器載入且執行時,電子裝置、處理器、電腦或機器變成用以實行本發明之電子裝置。The correction method of the present invention can be implemented through the electronic device of the present invention, which is hardware or firmware capable of executing specific functions, and can also be recorded in a recording medium through program code and combined with specific hardware to implement . When the program code is loaded and executed by the electronic device, processor, computer or machine, the electronic device, processor, computer or machine becomes an electronic device for implementing the present invention.
為讓本發明之目的、特徵和優點能更明顯易懂,下文特舉出實施例,並配合所附圖式,做詳細之說明。本發明說明書提供不同的實施例來說明本發明不同實施方式的技術特徵。其中,實施例中的各元件之配置係為說明之用,並非用以限制本發明。另外,實施例中圖式標號之部分重覆,係為了簡化說明,並非意指不同實施例之間的關聯性。In order to make the purpose, features and advantages of the present invention more comprehensible, the following specifically cites the embodiments, together with the accompanying drawings, for a detailed description. The description of the present invention provides different examples to illustrate the technical features of different implementations of the present invention. Wherein, the arrangement of each element in the embodiment is for illustration, not for limiting the present invention. In addition, the partial repetition of the symbols in the figures in the embodiments is for the purpose of simplifying the description, and does not imply the relationship between different embodiments.
第1圖為本發明之控制系統的示意圖。如圖所示,控制系統100包括一主機裝置110、終端裝置121~123以及一匯流排130。主機裝置110(或稱電子裝置)透過一數位可定址照明介面(digital addressable lighting interface;DALI)141耦接匯流排130,用以發出一DALI訊息予一特定終端裝置(如121),並接收來自該特定終端裝置的回覆。Fig. 1 is a schematic diagram of the control system of the present invention. As shown in the figure, the
終端裝置121具有一DALI 142。DALI 142耦接匯流排130,用以接收來自主機裝置110的DALI訊息。當主機裝置110所發出的DALI訊息係指向終端裝置121時,終端裝置121執行來自主機裝置110的指令,如調整光線強度、或是調整內部參數。在一些實施例中,終端裝置121透過DALI 142發出一回覆予主機裝置110。本發明並不限定終端裝置121的種類。在一可能實施例中,終端裝置121可能是一照明設備、一電壓轉換電路、或是一傳感器。The
終端裝置122具有一DALI 143。DALI 143耦接匯流排130,用以接收來自主機裝置110的DALI訊息。終端裝置123具有一DALI 144。DALI 144耦接匯流排130,用以接收來自主機裝置110的DALI訊息。由於終端裝置122及123的特性相同於終端裝置121,故不再贅述。The
本發明並不限定終端裝置121~123的種類。在一可能實施例中,終端裝置121~123具有相同的種類。舉例而言,終端裝置121~123均為照明設備、電壓轉換電路、或是傳感器。在另一可能實施例中,終端裝置121~123之一者的種類可能相同或不同於終端裝置121~123之另一者的種類。在此例中,終端裝置121可能是一照明設備,而終端裝置122係為一傳感器。另外,本發明並不限定終端裝置的數量。在其它實施例中,控制系統100具有其它數量的終端裝置。The present invention does not limit the types of the terminal devices 121 - 123 . In a possible embodiment, the terminal devices 121 - 123 are of the same type. For example, the terminal devices 121 - 123 are lighting equipment, voltage conversion circuits, or sensors. In another possible embodiment, the type of one of the terminal devices 121-123 may be the same as or different from that of the other terminal device 121-123. In this example, the
第2圖為本發明之主機裝置的示意圖。主機裝置200包括一控制電路210、輸入輸出電路220、230以及一轉換電路240。在一些實施例中,主機裝置200的架構也可應用於第1圖中的終端裝置121~123中。Fig. 2 is a schematic diagram of the host device of the present invention. The
控制電路210產生一輸出波形TX。輸入輸出電路220用以輸出輸出波形TX。轉換電路240轉換輸出波形TX,用以產生差動信號DIF1及DIF2。差動信號DIF1及DIF2的振幅相同,但相位相反。因此,差動信號DIF1及DIF2構成一差動信號對。The
在本實施例中,轉換電路240具有一DALI 241。DALI 241用以輸出差動信號DIF1及DIF2至匯流排130。在一可能實施例中,匯流排130可稱為一DALI匯流排130。在其它實例中,DALI 241接收來自匯流排130的回覆,如差動信號RES1及RES2。轉換電路240轉換回覆信號RES11及RES2,用以產生一輸入波形RX。在此例中,回覆信號RES11及RES2的振幅相同,但相位相反。In this embodiment, the
輸入輸出電路230接收輸入波形RX,並提供輸入波形RX予控制電路210。在一可能實施例中,控制電路210偵測輸出波形TX及輸入波形RX的位準變化,用以判斷輸入輸出電路220至匯流排130的硬體元件所造成的延遲時間以及輸入輸出電路230至匯流排130的硬體元件所造成的延遲時間。在其它實施例中,控制電路210、輸入輸出電路220及230構成一微控制電路(micro-controller unit;MCU)。The input-
第3A圖為輸出波形TX與輸入波形RX的示意圖。在時間點310,輸出波形TX由一第一位準轉為一第二位準。因此,控制電路210啟動一計時器。在本實施例中,第一位準為一低位準,第二位準為一高位準。在其它實施例中,第一位準為一高位準,第二位準為一低位準。FIG. 3A is a schematic diagram of the output waveform TX and the input waveform RX. At
在一些實施例中,當輸出波形TX進入轉換電路240時,轉換電路240將輸出波形TX轉換成差動信號DIF1及DIF2。由於差動信號DIF1及DIF2的特性相似,故第3A圖僅顯示差動信號DIF1。如圖所示,在時間點310,差動信號DIF1的位準也會發生變化,如由一高位準變化至一低位準。在此例中,在時間點310前,差動信號DIF1的相位反相於輸出波形TX的相位在其它實施例中,在時間點310,差動信號DIF1的位準可能由一低位準變化至一高位準。在此例中,在時間點310前,差動信號DIF1的相位相同於輸出波形TX的相位。In some embodiments, when the output waveform TX enters the
匯流排130上的一特定終端裝置(如121)會根據差動信號DIF1及DIF2,提供回覆信號RES1及RES2。轉換電路240轉換回覆信號RES1及RES2,用以產生輸入波形RX。控制電路210偵測輸入波形RX的位準變化。A specific terminal device (such as 121 ) on the
在時間點320,輸入波形RX的位準等於一臨界值,故控制電路210擷取計時器的計數值A。計數值A反應差動信號DIF1由高位準轉為低位準時,輸入波形RX因硬體造成的延遲時間。舉例而言,計數值A為由匯流排130至輸入輸出電路230(或220)之間的硬體元件所造成的延遲時間。At
在時間點330,輸入波形RX的位準由一第三位準轉為一第四位準,故控制電路210擷取計時器的計數值B(或稱第一數值)。計數值B大約可以反應出差動信號DIF1的相位變化時間。在本實施例中,第三位準為一高位準,第四位準為一低位準。在其它實施例中,第三位準為一低位準,第四位準為一高位準。另外,在時間點310前,輸入波形RX的位準相同於輸出波形TX的位準,但並非用以限制本發明。在其它實施例中,在時間點310前,輸入波形RX的位準可能不同於輸出波形TX的位準。舉例而言,在時間點310前,輸入波形RX為高位準,或是輸出波形TX為高位準。At
在本實施例中,控制電路210根據一設定值H_TIME,控制輸出波形TX維持於第二位準(如高位準)的時間。在此例中,當計數值B大於一標準值時,控制電路210減少設定值H_TIME。因此,輸出波形TX維持於第二位準的時間變短。當計數值B小於標準值時,控制電路210增加設定值H_TIME。因此,輸出波形TX維持於第二位準的時間變長。In this embodiment, the
在一些實施例中,控制電路210將設定值H_TIME減去計數值A,得到一延遲數值C。延遲數值C反應輸出波形TX由第二位準(高位準)轉為第一位準(低位準)時,差動信號DIF1因硬體所造成時間上的延遲時間。舉例而言,延遲數值C為匯流排130至輸入輸出電路220(或230)之間的硬體元件所造成的延遲時間。在其它實施例中,控制電路210將計數值B減去設定值H_TIME,用以得知輸出波形TX由第二位準(高位準)轉為第一位準(低位準)時,差動信號DIF1因硬體所造成的延遲時間。In some embodiments, the
第3B圖為輸出波形TX與輸入波形RX的另一示意圖。第3B圖相似於第3A圖,不同之處在於第3B圖的輸出波形TX反相於第3A圖的輸出波形TX。在本實施例中,在時間點340前,輸出波形TX的相位相同於差動信號DIF1的相位,並反相於輸入波形RX。FIG. 3B is another schematic diagram of the output waveform TX and the input waveform RX. FIG. 3B is similar to FIG. 3A, except that the output waveform TX of FIG. 3B is inverted from the output waveform TX of FIG. 3A. In this embodiment, before the
在時間點340,輸出波形TX由一第一位準轉為一第二位準。因此,控制電路210啟動一計時器。在本實施例中,第一位準為一高位準,第二位準為一低位準。在時間點340,輸入波形RX的位準逐漸上升。At
在時間點350,輸入波形RX的位準等於一臨界值,故控制電路210擷取計時器的計數值D。在時間點360,輸入波形RX的位準由一第三位準轉為一第四位準,故控制電路210擷取計時器的計數值E。由於計數值D與E的特性相同於計數值A及B的特性,故不再贄述。在本實施例中,第三位準為一高位準,第四位準為一低位準。At
控制電路210根據計數值E,調整一設定值L_TIME。舉例而言,當計數值E大於一標準值時,控制電路210減少設定值L_TIME。因此,輸出波形TX維持於第二位準(如低位準)的時間變短。當計數值E小於標準值時,控制電路210增加設定值L_TIME。因此,輸出波形TX維持於第二位準的時間變長。在一些實施例中,控制電路210將設定值L_TIME減去計數值D後,可得到一延遲數值F。由於延遲數值F的特性相同於延遲數值C,故不再贅述。在其它實施例中,控制電路210係將計數值E減去設定值L_TIME,用以得知輸出波形TX由第二位準(低位準)轉為第一位準(高位準)時,差動信號DIF1因硬體所造成的延遲時間。The
第3C圖為輸出波形TX與輸入波形RX的另一示意圖。第3C圖相似於第3A圖,不同之處在於第3C圖的輸出波形TX維持於第二位準(如高位準)的時間係為第3A圖的輸出波形TX維持於第二位準的時間的兩倍。FIG. 3C is another schematic diagram of the output waveform TX and the input waveform RX. Figure 3C is similar to Figure 3A, except that the time during which the output waveform TX in Figure 3C is maintained at the second level (such as a high level) is the time during which the output waveform TX in Figure 3A is maintained at the second level twice as much.
在時間點370,輸出波形TX由一第一位準轉為一第二位準。因此,控制電路210啟動一計時器。在時間點380,輸入波形RX的位準等於一臨界值,故控制電路210擷取計時器的計數值G。在時間點390,輸入波形RX的位準由一第三位準轉為一第四位準,故控制電路210擷取計時器的計數值I。由於計數值G與I的特性相同於計數值A及B的特性,故不再贄述。At
在本實施例中,控制電路210根據設定值H_TIME,設定輸出波形TX維持於第二位準。在時間點385,控制電路210根據同一設定值H_TIME,設定輸出波形TX維持於第二位準。在此例中,控制電路210根據計數值I,調整一設定值H_TIME。In this embodiment, the
舉例而言,當計數值I大於一標準值時,控制電路210減少設定值H_TIME。因此,輸出波形TX維持於第二位準(如高位準)的時間變短。當計數值I小於標準值時,控制電路210增加設定HL_TIME。因此,輸出波形TX維持於第二位準的時間變長。在一些實施例中,控制電路210將設定值H_TIME減去計數值G後,可得到一延遲數值K。由於延遲數值K的特性相同於第3A圖的延遲數值C,故不再贅述。在其它實施例中,控制電路210係將計數值I減去兩倍的設定值H_TIME,用以得知輸出波形TX由第二位準(高位準)轉為第一位準(低位準)時,差動信號DIF1因硬體所造成的延遲時間。For example, when the count value I is greater than a standard value, the
第4圖為本發明之DALI訊息的示意圖。如圖所示,在DALI訊息(DALI frame)中,每一位元資料係由兩位準所構成。舉例而言,位元資料BT i包括一高位準HV1以及一低位準LV1,用以表示一第一數值,如0。位元資料BT i-1包括一低位準LV2以及一高位準HV2,用以表示一第二數值,如1。位元資料BT i-2包括一高位準HV3以及一低位準LV3,用以表示第一數值。 Fig. 4 is a schematic diagram of the DALI message of the present invention. As shown in the figure, in a DALI message (DALI frame), each bit of data is composed of two bits. For example, the bit data BT i includes a high level HV1 and a low level LV1 for representing a first value, such as 0. The bit data BT i-1 includes a low level LV2 and a high level HV2 for representing a second value, such as 1. The bit data BT i-2 includes a high level HV3 and a low level LV3 for representing the first value.
高位準HV1~HV3均相同,大約位於10~22V之間。低位準LV1~LV3均相同,大約為0V。在本實施例中,高位準HV1及低位準LV1各自的持續時間稱為半位元時間HTM。位元資料BT i的位元時間BTM為兩倍的半位元時間HTM。同樣地,高位準HV2及低位準LV2之每一者的持續時間均為半位元時間HTM。因此,位元資料BT i-1的位元時間BTM為兩倍的半位元時間HTM。在其它實施例中,低位準LV1及LV2的總持續時間稱為雙半位元時間(double half time)。另外,高位準HV2及HV3的總持續時間也稱為雙半位元時間。 The high voltage levels HV1~HV3 are all the same, about 10~22V. Low level LV1~LV3 are the same, about 0V. In this embodiment, the respective durations of the high level HV1 and the low level LV1 are referred to as half-bit times HTM. The bit time BTM of the bit data BT i is twice the half bit time HTM. Likewise, the duration of each of the high level HV2 and the low level LV2 is a half-bit time HTM. Therefore, the bit time BTM of the bit data BT i-1 is twice the half bit time HTM. In other embodiments, the total duration of the low levels LV1 and LV2 is called double half time. In addition, the total duration of the high levels HV2 and HV3 is also referred to as a double nibble time.
在本實施例中,每一半位元時間HTM即為設定值H_TIME與數值C的總合。控制電路210校正設定值H_TIME,使得半位元時間HTM位於一目標範圍內,如366.7us~466.7us。在此例中,雙半位元時間可落在733.3us~933.3us之間。In this embodiment, each nibble time HTM is the sum of the set value H_TIME and the value C. The
控制電路210根據輸出波形TX與輸入波形RX的位準變化,得知硬體元件(如轉換電路240)所造成的延遲時間。因此,控制電路210根據元件的延遲時間,校正設定值H_TIME,使得半位元時間HTM位於一目標範圍內。The
在其它實施例中,由於半位元時間HTM可能會受到溫度的影響,故第2圖的主機裝置200更包括一溫度感測器(未顯示),用以偵測一環境溫度。在此例中,當環境溫度脫離一預設溫度範圍時,控制電路210進入一校正模式。在校正模式下,控制電路210偵測輸出波形TX及輸入波形RX,用以得知輸出波形TX由第一位準轉為第二位準的時間點(如310)以及輸入波形RX由第三位準轉為第四位準的時間點(如330)。控制電路210根據時間點310及330之間的時間間隔,校正設定值H_TIME。In other embodiments, since the HTM may be affected by temperature, the
在一些實施例中,控制電路210係根據一外部溫度感測器(未顯示)的感測結果,校正設定值H_TIME。在此例中,外部溫度感測器可能設置於一終端裝置(如第1圖的終端裝置121)之中。控制電路210可能發出一DALI訊息,要求終端裝置121告知環境溫度。在此例中,主機裝置200不需額外設置一溫度感測器。In some embodiments, the
在另一實施例中,主機裝置200更包括一電壓感測電路(未顯示),用以偵測匯流排130的電壓。當匯流排130的電壓脫離一預設電壓範圍(如0~10V)時,控制電路210進入校正模式。在校正模式下,控制電路210根據輸出波形TX與輸入波形RX的位準變化,校正設定值H_TIME。在其它實施例中,電壓感測電路可能設置於一終端裝置(如第1圖的終端裝置121)之中。在此例中,控制電路210可能發出一DALI訊息,要求終端裝置121告知匯流排130的電壓。因此,主機裝置200不需額外設置一電壓感測電路。In another embodiment, the
在一些實施例中,控制電路210具有一衝突檢測功能。控制電路210在輸出輸出波形TX前,控制電路210先檢測輸出波形TX與輸入波形RX,用以判斷匯流排130上是否有其它訊號。在此例中,控制電路210判斷輸出波形TX的位準是否相同於輸入波形RX的位準。當輸出波形TX的位準不同於輸入波形RX的位準時,控制電路210判斷計數值A是否落於一有效範圍內。當計數值A落於一有效範圍內,表示無衝突發生。因此,控制電路210根據輸入波形RX而動作。然而,當計數值A未落於有效範圍內時,控制電路210根據一衝突設定值,控制輸出波形TX的位準,用以破壞匯流排130上的訊號。在一可能實施例中,控制電路210判斷匯流排130上的位準是否穩定。當匯流排130上的位準穩定時,表示衝突已解決。因此,控制電路210偵測輸出波形TX及輸入波形RX的位準,用以決定是否進入校正模式。In some embodiments, the
在其它實施例中,第1圖的終端裝置121~123之每一者具有一衝突檢測功能。以終端裝置121為例,在終端裝置121輸出一回覆予匯流排130前,終端裝置121先判斷匯流排130上是否有其它訊號。如果匯流排130有其它訊號,終端裝置121可能輸出一預設波形至匯流排130。在匯流排130沒有訊號後,終端裝置121再提供回覆至匯流排130。In other embodiments, each of the terminal devices 121 - 123 in FIG. 1 has a collision detection function. Taking the
第5圖為本發明之校正方法的流程示意圖。本發明的校正方法500係用以校正一輸出波形,如第3A圖的TX。該輸出波形係提供予一轉換電路,如第2圖的轉換電路240。該轉換電路將該輸出波形轉換成一差動信號對,並透過一通訊介面,如第2圖的DALI 241,輸出該差動信號對予一匯流排,如第2圖的匯流排130。該通訊介面係為一數位可定址照明介面。Fig. 5 is a schematic flow chart of the calibration method of the present invention. The
首先,偵測輸出波形(步驟S511)。以第2圖為例,步驟S511係偵測輸入輸出電路220輸出的輸出波形TX的位準。接著,判斷輸出波形是否由一第一位準轉為一第二位準(步驟S512)。第一位準相對於第二位準。舉例而言,當第一位準為一低位準時,第二位準為一高位準。當第一位準為一高位準時,第二位準為一低位準。First, the output waveform is detected (step S511). Taking FIG. 2 as an example, step S511 is to detect the level of the output waveform TX output by the input-
當輸出波形未由一第一位準轉為一第二位準時,回到步驟S511。然而,當輸出波形由一第一位準轉為一第二位準時,致能一計時器(步驟S513)。接著,偵測一輸入波形(步驟S514)。以第2圖例,步驟S514係偵測輸入輸出電路230所接收到的輸入波形RX。When the output waveform does not change from a first level to a second level, go back to step S511. However, when the output waveform changes from a first level to a second level, a timer is enabled (step S513 ). Next, detect an input waveform (step S514). Taking the second figure as an example, step S514 is to detect the input waveform RX received by the input-
判斷輸入波形是否由一第三位準轉為一第四位準(步驟S515)。第三位準相對於第四位準。舉例而言,當第三位準為一高位準時,第四位準為一位位準。當第三位準為一低位準時,第四位準為一高位準。在一些實施例中,第三位準相同於第一位準。在此例中,第四位準相同於第二位準。在其它實施例中,第三位準相同於第二位準。在此例中,第四位準相同於第一位準。It is judged whether the input waveform changes from a third level to a fourth level (step S515). The third level is relative to the fourth level. For example, when the third level is a high level, the fourth level is a one level. When the third level is a low level, the fourth level is a high level. In some embodiments, the third level is the same as the first level. In this example, the fourth level is the same as the second level. In other embodiments, the third level is the same as the second level. In this example, the fourth level is the same as the first level.
當輸入波形(如第2圖的RX)並未由一第三位準轉為一第四位準時,執行步驟S514。然而,當輸入波形由一第三位準轉為一第四位準時,讀取計時器,用以得到一第一數值(步驟S516)。以第3A圖為例,步驟S516的第一數值係指計數值B。When the input waveform (such as RX in FIG. 2 ) does not change from a third level to a fourth level, step S514 is executed. However, when the input waveform changes from a third level to a fourth level, the timer is read to obtain a first value (step S516 ). Taking FIG. 3A as an example, the first value in step S516 refers to the count value B.
接著,判斷第一數值是否大於一標準值(步驟S517)。當第一數值大於一標準值時,減少輸出波形維持於第二位準的時間值(步驟S518)。當第一數值小於標準值時,增加輸出波形維持於第二位準的時間值(步驟S519)。以第3A圖為例,當計數值B大於一標準值時,控制電路210減少輸出波形TX維持於高位準的時間值H_TIME。當計數值B小於一標準值時,控制電路210增加輸出波形TX維持於高位準的時間值H_TIME。Next, determine whether the first value is greater than a standard value (step S517). When the first value is greater than a standard value, decrease the time value for the output waveform to maintain at the second level (step S518 ). When the first value is less than the standard value, increase the time value for the output waveform to maintain at the second level (step S519 ). Taking FIG. 3A as an example, when the count value B is greater than a standard value, the
在其它實施例中,校正方法500更包括一檢測步驟(未顯示)。檢測步驟位於步驟S511之前,用以檢測一特定事件是否發生。當特定事件發生時,執行步驟S511。當特定事件未發生時,不執行步驟S511。在一可能實施例中,特定事件係指環境溫度脫離一預設溫度範圍。在此例中,檢測步驟係偵測一環境溫度,並判斷環境溫度是否脫離一預設溫度範圍。當環境溫度脫離一預設溫度範圍時,執行步驟S511。當環境溫度未脫離一預設溫度範圍時,不執行步驟S511。在另一可能實施例中,檢測步驟係偵測一匯流排(如第2圖的匯流排130)的電壓,並判斷匯流排的電壓是否脫離一預設電壓範圍。當匯流排的電壓脫離一預設電壓範圍時,執行步驟S511。當匯流排的電壓未脫離一預設電壓範圍時,不執行步驟S511。In other embodiments, the
在其它實施例中,步驟S513與S514之間更包括一檢測步驟,用以判斷輸入波形(如第3A圖的RX)的位準是否等於一臨界值。在此例中,當輸入波形的位準等於一臨界值時,讀取計時器,用以得到一第二數值,如第3A圖的計數值A。以第2圖為例,計數值A為匯流排130至輸入輸出電路220之間的硬體元件所造成的延遲時間。In other embodiments, a detection step is further included between steps S513 and S514 to determine whether the level of the input waveform (such as RX in FIG. 3A ) is equal to a critical value. In this example, when the level of the input waveform is equal to a critical value, the timer is read to obtain a second value, such as the count value A in FIG. 3A. Taking FIG. 2 as an example, the count value A is the delay time caused by the hardware components between the
另外,將輸出波形維持於第二位準的時間值(如第3A圖的H_TIME) 減去第二數值(如第3A圖的計數值A),便可得到一第三數值(如第3A圖的計數值C)。以第2圖為例,第三數值為匯流排130至輸入輸出電路220/230之間的硬體所造成的延遲時間。In addition, a third value (such as the count value A in FIG. 3A ) can be obtained by subtracting the second value (such as the count value A in FIG. 3A ) from the time value for maintaining the output waveform at the second level (such as H_TIME in FIG. 3A ). count value C). Taking FIG. 2 as an example, the third value is the delay time caused by the hardware between the
在其它實例中,校正方法500更包括一衝突檢測步驟(未顯示)。衝突檢測步驟用以判斷輸出波形的位準是否相同於輸入波形的位準。當輸出波形的位準不同於輸入波形的位準時,判斷第二數值是否落於一有效範圍內。當第二數值落於有效範圍內時,表示匯流排(如第2圖匯流排130)未發生信號衝突。當第二數值未落於一有效範圍內時,表示匯流排發生信號衝突。因此,發出一預設波形,用以破壞匯流排上的波形。在此例中,衝突檢測步驟判斷匯流排的位準是否穩定。當匯流排的位準不穩定時,暫停不執行步驟S511。當匯流排的位準穩定時,執行步驟S511。In other examples, the
在一些實施例中,匯流排(如第2圖匯流排130)係傳送一串列資料。在此例中,匯流排傳送每一位元資料的時間為第一數值的兩倍。以第4圖為例,當匯流排130傳送位元資料BT
i時,匯流排130維持於一第五位準(如高位準)的時間HTM等於匯流排130維持於一第六位準(如低位準)的時間HTM。該第五位準不同於該第六位準。
In some embodiments, a bus (such as
在DALI架構中,當硬體線路被調整,或是更換元件,輸入波形RX的反應時間會受到硬體元件所造成的延遲影響。然而,藉由偵測輸出波形TX與輸入波形RX的位準變化,便可推知硬體元件所造成的延遲時間。控制電路210根據硬體元件所造成的延遲時間,自動地校正輸出波形TX的位準,用以節省測試時間。另外,當環境溫度或是DALI匯流排的電壓發生變化時,控制電路210進入校正模式,校正輸出波形TX的位準,故可大幅提高實用性。In the DALI architecture, when the hardware circuit is adjusted or the components are replaced, the response time of the input waveform RX will be affected by the delay caused by the hardware components. However, by detecting the level change of the output waveform TX and the input waveform RX, the delay time caused by the hardware components can be inferred. The
必須瞭解的是,當一個元件或層被提及與另一元件或層「耦接」時,係可直接耦接或連接至其它元件或層,或具有其它元件或層介於其中。反之,若一元件或層「連接」至其它元件或層時,將不具有其它元件或層介於其中。It should be understood that when an element or layer is referred to as being "coupled" to another element or layer, it can be directly coupled or connected to the other element or layer or have the other element or layer interposed. Conversely, when an element or layer is "connected" to other elements or layers, there will be no intervening elements or layers.
本發明之校正方法,或特定型態或其部份,可以以程式碼的型態存在。程式碼可儲存於實體媒體,如軟碟、光碟片、硬碟、或是任何其他機器可讀取(如電腦可讀取)儲存媒體,亦或不限於外在形式之電腦程式產品,其中,當程式碼被機器,如電腦載入且執行時,此機器變成用以參與本發明之電子裝置。程式碼也可透過一些傳送媒體,如電線或電纜、光纖、或是任何傳輸型態進行傳送,其中,當程式碼被機器,如電腦接收、載入且執行時,此機器變成用以參與本發明之電子裝置。當在一般用途處理單元實作時,程式碼結合處理單元提供一操作類似於應用特定邏輯電路之獨特裝置。The correcting method of the present invention, or a specific form or part thereof, may exist in the form of program code. The code may be stored on a physical medium, such as a floppy disk, a CD, a hard disk, or any other machine-readable (such as a computer-readable) storage medium, or a computer program product without limitation in an external form, wherein, When the program code is loaded and executed by a machine, such as a computer, the machine becomes an electronic device for participating in the present invention. Code may also be sent via some transmission medium, such as wire or cable, optical fiber, or any type of transmission in which, when the code is received, loaded, and executed by a machine, such as a computer, the machine becomes the one used to participate in this Invented electronic devices. When implemented on a general-purpose processing unit, the code combines with the processing unit to provide a unique device that operates similarly to application-specific logic circuits.
除非另作定義,在此所有詞彙(包含技術與科學詞彙)均屬本發明所屬技術領域中具有通常知識者之一般理解。此外,除非明白表示,詞彙於一般字典中之定義應解釋為與其相關技術領域之文章中意義一致,而不應解釋為理想狀態或過分正式之語態。雖然“第一”、“第二”等術語可用於描述各種元件,但這些元件不應受這些術語的限制。這些術語只是用以區分一個元件和另一個元件。Unless otherwise defined, all terms (including technical and scientific terms) used herein are to be understood by those of ordinary skill in the art to which this invention belongs. In addition, unless expressly stated, the definition of a word in a general dictionary should be interpreted as consistent with the meaning in the article in its related technical field, and should not be interpreted as an ideal state or an overly formal voice. Although terms such as 'first' and 'second' may be used to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another.
雖然本發明已以較佳實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾。舉例來說,本發明實施例所述之系統、裝置或是方法可以硬體、軟體或硬體以及軟體的組合的實體實施例加以實現。因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Any person with ordinary knowledge in the technical field may make some changes and modifications without departing from the spirit and scope of the present invention. . For example, the system, device or method described in the embodiments of the present invention can be implemented in physical embodiments of hardware, software, or a combination of hardware and software. Therefore, the scope of protection of the present invention should be defined by the scope of the appended patent application.
100:控制系統
110、200:主機裝置
121~123:終端裝置
130:匯流排
141~143、241:數位可定址照明介面
210:控制電路
220、230:輸入輸出電路
240:轉換電路
TX:輸出波形
RX:輸入波形
DIF1、DIF2、RES1、RES2:差動信號
A~K:數值
310~390:時間點
BT
i+1、BT
i1、BT
i-1、BT
i-2:位元資料
HTM:半位元時間
BTM:位元時間
500:校正方法
S511~S519:步驟100:
第1圖為本發明之控制系統的示意圖。 第2圖為本發明之主機裝置的示意圖。 第3A~3C圖為本發明之輸出波形與輸入波形的示意圖。 第4圖為本發明之DALI訊息的示意圖。 第5圖為本發明之校正方法的流程示意圖。 Fig. 1 is a schematic diagram of the control system of the present invention. Fig. 2 is a schematic diagram of the host device of the present invention. Figures 3A-3C are schematic diagrams of output waveforms and input waveforms of the present invention. Fig. 4 is a schematic diagram of the DALI message of the present invention. Fig. 5 is a schematic flow chart of the calibration method of the present invention.
500:校正方法 500: Correction method
S511~S519:步驟 S511~S519: steps
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110149272A TWI781031B (en) | 2021-12-29 | 2021-12-29 | Calibration method and electronic device thereto |
CN202211046158.3A CN116419454A (en) | 2021-12-29 | 2022-08-30 | Correction method and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW110149272A TWI781031B (en) | 2021-12-29 | 2021-12-29 | Calibration method and electronic device thereto |
Publications (2)
Publication Number | Publication Date |
---|---|
TWI781031B true TWI781031B (en) | 2022-10-11 |
TW202327269A TW202327269A (en) | 2023-07-01 |
Family
ID=85475760
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW110149272A TWI781031B (en) | 2021-12-29 | 2021-12-29 | Calibration method and electronic device thereto |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116419454A (en) |
TW (1) | TWI781031B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030106361A1 (en) * | 2001-12-12 | 2003-06-12 | Greidanus Henry Steven | System and method for calibrating an adjustable delay time for a delay module |
US20170063581A1 (en) * | 2015-09-01 | 2017-03-02 | Radiant Opto-Electronics Corporation | Method of demodulating a signal packet, a communication system and a lighting device |
TW201827745A (en) * | 2016-11-14 | 2018-08-01 | 美商通用電機股份有限公司 | Method and apparatus for autonomous lighting control |
US10650736B2 (en) * | 2018-03-08 | 2020-05-12 | Raydium Semiconductor Corporation | Display apparatus and voltage calibration method |
-
2021
- 2021-12-29 TW TW110149272A patent/TWI781031B/en active
-
2022
- 2022-08-30 CN CN202211046158.3A patent/CN116419454A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030106361A1 (en) * | 2001-12-12 | 2003-06-12 | Greidanus Henry Steven | System and method for calibrating an adjustable delay time for a delay module |
US20170063581A1 (en) * | 2015-09-01 | 2017-03-02 | Radiant Opto-Electronics Corporation | Method of demodulating a signal packet, a communication system and a lighting device |
TW201827745A (en) * | 2016-11-14 | 2018-08-01 | 美商通用電機股份有限公司 | Method and apparatus for autonomous lighting control |
US10650736B2 (en) * | 2018-03-08 | 2020-05-12 | Raydium Semiconductor Corporation | Display apparatus and voltage calibration method |
Also Published As
Publication number | Publication date |
---|---|
TW202327269A (en) | 2023-07-01 |
CN116419454A (en) | 2023-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10997386B2 (en) | Image data transmission system and image data transmission method | |
US20070069768A1 (en) | Signal detection circuit capable of automatically adjusting threshold value | |
US20080019435A1 (en) | Adaptive equalizer apparatus with digital eye-opening monitor unit and method thereof | |
US9087567B2 (en) | Method and apparatus for amplifier offset calibration | |
TWI698130B (en) | Temperature sensing parameter providing circuit, temperature sensing parameter providing method and temperature monitoring method | |
TW201416820A (en) | Transmission interface device capable of calibrating transmission frequency automatically and method thereof | |
TWI781031B (en) | Calibration method and electronic device thereto | |
CN111312307B (en) | Memory control circuit and correction method | |
JP6834721B2 (en) | Communication device | |
JPH05276171A (en) | Communication control equipment | |
US10721055B2 (en) | Communication device | |
US9454162B2 (en) | Calibration circuit and semiconductor device including the same | |
JP2007080134A (en) | Serial communication apparatus | |
JP6969215B2 (en) | Communication equipment and communication systems | |
WO2020050014A1 (en) | Relay device, relay method, and computer program | |
JP2011028445A (en) | Transmission and reception control device, electronic apparatus, data transmission method, and control program | |
TWI259466B (en) | Circuitry and method for adjusting signal length | |
WO2002037785A1 (en) | Data transmission method and data transmission device | |
TWI338842B (en) | Signal transfer systems and methods | |
US7716539B2 (en) | Serial communication control system | |
WO2017090078A1 (en) | Embedded device, communication method, and communication program | |
JP3963135B2 (en) | Nonvolatile memory test control method | |
CN115694488A (en) | Control circuit and correction method for signal converter | |
JP2001274848A (en) | Pulse signal receiver | |
JP2003121471A (en) | Bus trigger circuit and waveform measuring device using it |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent |