TWI781031B - Calibration method and electronic device thereto - Google Patents

Calibration method and electronic device thereto Download PDF

Info

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
Application number
TW110149272A
Other languages
Chinese (zh)
Other versions
TW202327269A (en
Inventor
張亦喬
Original Assignee
新唐科技股份有限公司
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 新唐科技股份有限公司 filed Critical 新唐科技股份有限公司
Priority to TW110149272A priority Critical patent/TWI781031B/en
Priority to CN202211046158.3A priority patent/CN116419454A/en
Application granted granted Critical
Publication of TWI781031B publication Critical patent/TWI781031B/en
Publication of TW202327269A publication Critical patent/TW202327269A/en

Links

Images

Classifications

    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/16Controlling the light source by timing means
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source
    • H05B47/175Controlling the light source by remote control
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/20Responsive to malfunctions or to light source life; for protection
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control 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

A calibration method correcting an output waveform is provided. The output waveform is detected. When the output waveform is changed from a first level to a second level, a timer is enabled. An input waveform is detected. When the input waveform is changed from a third level to a fourth level, the count-value of the timer is read. When the count-value is higher than a typical value, the duration of the output waveform being at the second level is reduced. When the count-value is less than a typical value, the duration of the output waveform being at the second level is increased.

Description

校正方法及電子裝置Calibration method and electronic device

本發明係有關於一種電子裝置,特別是有關於一種使用一數位可定址照明介面(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 control system 100 includes a host device 110 , terminal devices 121 - 123 and a bus 130 . The host device 110 (or electronic device) is coupled to the bus 130 through a digital addressable lighting interface (digital addressable lighting interface; DALI) 141 to send a DALI message to a specific terminal device (such as 121) and receive a message from The reply for that specific end device.

終端裝置121具有一DALI 142。DALI 142耦接匯流排130,用以接收來自主機裝置110的DALI訊息。當主機裝置110所發出的DALI訊息係指向終端裝置121時,終端裝置121執行來自主機裝置110的指令,如調整光線強度、或是調整內部參數。在一些實施例中,終端裝置121透過DALI 142發出一回覆予主機裝置110。本發明並不限定終端裝置121的種類。在一可能實施例中,終端裝置121可能是一照明設備、一電壓轉換電路、或是一傳感器。The terminal device 121 has a DALI 142 . The DALI 142 is coupled to the bus 130 for receiving DALI messages from the host device 110 . When the DALI message sent by the host device 110 is directed to the terminal device 121, the terminal device 121 executes the command from the host device 110, such as adjusting light intensity or adjusting internal parameters. In some embodiments, the terminal device 121 sends a reply to the host device 110 through the DALI 142 . The present invention does not limit the type of the terminal device 121 . In a possible embodiment, the terminal device 121 may be a lighting device, a voltage conversion circuit, or a sensor.

終端裝置122具有一DALI 143。DALI 143耦接匯流排130,用以接收來自主機裝置110的DALI訊息。終端裝置123具有一DALI 144。DALI 144耦接匯流排130,用以接收來自主機裝置110的DALI訊息。由於終端裝置122及123的特性相同於終端裝置121,故不再贅述。The terminal device 122 has a DALI 143 . The DALI 143 is coupled to the bus 130 for receiving DALI messages from the host device 110 . The terminal device 123 has a DALI 144 . The DALI 144 is coupled to the bus 130 for receiving DALI messages from the host device 110 . Since the characteristics of the terminal devices 122 and 123 are the same as those of the terminal device 121 , details are not repeated here.

本發明並不限定終端裝置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 terminal device 121 may be a lighting device, and the terminal device 122 is a sensor. In addition, the present invention does not limit the number of terminal devices. In other embodiments, the control system 100 has other numbers of end devices.

第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 host device 200 includes a control circuit 210 , input and output circuits 220 , 230 and a conversion circuit 240 . In some embodiments, the architecture of the host device 200 can also be applied to the terminal devices 121 - 123 in FIG. 1 .

控制電路210產生一輸出波形TX。輸入輸出電路220用以輸出輸出波形TX。轉換電路240轉換輸出波形TX,用以產生差動信號DIF1及DIF2。差動信號DIF1及DIF2的振幅相同,但相位相反。因此,差動信號DIF1及DIF2構成一差動信號對。The control circuit 210 generates an output waveform TX. The input-output circuit 220 is used for outputting the output waveform TX. The conversion circuit 240 converts the output waveform TX to generate the differential signals DIF1 and DIF2. The differential signals DIF1 and DIF2 have the same amplitude but opposite phases. Therefore, the differential signals DIF1 and DIF2 constitute a differential signal pair.

在本實施例中,轉換電路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 conversion circuit 240 has a DALI 241 . The DALI 241 is used to output the differential signals DIF1 and DIF2 to the bus bar 130 . In a possible embodiment, the bus bar 130 may be called a DALI bus bar 130 . In other examples, the DALI 241 receives responses from the bus 130 , such as differential signals RES1 and RES2 . The conversion circuit 240 converts the return signals RES11 and RES2 to generate an input waveform RX. In this example, the reply signals RES11 and RES2 have the same amplitude but opposite phases.

輸入輸出電路230接收輸入波形RX,並提供輸入波形RX予控制電路210。在一可能實施例中,控制電路210偵測輸出波形TX及輸入波形RX的位準變化,用以判斷輸入輸出電路220至匯流排130的硬體元件所造成的延遲時間以及輸入輸出電路230至匯流排130的硬體元件所造成的延遲時間。在其它實施例中,控制電路210、輸入輸出電路220及230構成一微控制電路(micro-controller unit;MCU)。The input-output circuit 230 receives the input waveform RX and provides the input waveform RX to the control circuit 210 . In a possible embodiment, the control circuit 210 detects the level changes of the output waveform TX and the input waveform RX to determine the delay time caused by the hardware components from the input-output circuit 220 to the bus 130 and the delay time from the input-output circuit 230 to the bus 130. The delay time caused by the hardware components of the bus 130 . In other embodiments, the control circuit 210, the input and output circuits 220 and 230 constitute a micro-controller unit (MCU).

第3A圖為輸出波形TX與輸入波形RX的示意圖。在時間點310,輸出波形TX由一第一位準轉為一第二位準。因此,控制電路210啟動一計時器。在本實施例中,第一位準為一低位準,第二位準為一高位準。在其它實施例中,第一位準為一高位準,第二位準為一低位準。FIG. 3A is a schematic diagram of the output waveform TX and the input waveform RX. At time point 310, the output waveform TX changes from a first level to a second level. Therefore, the control circuit 210 starts a timer. In this embodiment, the first level is a low level, and the second level is a high level. In other embodiments, the first level is a high level, and the second level is a low level.

在一些實施例中,當輸出波形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 conversion circuit 240 , the conversion circuit 240 converts the output waveform TX into differential signals DIF1 and DIF2 . Since the characteristics of the differential signals DIF1 and DIF2 are similar, only the differential signal DIF1 is shown in FIG. 3A . As shown in the figure, at the time point 310, the level of the differential signal DIF1 also changes, such as from a high level to a low level. In this example, before the time point 310, the phase of the differential signal DIF1 is reversed to the phase of the output waveform TX. In other embodiments, at the time point 310, the level of the differential signal DIF1 may change from a low level to A high standard. In this example, before the time point 310 , the phase of the differential signal DIF1 is the same as that of the output waveform TX.

匯流排130上的一特定終端裝置(如121)會根據差動信號DIF1及DIF2,提供回覆信號RES1及RES2。轉換電路240轉換回覆信號RES1及RES2,用以產生輸入波形RX。控制電路210偵測輸入波形RX的位準變化。A specific terminal device (such as 121 ) on the bus 130 provides reply signals RES1 and RES2 according to the differential signals DIF1 and DIF2 . The conversion circuit 240 converts the return signals RES1 and RES2 to generate the input waveform RX. The control circuit 210 detects the level change of the input waveform RX.

在時間點320,輸入波形RX的位準等於一臨界值,故控制電路210擷取計時器的計數值A。計數值A反應差動信號DIF1由高位準轉為低位準時,輸入波形RX因硬體造成的延遲時間。舉例而言,計數值A為由匯流排130至輸入輸出電路230(或220)之間的硬體元件所造成的延遲時間。At time point 320 , the level of the input waveform RX is equal to a critical value, so the control circuit 210 captures the count value A of the timer. The count value A reflects the delay time of the input waveform RX caused by hardware when the differential signal DIF1 changes from a high level to a low level. For example, the count value A is the delay time caused by hardware components between the bus bar 130 and the input-output circuit 230 (or 220 ).

在時間點330,輸入波形RX的位準由一第三位準轉為一第四位準,故控制電路210擷取計時器的計數值B(或稱第一數值)。計數值B大約可以反應出差動信號DIF1的相位變化時間。在本實施例中,第三位準為一高位準,第四位準為一低位準。在其它實施例中,第三位準為一低位準,第四位準為一高位準。另外,在時間點310前,輸入波形RX的位準相同於輸出波形TX的位準,但並非用以限制本發明。在其它實施例中,在時間點310前,輸入波形RX的位準可能不同於輸出波形TX的位準。舉例而言,在時間點310前,輸入波形RX為高位準,或是輸出波形TX為高位準。At time point 330, the level of the input waveform RX changes from a third level to a fourth level, so the control circuit 210 captures the count value B (or called the first value) of the timer. The count value B can approximately reflect the phase change time of the differential signal DIF1. In this embodiment, the third level is a high level, and the fourth level is a low level. In other embodiments, the third level is a low level, and the fourth level is a high level. In addition, before the time point 310, the level of the input waveform RX is the same as the level of the output waveform TX, but this is not intended to limit the present invention. In other embodiments, before the time point 310, the level of the input waveform RX may be different from the level of the output waveform TX. For example, before the time point 310, the input waveform RX is at a high level, or the output waveform TX is at a high level.

在本實施例中,控制電路210根據一設定值H_TIME,控制輸出波形TX維持於第二位準(如高位準)的時間。在此例中,當計數值B大於一標準值時,控制電路210減少設定值H_TIME。因此,輸出波形TX維持於第二位準的時間變短。當計數值B小於標準值時,控制電路210增加設定值H_TIME。因此,輸出波形TX維持於第二位準的時間變長。In this embodiment, the control circuit 210 controls the time during which the output waveform TX is maintained at the second level (such as the high level) according to a set value H_TIME. In this example, when the count value B is greater than a standard value, the control circuit 210 decreases the setting value H_TIME. Therefore, the time during which the output waveform TX is maintained at the second level becomes shorter. When the count value B is less than the standard value, the control circuit 210 increases the set value H_TIME. Therefore, the time for the output waveform TX to be maintained at the second level becomes longer.

在一些實施例中,控制電路210將設定值H_TIME減去計數值A,得到一延遲數值C。延遲數值C反應輸出波形TX由第二位準(高位準)轉為第一位準(低位準)時,差動信號DIF1因硬體所造成時間上的延遲時間。舉例而言,延遲數值C為匯流排130至輸入輸出電路220(或230)之間的硬體元件所造成的延遲時間。在其它實施例中,控制電路210將計數值B減去設定值H_TIME,用以得知輸出波形TX由第二位準(高位準)轉為第一位準(低位準)時,差動信號DIF1因硬體所造成的延遲時間。In some embodiments, the control circuit 210 subtracts the count value A from the set value H_TIME to obtain a delay value C. The delay value C reflects the time delay of the differential signal DIF1 caused by hardware when the output waveform TX changes from the second level (high level) to the first level (low level). For example, the delay value C is the delay time caused by the hardware components between the bus bar 130 and the input-output circuit 220 (or 230 ). In other embodiments, the control circuit 210 subtracts the set value H_TIME from the count value B to know the differential signal when the output waveform TX changes from the second level (high level) to the first level (low level). DIF1 is the delay time caused by hardware.

第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 time point 340 , the phase of the output waveform TX is the same as that of the differential signal DIF1 , and the phase of the input waveform RX is reversed.

在時間點340,輸出波形TX由一第一位準轉為一第二位準。因此,控制電路210啟動一計時器。在本實施例中,第一位準為一高位準,第二位準為一低位準。在時間點340,輸入波形RX的位準逐漸上升。At time point 340, the output waveform TX changes from a first level to a second level. Therefore, the control circuit 210 starts a timer. In this embodiment, the first level is a high level, and the second level is a low level. At time point 340, the level of the input waveform RX gradually rises.

在時間點350,輸入波形RX的位準等於一臨界值,故控制電路210擷取計時器的計數值D。在時間點360,輸入波形RX的位準由一第三位準轉為一第四位準,故控制電路210擷取計時器的計數值E。由於計數值D與E的特性相同於計數值A及B的特性,故不再贄述。在本實施例中,第三位準為一高位準,第四位準為一低位準。At time point 350 , the level of the input waveform RX is equal to a critical value, so the control circuit 210 captures the count value D of the timer. At time point 360 , the level of the input waveform RX changes from a third level to a fourth level, so the control circuit 210 captures the count value E of the timer. Since the characteristics of the count values D and E are the same as those of the count values A and B, they will not be described again. In this embodiment, the third level is a high level, and the fourth level is a low level.

控制電路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 control circuit 210 adjusts a set value L_TIME according to the count value E. For example, when the count value E is greater than a standard value, the control circuit 210 decreases the set value L_TIME. Therefore, the time for the output waveform TX to be maintained at the second level (such as the low level) becomes shorter. When the count value E is smaller than the standard value, the control circuit 210 increases the set value L_TIME. Therefore, the time for the output waveform TX to be maintained at the second level becomes longer. In some embodiments, the control circuit 210 can obtain a delay value F after subtracting the count value D from the set value L_TIME. Since the characteristics of the delay value F are the same as those of the delay value C, details will not be repeated here. In other embodiments, the control circuit 210 subtracts the set value L_TIME from the count value E, so as to know when the output waveform TX changes from the second level (low level) to the first level (high level). The delay time of signal DIF1 caused by hardware.

第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 time point 370, the output waveform TX changes from a first level to a second level. Therefore, the control circuit 210 starts a timer. At time point 380 , the level of the input waveform RX is equal to a critical value, so the control circuit 210 captures the count value G of the timer. At time point 390 , the level of the input waveform RX changes from a third level to a fourth level, so the control circuit 210 captures the count value I of the timer. Since the characteristics of the count values G and I are the same as those of the count values A and B, they will not be described again.

在本實施例中,控制電路210根據設定值H_TIME,設定輸出波形TX維持於第二位準。在時間點385,控制電路210根據同一設定值H_TIME,設定輸出波形TX維持於第二位準。在此例中,控制電路210根據計數值I,調整一設定值H_TIME。In this embodiment, the control circuit 210 sets the output waveform TX to maintain at the second level according to the set value H_TIME. At time point 385 , the control circuit 210 sets the output waveform TX to maintain at the second level according to the same set value H_TIME. In this example, the control circuit 210 adjusts a setting value H_TIME according to the count value I.

舉例而言,當計數值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 control circuit 210 decreases the setting value H_TIME. Therefore, the time during which the output waveform TX is maintained at the second level (such as the high level) becomes shorter. When the count value I is less than the standard value, the control circuit 210 increases and sets HL_TIME. Therefore, the time for the output waveform TX to be maintained at the second level becomes longer. In some embodiments, the control circuit 210 can obtain a delay value K after subtracting the count value G from the set value H_TIME. Since the characteristic of the delay value K is the same as that of the delay value C in FIG. 3A , it will not be repeated here. In other embodiments, the control circuit 210 subtracts twice the set value H_TIME from the count value I to know when the output waveform TX changes from the second level (high level) to the first level (low level). , the delay time of the differential signal DIF1 caused by hardware.

第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 control circuit 210 corrects the set value H_TIME so that the half-bit time HTM is within a target range, such as 366.7us˜466.7us. In this example, the double nibble time can fall between 733.3us~933.3us.

控制電路210根據輸出波形TX與輸入波形RX的位準變化,得知硬體元件(如轉換電路240)所造成的延遲時間。因此,控制電路210根據元件的延遲時間,校正設定值H_TIME,使得半位元時間HTM位於一目標範圍內。The control circuit 210 obtains the delay time caused by the hardware components (such as the conversion circuit 240 ) according to the level change of the output waveform TX and the input waveform RX. Therefore, the control circuit 210 corrects the setting value H_TIME according to the delay time of the device, so that the half-bit time HTM is within a target range.

在其它實施例中,由於半位元時間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 host device 200 in FIG. 2 further includes a temperature sensor (not shown) for detecting an ambient temperature. In this example, when the ambient temperature deviates from a preset temperature range, the control circuit 210 enters into a calibration mode. In the calibration mode, the control circuit 210 detects the output waveform TX and the input waveform RX to know the time point when the output waveform TX changes from the first level to the second level (such as 310) and the input waveform RX changes from the third level to the second level. The time point when the level changes to the fourth level (eg 330). The control circuit 210 corrects the setting value H_TIME according to the time interval between the time points 310 and 330 .

在一些實施例中,控制電路210係根據一外部溫度感測器(未顯示)的感測結果,校正設定值H_TIME。在此例中,外部溫度感測器可能設置於一終端裝置(如第1圖的終端裝置121)之中。控制電路210可能發出一DALI訊息,要求終端裝置121告知環境溫度。在此例中,主機裝置200不需額外設置一溫度感測器。In some embodiments, the control circuit 210 corrects the setting value H_TIME according to the sensing result of an external temperature sensor (not shown). In this example, the external temperature sensor may be disposed in a terminal device (such as the terminal device 121 in FIG. 1 ). The control circuit 210 may send a DALI message to request the terminal device 121 to inform the ambient temperature. In this example, the host device 200 does not need an additional temperature sensor.

在另一實施例中,主機裝置200更包括一電壓感測電路(未顯示),用以偵測匯流排130的電壓。當匯流排130的電壓脫離一預設電壓範圍(如0~10V)時,控制電路210進入校正模式。在校正模式下,控制電路210根據輸出波形TX與輸入波形RX的位準變化,校正設定值H_TIME。在其它實施例中,電壓感測電路可能設置於一終端裝置(如第1圖的終端裝置121)之中。在此例中,控制電路210可能發出一DALI訊息,要求終端裝置121告知匯流排130的電壓。因此,主機裝置200不需額外設置一電壓感測電路。In another embodiment, the host device 200 further includes a voltage sensing circuit (not shown) for detecting the voltage of the bus bar 130 . When the voltage of the bus bar 130 deviates from a preset voltage range (eg, 0~10V), the control circuit 210 enters into the calibration mode. In the calibration mode, the control circuit 210 calibrates the setting value H_TIME according to the level change between the output waveform TX and the input waveform RX. In other embodiments, the voltage sensing circuit may be disposed in a terminal device (such as the terminal device 121 in FIG. 1 ). In this example, the control circuit 210 may send a DALI message, requesting the terminal device 121 to inform the voltage of the bus bar 130 . Therefore, the host device 200 does not need an additional voltage sensing circuit.

在一些實施例中,控制電路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 control circuit 210 has a collision detection function. Before the control circuit 210 outputs the output waveform TX, the control circuit 210 first detects the output waveform TX and the input waveform RX to determine whether there are other signals on the bus bar 130 . In this example, the control circuit 210 determines whether the level of the output waveform TX is the same as that of the input waveform RX. When the level of the output waveform TX is different from that of the input waveform RX, the control circuit 210 determines whether the count value A falls within a valid range. When the count value A falls within a valid range, it means that no collision occurs. Therefore, the control circuit 210 operates according to the input waveform RX. However, when the count value A does not fall within the valid range, the control circuit 210 controls the level of the output waveform TX according to a conflicting setting value to destroy the signal on the bus 130 . In a possible embodiment, the control circuit 210 determines whether the level on the bus bar 130 is stable. When the voltage on bus 130 is stable, the conflict is resolved. Therefore, the control circuit 210 detects the levels of the output waveform TX and the input waveform RX to determine whether to enter the calibration mode.

在其它實施例中,第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 terminal device 121 as an example, before the terminal device 121 outputs a reply to the bus bar 130 , the terminal device 121 first determines whether there are other signals on the bus bar 130 . If the bus 130 has other signals, the terminal device 121 may output a preset waveform to the bus 130 . After the bus 130 has no signal, the terminal device 121 provides a reply to the bus 130 again.

第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 calibration method 500 of the present invention is used to correct an output waveform, such as TX in FIG. 3A . The output waveform is provided to a conversion circuit, such as the conversion circuit 240 in FIG. 2 . The conversion circuit converts the output waveform into a differential signal pair, and outputs the differential signal pair to a bus, such as the bus 130 in FIG. 2 , through a communication interface, such as the DALI 241 in FIG. 2 . The communication interface is a digital addressable lighting interface.

首先,偵測輸出波形(步驟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-output circuit 220 . Next, it is determined whether the output waveform changes from a first level to a second level (step S512). The first level is relative to the second level. For example, when the first level is a low level, the second level is a high level. When the first level is a high level, the second level is a low level.

當輸出波形未由一第一位準轉為一第二位準時,回到步驟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-output circuit 230 .

判斷輸入波形是否由一第三位準轉為一第四位準(步驟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 control circuit 210 reduces the time value H_TIME during which the output waveform TX remains at a high level. When the count value B is less than a standard value, the control circuit 210 increases the time value H_TIME during which the output waveform TX remains at a high level.

在其它實施例中,校正方法500更包括一檢測步驟(未顯示)。檢測步驟位於步驟S511之前,用以檢測一特定事件是否發生。當特定事件發生時,執行步驟S511。當特定事件未發生時,不執行步驟S511。在一可能實施例中,特定事件係指環境溫度脫離一預設溫度範圍。在此例中,檢測步驟係偵測一環境溫度,並判斷環境溫度是否脫離一預設溫度範圍。當環境溫度脫離一預設溫度範圍時,執行步驟S511。當環境溫度未脫離一預設溫度範圍時,不執行步驟S511。在另一可能實施例中,檢測步驟係偵測一匯流排(如第2圖的匯流排130)的電壓,並判斷匯流排的電壓是否脫離一預設電壓範圍。當匯流排的電壓脫離一預設電壓範圍時,執行步驟S511。當匯流排的電壓未脫離一預設電壓範圍時,不執行步驟S511。In other embodiments, the calibration method 500 further includes a detection step (not shown). The detection step is located before step S511, and is used to detect whether a specific event occurs. When a specific event occurs, step S511 is executed. When the specific event does not occur, step S511 is not executed. In a possible embodiment, the specific event refers to that the ambient temperature deviates from a preset temperature range. In this example, the detection step is to detect an ambient temperature and determine whether the ambient temperature is out of a preset temperature range. When the ambient temperature is out of a preset temperature range, step S511 is executed. When the ambient temperature does not deviate from a preset temperature range, step S511 is not executed. In another possible embodiment, the detection step is to detect the voltage of a bus (such as the bus 130 in FIG. 2 ), and determine whether the voltage of the bus is out of a predetermined voltage range. When the voltage of the bus bar is out of a preset voltage range, step S511 is executed. When the voltage of the bus bar is not out of a preset voltage range, step S511 is not executed.

在其它實施例中,步驟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 bus bar 130 and the input-output circuit 220 .

另外,將輸出波形維持於第二位準的時間值(如第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 bus bar 130 and the input and output circuits 220 / 230 .

在其它實例中,校正方法500更包括一衝突檢測步驟(未顯示)。衝突檢測步驟用以判斷輸出波形的位準是否相同於輸入波形的位準。當輸出波形的位準不同於輸入波形的位準時,判斷第二數值是否落於一有效範圍內。當第二數值落於有效範圍內時,表示匯流排(如第2圖匯流排130)未發生信號衝突。當第二數值未落於一有效範圍內時,表示匯流排發生信號衝突。因此,發出一預設波形,用以破壞匯流排上的波形。在此例中,衝突檢測步驟判斷匯流排的位準是否穩定。當匯流排的位準不穩定時,暫停不執行步驟S511。當匯流排的位準穩定時,執行步驟S511。In other examples, the calibration method 500 further includes a collision detection step (not shown). The conflict detection step is used to determine whether the level of the output waveform is the same as that of the input waveform. When the level of the output waveform is different from that of the input waveform, it is judged whether the second value falls within a valid range. When the second value falls within the valid range, it means that no signal conflict occurs on the bus (such as the bus 130 in FIG. 2 ). When the second value does not fall within a valid range, it indicates that a signal conflict occurs on the bus. Therefore, a preset waveform is issued to destroy the waveform on the bus. In this example, the conflict detection step determines whether the level of the bus is stable. When the level of the bus bar is unstable, the step S511 is not executed temporarily. When the level of the bus bar is stable, step S511 is executed.

在一些實施例中,匯流排(如第2圖匯流排130)係傳送一串列資料。在此例中,匯流排傳送每一位元資料的時間為第一數值的兩倍。以第4圖為例,當匯流排130傳送位元資料BT i時,匯流排130維持於一第五位準(如高位準)的時間HTM等於匯流排130維持於一第六位準(如低位準)的時間HTM。該第五位準不同於該第六位準。 In some embodiments, a bus (such as bus 130 in FIG. 2 ) transmits a series of data. In this example, the bus takes twice as long to transmit each bit of data as the first value. Taking Fig. 4 as an example, when the bus 130 transmits bit data BT i , the time HTM for which the bus 130 maintains a fifth level (such as a high level) is equal to the time HTM for which the bus 130 maintains a sixth level (such as low level) time HTM. The fifth level is different from the sixth level.

在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 control circuit 210 automatically corrects the level of the output waveform TX according to the delay time caused by hardware components, so as to save test time. In addition, when the ambient temperature or the voltage of the DALI bus changes, the control circuit 210 enters the correction mode to correct the level of the output waveform TX, so that the practicability can be greatly improved.

必須瞭解的是,當一個元件或層被提及與另一元件或層「耦接」時,係可直接耦接或連接至其它元件或層,或具有其它元件或層介於其中。反之,若一元件或層「連接」至其它元件或層時,將不具有其它元件或層介於其中。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: control system 110, 200: host device 121~123: terminal device 130: bus bar 141~143, 241: digital addressable lighting interface 210: control circuit 220, 230: input and output circuit 240: conversion circuit TX: output waveform RX: input waveform DIF1, DIF2, RES1, RES2: differential signal A~K: value 310~390: time point BT i+1 , BT i1 , BT i-1 , BT i-2 : bit data HTM: half Bit time BTM: Bit time 500: Calibration method S511~S519: Steps

第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)

一種校正方法,用以校正一輸出波形,該校正方法包括: 偵測該輸出波形; 當該輸出波形由一第一位準轉為一第二位準時,致能一計時器; 偵測一輸入波形; 當該輸入波形由一第三位準轉為一第四位準時,讀取該計時器;用以得到一第一數值; 當該第一數值大於一標準值時,減少該輸出波形維持於該第二位準的時間;以及 當該第一數值小於該標準值時,增加該輸出波形維持於該第二位準的時間。 A correction method for correcting an output waveform, the correction method comprising: detecting the output waveform; enabling a timer when the output waveform changes from a first level to a second level; detecting an input waveform; When the input waveform changes from a third level to a fourth level, read the timer; to obtain a first value; When the first value is greater than a standard value, reduce the time that the output waveform is maintained at the second level; and When the first value is less than the standard value, the time for the output waveform to be maintained at the second level is increased. 如請求項1之校正方法,其中該第一位準相同於該第四位準,該第二位準相同於該第三位準。The calibration method according to claim 1, wherein the first level is the same as the fourth level, and the second level is the same as the third level. 如請求項1之校正方法,更包括: 偵測一匯流排的電壓;以及 當該匯流排的電壓脫離一預設電壓範圍時,偵測該輸出波形。 The correction method of claim 1 further includes: detecting the voltage of a bus; and When the voltage of the bus bar deviates from a preset voltage range, the output waveform is detected. 如請求項3之校正方法,更包括: 當該輸入波形的位準等於一臨界值時,讀取該計時器,用以得到一第二數值; 其中: 該輸入波形係提供予一第一輸入輸出電路; 該第二數值為該匯流排至該第一輸入輸出電路之間的硬體所造成的延遲時間。 For example, the correction method of claim 3 further includes: When the level of the input waveform is equal to a critical value, reading the timer to obtain a second value; in: The input waveform is provided to a first input-output circuit; The second value is a delay time caused by hardware between the bus bar and the first input-output circuit. 如請求項4之校正方法,更包括: 將該輸出波形維持於該第二位準的時間減去該第二數值,用以得到一第三數值; 其中: 該輸出波形係由一第二輸入輸出電路提供; 該第三數值為該匯流排至該第二輸入輸出電路之間的硬體所造成的延遲時間。 For example, the correction method of claim 4 further includes: subtracting the second value from the time during which the output waveform is maintained at the second level to obtain a third value; in: The output waveform is provided by a second input-output circuit; The third value is a delay time caused by hardware between the bus bar and the second input-output circuit. 如請求項4之校正方法,更包括: 判斷該輸出波形的位準是否相同於該輸入波形的位準; 當該輸出波形的位準不同於該輸入波形的位準時,判斷該第二數值是否落於一有效範圍內;以及 當該第二數值未落於該有效範圍內時,破壞該匯流排的波形。 For example, the correction method of claim 4 further includes: judging whether the level of the output waveform is the same as the level of the input waveform; When the level of the output waveform is different from the level of the input waveform, determining whether the second value falls within a valid range; and When the second value does not fall within the effective range, the waveform of the bus is destroyed. 一種電子裝置,透過一數位可定址照明介面匯流排,與一終端裝置進行溝通,該電子裝置包括: 一控制電路,產生一輸出波形; 一第一輸入輸出電路,用以輸出該輸出波形; 一轉換電路,轉換該輸出波形,用以產生一差動信號對予該數位可定址照明介面匯流排,並轉換該數位可定址照明介面匯流排接收到的一回覆,用以產生一輸入波形;以及 一第二輸入輸出電路,接收該輸入波形,並提供該輸入波形予該控制電路; 其中: 當該輸出波形由一第一位準轉為一第二位準時,該控制電路致能一計時器,當該輸入波形由一第三位準轉為一第四位準時,該控制電路讀取該計時器,用以得到一第一數值; 當該第一數值大於一標準值時,該控制電路減少該輸出波形維持於該第二位準的時間; 當該第一數值小於該標準值時,該控制電路增加該輸出波形維持於該第二位準的時間。 An electronic device communicates with a terminal device through a digital addressable lighting interface bus, the electronic device includes: a control circuit for generating an output waveform; a first input-output circuit, used to output the output waveform; a conversion circuit, converting the output waveform to generate a differential signal pair to the DAI bus, and converting a reply received by the DAI bus to generate an input waveform; as well as a second input-output circuit, receiving the input waveform and providing the input waveform to the control circuit; in: When the output waveform changes from a first level to a second level, the control circuit enables a timer, and when the input waveform changes from a third level to a fourth level, the control circuit reads The timer is used to obtain a first value; When the first value is greater than a standard value, the control circuit reduces the time that the output waveform remains at the second level; When the first value is less than the standard value, the control circuit increases the time for the output waveform to maintain the second level. 如請求項7之電子裝置,更包括: 一電壓感測電路,用以偵測該數位可定址照明介面匯流排的電壓; 其中,當該數位可定址照明介面匯流排的電壓脫離一預設電壓範圍時,該控制電路偵測該輸出波形,當該輸出波形由該第一位準轉為該第二位準時,該控制電路致能該計時器。 The electronic device of claim 7 further includes: a voltage sensing circuit for detecting the voltage of the digital addressable lighting interface bus; Wherein, when the voltage of the digital addressable lighting interface bus bar deviates from a preset voltage range, the control circuit detects the output waveform, and when the output waveform changes from the first level to the second level, the control circuit circuit enables the timer. 如請求項8之電子裝置,其中該數位可定址照明介面匯流排傳送一位元資料的時間為該第一數值的兩倍。The electronic device according to claim 8, wherein the time for the digital addressable lighting interface bus to transmit one bit of data is twice the first value. 如請求項7之電子裝置,其中: 該控制電路判斷該數位可定址照明介面匯流排的位準是否穩定; 當該數位可定址照明介面匯流排的位準不穩定時,該控制電路暫停根據該輸出波形的位準變化,致能該計時器;以及 當該數位可定址照明介面匯流排的位準穩定時,該控制電路開始根據該輸出波形的位準變化,致能該計時器。 The electronic device of claim 7, wherein: The control circuit judges whether the level of the digital addressable lighting interface bus is stable; When the level of the DILI bus is unstable, the control circuit suspends the level change of the output waveform to enable the timer; and When the level of the digital addressable lighting interface bus is stable, the control circuit starts to enable the timer according to the level change of the output waveform.
TW110149272A 2021-12-29 2021-12-29 Calibration method and electronic device thereto TWI781031B (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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