A code rate and code word duty cycle adaptive circuit and LED driver chip

The adaptive circuit dynamically adjusts sampling time intervals based on input data rates and duty cycles to accurately distinguish code 0 and code 1, addressing bit errors in LED driver chips.

CN115734426BActive Publication Date: 2024-12-06NINGBO AIXIN MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211605872.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2024-12-06
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

Existing LED driver chips face bit errors due to fixed sampling time intervals and duty cycles that are not correlated with input data rates and duty cycles, leading to errors when data rates change or duty cycles are distorted.

Method used

A code rate and code word duty cycle adaptive circuit that associates the sampling signal with the frequency and duty cycle of the sampled signal, dynamically adjusting the sampling time interval to match the average high-level durations of code 0 and code 1, using components like capacitors, high-frequency oscillators, charge pumps, low-pass filters, and analog-to-digital converters to ensure accurate sampling.

Benefits of technology

The adaptive circuit ensures accurate sampling of code 0 and code 1 regardless of changes in data rate or duty cycle distortion, reducing bit errors and improving data reception accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115734426B_ABST
    Figure CN115734426B_ABST
Patent Text Reader

Abstract

The present invention discloses a code rate and code word duty cycle adaptive circuit, which relates to the technical field of integrated circuits, including: a capacitor C; a high frequency oscillator OSC, which samples input data codes; a charge pump CP, which charges and discharges the capacitor C; a low pass filter LPF, which filters the output signal of the charge pump CP; an analog-to-digital converter ADC, which converts analog signals into digital signals; a phase frequency detector PFD, which charges and discharges the capacitor C; the present invention also discloses an LED driver chip, which is provided with the above code rate and code word duty cycle adaptive circuit. The present invention ensures that the sampling signal can track the different rates of the sampled signal, and no matter how the duty cycle is distorted, the sampling clock can accurately sample at the average of the high level duration of the 0 code and the high level duration of the 1 code, thereby distinguishing the 0 code and the 1 code.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated circuits, and in particular to a code rate and code word duty cycle adaptive circuit and an LED driver chip. Background Art

[0002] The existing LED color light driver uses an 8-bit digital signal to represent the brightness information of each color light. The rate of each digital code is fixed, usually 800kbps, and the code word with a duty cycle of 1 / 4 represents code 0, and the code word with a duty cycle of 3 / 4 represents code 1. The chip receives the 8-bit digital signal, and after internal sampling, decoding and latching, it converts the 8-bit digital signal into a pulse width modulation (PWM) signal with a constant period (generated by the internal OSC frequency division of the chip) of the corresponding pulse width to drive the LED light to emit light.

[0003] The sampling method adopted by the data receiving of the prior art is pulse-triggered data sampling, that is, when the rising edge of each bit of data arrives, the internal high-frequency oscillator is triggered to start. After the arrival of the rising edge of the data, a fixed time is delayed, represented by tst, and the high-frequency oscillator oscillates normally. After an oscillation cycle, that is, the second rising edge of the square wave output by the high-frequency oscillator, a narrow pulse signal is generated through the internal logic circuit. The rising edge of the signal is aligned with the second rising edge of the square wave output after the high-frequency oscillator starts to oscillate. The narrow pulse signal is used as a sampling signal to sample the input data. The output square wave period of the high-frequency oscillator is a fixed value, represented by Tck. In this way, it is ensured that the time interval between the rising edge of the sampled data and the rising edge of the sampling signal is fixed to Tst+Tck, and the time interval (Tst+Tck) is designed to be 1 / 2 of the period of each bit of data. The narrow pulse sampling signal samples a low level for the 0 code with a duty cycle of 1 / 4, and a high level for the 1 code with a duty cycle of 3 / 4. In this way, it is possible to correctly distinguish whether the received data is a 0 code or a 1 code. After the narrow pulse sampling signal is generated, the high-frequency oscillator stops and returns to the initial state, preparing for the rising edge of the next data to wake up the high-frequency oscillator. For example, the commonly used data rate is 800kbps, and the period of each bit of data is 1.25us. The duty cycle of code 0 is 1 / 4, and the corresponding high-level width is 312.5ns. The duty cycle of code 1 is 3 / 4, and the corresponding high-level width is 937.5ns. Set the sampling time interval (Tst+Tck) to 1 / 2 of the data period, that is, 625ns. In this way, the sampling signal samples a low level for code 0 and a high level for code 1. This method has the following three shortcomings: 1. The sampling time interval (Tst+Tck) is obtained by the internal design of the chip. After the chip design and production are finalized, this time is usually fixed, and the encoding method and duty cycle of code 0 and code 1 are usually fixed. If the input data rate changes significantly, making the high-level width of code 0 greater than the sampling time interval (Tst+Tck), the data rate is too slow, or the high-level width of code 1 is less than the sampling time interval (Tst+Tck), the data rate is too fast, it will cause bit errors; 2. During data transmission, the duty cycle of the data is distorted, causing the high-level width of code 0 to be greater than the sampling time interval (Tst+Tck) or the high-level width of code 1 to be less than the sampling time interval (Tst+Tck), which will cause bit errors; 3. The chip is affected by the manufacturing process, power supply voltage and ambient temperature (PVT), and the sampling time interval (Tst+Tck) will change. If the sampling time interval (Tst+Tck) is less than the high-level time interval of code 0 or greater than the high-level time interval of code 1, it will cause bit errors. The combined effect of the above two or more factors will greatly increase the probability of bit errors.The source of defects in existing pulse-triggered data sampling is that the rate and duty cycle (duration of high level) of input data are independent of the sampling time interval (Tst+Tck) inside the chip and have no correlation. Deviations introduced by either side will eventually be added to the sampling time interval, forming errors and leading to an increase in the bit error rate.

[0004] Therefore, technicians in this field are committed to developing a code rate and code word duty cycle adaptive circuit and an LED driver chip. Summary of the invention

[0005] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to ensure that the sampled signal can normally distinguish between 0 code and 1 code regardless of how the speed of the sampled signal changes and how the duty cycle is distorted.

[0006] The inventors have found through research that associating the sampling signal with the frequency and duty cycle of the sampled signal can ensure that the sampling signal can track the sampled signal. Regardless of the difference in rate or duty cycle distortion, the sampling clock can accurately sample at the average of the high-level duration of code 0 and the high-level duration of code 1, thereby distinguishing code 0 from code 1.

[0007] The inventor defines the check code Data In as the first 24 bits of the input data code, which is composed of alternating 0 codes and 1 codes. The code word with a duty cycle of 1 / 4 represents the 0 code, and the code word with a duty cycle of 3 / 4 represents the 1 code.

[0008] In one embodiment of the present invention, a code rate and code word duty cycle adaptive circuit is provided, comprising:

[0009] Capacitor C;

[0010] High frequency oscillator OSC samples the input data code, including CLK port, Port, EN port, VDD port, VSS port and switch capacitor array, the switch capacitor array includes multiple groups of switches and internal capacitors;

[0011] The charge pump CP charges and discharges the capacitor C, including the HS port, LS port, OUT4 port, VDD port and VSS port;

[0012] A low-pass filter LPF filters the output signal of the charge pump CP, including the IN2 port and the OUT2 port;

[0013] Analog-to-digital converter ADC, converts analog signals into digital signals, including IN3 port, OUT3 port and output latch;

[0014] The phase frequency detector PFD charges and discharges the capacitor C, including the CLK1 port, the CLK2 port, the Q1 port, the Q2 port, the VDD port and the VSS port;

[0015] The CLK port of the high-frequency oscillator OSC is connected to the CLK2 port of the phase frequency detector PFD. The port is connected to the CLK1 port of the phase frequency detector PFD, the Q1 port of the phase frequency detector PFD is connected to the HS port of the charge pump CP, the Q2 port of the phase frequency detector PFD is connected to the LS port of the charge pump CP, the OUT4 port of the charge pump CP, the IN2 port of the low-frequency filter LPF and one end of the capacitor C are connected together, the other end of the capacitor C is grounded, the OUT2 port of the low-pass filter LPF is connected to the IN3 port of the analog-to-digital converter ADC, the OUT3 port of the analog-to-digital converter ADC is connected to the EN port of the high-frequency oscillator OSC, the VDD port of the high-frequency oscillator OSC, the VDD port of the charge pump CP, and the VDD port of the phase frequency detector PFD are connected to the power supply, and the VSS port of the high-frequency oscillator OSC, the VSS port of the charge pump CP, and the VSS port of the phase frequency detector PFD are grounded;

[0016] In response to the rising edge of the check code Data In, the high-frequency oscillator OSC starts, and after the rising edge of the input data code arrives, the high-frequency oscillator OSC oscillates normally and outputs the square wave Inner OSC. After an oscillation cycle Tck, that is, the second rising edge of the square wave output by the high-frequency oscillator OSC, the high-frequency oscillator OSC generates a narrow pulse signal Sample CLK Pulse, and the rising edge of the narrow pulse signal Sample CLK Pulse is aligned with the second rising edge of the square wave Inner OSC. After the narrow pulse sampling signal Sample CLK Pulse is generated, the high-frequency oscillator OSC stops oscillating and returns to the initial state, preparing for the next input data code rising edge to wake up the high-frequency oscillator OSC.

[0017] The check code Data In is inverted to obtain the signal N_DataIn, and the narrow pulse signal Sample CLK Pulse is sent to the CLK2 input terminal of the phase frequency detector PFD through the CLK port of the high-frequency oscillator OSC. The PFD compares the phase relationship between the narrow pulse signal Sample CLK Pulse and the inverted signal N_DataIn of the check code Data In, extracts the time interval between the falling edge of the 0 code and the rising edge of the narrow pulse signal Sample CLK Pulse, that is, the sampling setup time T1, generates a signal High Side, and sends it to the HS port of the charge pump CP through the Q1 port of the PFD; at the same time, extracts the time interval between the rising edge of the narrow pulse signal Sample CLKPulse and the falling edge of the 1 code, that is, the sampling hold time T2, and generates a signal Low Side, sent to the LS port of the charge pump CP through the Q2 port of the phase frequency detector PFD; if the sampling setup time T1 is less than the sampling hold time T2, the charge amount of the charge pump CP to the output capacitor C is less than the discharge charge amount, the output control voltage of the charge pump CP decreases, and after passing through the low-pass filter LPF, the output data of the analog-to-digital converter ADC decreases, the switch of the switch capacitor array in the high-frequency oscillator OSC is controlled to be closed, the internal capacitance of the switch capacitor array is increased, the output frequency of the high-frequency oscillator OSC is reduced, and the sampling time interval, that is, Tst+Tck, increases, and the sampling setup time T1 increases; on the contrary, if the sampling setup time T1 is greater than the sampling hold time T2, the charge amount of the charge pump CP to the output capacitor C is greater than the discharge charge amount, the output control voltage of the charge pump CP increases, the data output by the analog-to-digital converter ADC increases, the switch of the switch capacitor array in the high-frequency oscillator OSC is controlled to be opened, the internal capacitance of the switch capacitor array is reduced, the output frequency of the high-frequency oscillator OSC is increased, the sampling time interval, that is, Tst+Tck, decreases, and the sampling hold time T2 increases; after multiple comparisons and iterations, the check code Data After In is sent, ensure that the sampling setup time T1 is approximately equal to the sampling hold time T2, the sampling clock can accurately sample at the average of the high-level duration of 0 code and the high-level duration of 1 code, and the sampling setup time T1 is approximately equal to the sampling hold time T2; since the narrow pulse sampling signal Sample CLK Pulse is strictly synchronized with the input data code rate, the sampling time interval can dynamically track the average of the high-level duration of 0 code and the high-level duration of 1 code, thereby realizing adaptive tracking sampling of the code rate and code word duty cycle.

[0018] Furthermore, in the code rate and code word duty cycle adaptive circuit of the above embodiment, the duty cycle of the check code Data In 0 does not have to be strictly equal to 1 / 4, and the duty cycle of the check code Data In 1 does not have to be strictly equal to 3 / 4.

[0019] Optionally, in the code rate and code word duty cycle adaptive circuit of the above embodiment, the frequency range of the high frequency oscillator OSC is greater than or equal to 400 KHz and less than or equal to 1.2 MHz.

[0020] Optionally, in the code rate and code word duty cycle adaptive circuit of the above embodiment, the switching range of the switch capacitor array in the high frequency oscillator OSC is greater than or equal to 4 bits and less than or equal to 12 bits.

[0021] Optionally, in the code rate and code word duty cycle adaptive circuit of any of the above embodiments, the current of the charge pump CP is 10 uA.

[0022] Optionally, in the code rate and code word duty cycle adaptive circuit of any of the above embodiments, the value of the capacitor C is greater than or equal to 5PF and less than or equal to 20PF.

[0023] Optionally, in the code rate and code word duty cycle adaptive circuit of any of the above embodiments, the bandwidth of the low-pass filter is greater than or equal to 8 kHz and less than or equal to 80 kHz.

[0024] Optionally, in the code rate and code word duty cycle adaptive circuit of any of the above embodiments, the analog-to-digital converter is a 4-bit or larger and a 12-bit or smaller analog-to-digital converter.

[0025] Preferably, in the code rate and code word duty cycle adaptive circuit of the above embodiment, the analog-to-digital converter is an 8-bit analog-to-digital converter.

[0026] Optionally, in the code rate and code word duty cycle adaptive circuit of any of the above embodiments, after the check code Data In is sent, the high-frequency oscillator OSC generates a lock completion flag signal Lock Indication to enable the output latch in the ADC to lock the control information of the check code rate and duty cycle at the current value.

[0027] Based on the above embodiments, in another embodiment of the present invention, there is provided an LED driver chip, which is provided with the code rate and code word duty cycle adaptive circuit in any of the above embodiments.

[0028] The present invention improves the data receiving circuit of the prior art, associates the sampling signal with the frequency and duty cycle of the sampled signal, ensures that the sampling signal can track the rate of the sampled signal. No matter how the duty cycle is distorted, the sampling clock can accurately sample at the average of the high-level duration of the 0 code and the high-level duration of the 1 code, thereby distinguishing the 0 code and the 1 code.

[0029] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1is a schematic diagram illustrating a structure of a code rate and code word duty cycle adaptive circuit according to an exemplary embodiment;

[0031] Figure 2 is a timing diagram illustrating data sampling according to an exemplary embodiment and the prior art;

[0032] Figure 3 is a schematic diagram illustrating the structure of an LED driving chip according to an exemplary embodiment. DETAILED DESCRIPTION

[0033] The following describes several preferred embodiments of the present invention with reference to the drawings in the specification, so that the technical content is clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.

[0034] In the drawings, components with the same structure are indicated by the same numerical reference numerals, and components with similar structures or functions are indicated by similar numerical reference numerals. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, the thickness of the components is schematically exaggerated in some places in the drawings.

[0035] The inventor has designed a code rate and code word duty cycle adaptive circuit, such as Figure 1 As shown, including:

[0036] Capacitor C, value is greater than or equal to 5PF and less than or equal to 20pF;

[0037] High frequency oscillator OSC samples the input data code, including CLK port, port, EN port, VDD port, VSS port and switch capacitor array, the switch capacitor array includes multiple sets of switches and internal capacitors; the frequency range of the high frequency oscillator OSC is greater than or equal to 400KHz and less than or equal to 1.2MHz; the switch range of the switch capacitor array is greater than or equal to 4 bits and less than or equal to 12 bits;

[0038] A charge pump CP is used to charge and discharge the capacitor C, including an HS port, an LS port, an OUT4 port, a VDD port, and a VSS port; preferably, the current of the charge pump CP is 10uA;

[0039] A low-pass filter LPF filters the output signal of the charge pump CP, including the IN2 port and the OUT2 port; the bandwidth of the low-pass filter is greater than or equal to 8kHz and less than or equal to 80kHz;

[0040] The analog-to-digital converter ADC converts the analog signal into a digital signal, including an IN3 port, an OUT3 port and an output latch; the analog-to-digital converter is a 4-bit or larger and a 12-bit or smaller analog-to-digital converter, and the analog-to-digital converter is preferably an 8-bit converter;

[0041] The phase frequency detector PFD charges and discharges the capacitor C, including the CLK1 port, the CLK2 port, the Q1 port, the Q2 port, the VDD port and the VSS port;

[0042] The CLK port of the high-frequency oscillator OSC is connected to the CLK2 port of the phase frequency detector PFD. The port is connected to the CLK1 port of the phase and frequency detector PFD, the Q1 port of the phase and frequency detector PFD is connected to the HS port of the charge pump CP, the Q2 port of the phase and frequency detector PFD is connected to the LS port of the charge pump CP, the OUT4 port of the charge pump CP, the IN2 port of the low-frequency filter LPF and one end of the capacitor C are connected together, the other end of the capacitor C is grounded, the OUT2 port of the low-pass filter LPF is connected to the IN3 port of the analog-to-digital converter ADC, the OUT3 port of the analog-to-digital converter ADC is connected to the EN port of the high-frequency oscillator OSC, the VDD port of the high-frequency oscillator OSC, the VDD port of the charge pump CP, and the VDD port of the phase and frequency detector PFD are connected to the power supply, and the VSS port of the high-frequency oscillator OSC, the VSS port of the charge pump CP, and the VSS port of the phase and frequency detector PFD are grounded.

[0043] In response to the rising edge of the check code Data In, the high-frequency oscillator OSC starts, and after the rising edge of the input data code arrives, the high-frequency oscillator OSC oscillates normally and outputs the square wave Inner OSC. After an oscillation cycle Tck, that is, the high-frequency oscillator OSC outputs the second rising edge of the square wave, the high-frequency oscillator OSC generates a narrow pulse signal Sample CLK Pulse, and the rising edge of the narrow pulse signal Sample CLK Pulse is aligned with the second rising edge of the square wave Inner OSC. After the narrow pulse sampling signal Sample CLK Pulse is generated, the high-frequency oscillator OSC stops oscillating and returns to the initial state to prepare for the next input data code rising edge to wake up the high-frequency oscillator OSC; the duty cycle of the 0 code of the check code Data In does not have to be strictly equal to 1 / 4, and the duty cycle of the 1 code of the check code Data In does not have to be strictly equal to 3 / 4. After the check code Data In is sent, the high-frequency oscillator OSC generates a lock completion flag signal Lock Indication to enable the output latch in the ADC to lock the control information of the current check code rate and duty cycle in the current value;

[0044] The check code Data In is inverted to obtain the signal N_DataIn, and the narrow pulse signal Sample CLK Pulse is sent to the CLK2 input terminal of the phase frequency detector PFD through the CLK port of the high-frequency oscillator OSC. The PFD compares the phase relationship between the narrow pulse signal Sample CLK Pulse and the inverted signal N_DataIn of the check code Data In, extracts the time interval between the falling edge of the 0 code and the rising edge of the narrow pulse signal Sample CLK Pulse, that is, the sampling setup time T1, generates a signal High Side, and sends it to the HS port of the charge pump CP through the Q1 port of the PFD; at the same time, extracts the time interval between the rising edge of the narrow pulse signal Sample CLKPulse and the falling edge of the 1 code, that is, the sampling hold time T2, and generates a signal Low Side, sent to the LS port of the charge pump CP through the Q2 port of the phase frequency detector PFD; if the sampling setup time T1 is less than the sampling hold time T2, the charge amount of the charge pump CP to the output capacitor C is less than the discharge charge amount, the output control voltage of the charge pump CP decreases, and after passing through the low-pass filter LPF, the output data of the analog-to-digital converter ADC decreases, the switch of the switch capacitor array in the high-frequency oscillator OSC is controlled to be closed, the internal capacitance of the switch capacitor array is increased, the output frequency of the high-frequency oscillator OSC is reduced, and the sampling time interval, that is, Tst+Tck, increases, and the sampling setup time T1 increases; on the contrary, if the sampling setup time T1 is greater than the sampling hold time T2, the charge amount of the charge pump CP to the output capacitor C is greater than the discharge charge amount, the output control voltage of the charge pump CP increases, the data output by the analog-to-digital converter ADC increases, the switch of the switch capacitor array in the high-frequency oscillator OSC is controlled to be opened, the internal capacitance of the switch capacitor array is reduced, the output frequency of the high-frequency oscillator OSC is increased, the sampling time interval, that is, Tst+Tck, decreases, and the sampling hold time T2 increases; after multiple comparisons and iterations, the check code Data After In is sent, ensure that the sampling setup time T1 is approximately equal to the sampling hold time T2, the sampling clock can accurately sample at the average of the high-level duration of 0 code and the high-level duration of 1 code, and the sampling setup time T1 is approximately equal to the sampling hold time T2; since the narrow pulse sampling signal Sample CLK Pulse is strictly synchronized with the input data code rate, the sampling time interval can dynamically track the average of the high-level duration of 0 code and the high-level duration of 1 code, thereby realizing adaptive tracking sampling of the code rate and code word duty cycle.

[0045] The inventors used the above embodiment to perform data sampling and compared it with the data sampling of the prior art. Figure 2As shown, the present invention associates the sampling signal with the frequency and duty cycle of the sampled signal to ensure that the sampling signal can track the sampled signal. Regardless of the different rates or duty cycle distortion, the sampling clock can accurately sample at the average of the high-level duration of code 0 and the high-level duration of code 1, thereby distinguishing code 0 and code 1. Adaptive tracking sampling of code rate and code word duty cycle is achieved, and the control information of the code rate and duty cycle verification is locked at the current value.

[0046] Based on the above embodiment, in another embodiment of the present invention, Figure 3 As shown, an LED driver chip is provided, which is provided with the code rate and code word duty cycle adaptive circuit in any of the above embodiments.

[0047] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A code rate and code word duty cycle adaptive circuit, characterized in that: include: Capacitor C; High frequency oscillator OSC, samples the input data code, including CLK port, Port, EN port, VDD port, VSS port and switch capacitor array, the switch capacitor array includes multiple sets of switches and internal capacitors; A charge pump CP is used to charge and discharge the capacitor C, and includes an HS port, an LS port, an OUT4 port, a VDD port, and a VSS port; A low-pass filter LPF, for filtering the output signal of the charge pump CP, including an IN2 port and an OUT2 port; Analog-to-digital converter ADC, converts analog signals into digital signals, including IN3 port, OUT3 port and output latch; A phase frequency detector PFD is used to charge and discharge the capacitor C, and includes a CLK1 port, a CLK2 port, a Q1 port, a Q2 port, a VDD port, and a VSS port; The CLK port of the high frequency oscillator OSC is connected to the CLK2 port of the phase frequency detector PFD. The first port is connected to the CLK1 port of the phase frequency detector PFD, the Q1 port of the phase frequency detector PFD is connected to the HS port of the charge pump CP, the Q2 port of the phase frequency detector PFD is connected to the LS port of the charge pump CP, the OUT4 port of the charge pump CP, the IN2 port of the low-frequency filter LPF and one end of the capacitor C are connected together, the other end of the capacitor C is grounded, the OUT2 port of the low-pass filter LPF is connected to the IN3 port of the analog-to-digital converter ADC, the OUT3 port of the analog-to-digital converter ADC is connected to the EN port of the high-frequency oscillator OSC, the VDD port of the high-frequency oscillator OSC, the VDD port of the charge pump CP, and the VDD port of the phase frequency detector PFD are connected to power, and the VSS port of the high-frequency oscillator OSC, the VSS port of the charge pump CP, and the VSS port of the phase frequency detector PFD are grounded; In response to the rising edge of the check code Data In, the high-frequency oscillator OSC is started, and after the rising edge of the input data code arrives, the high-frequency oscillator OSC oscillates normally and outputs the square wave Inner OSC. After an oscillation cycle Tck, that is, the second rising edge of the square wave output by the high-frequency oscillator OSC, the high-frequency oscillator OSC generates a narrow pulse signal Sample CLK Pulse, and the rising edge of the narrow pulse signal Sample CLK Pulse is aligned with the second rising edge of the square wave Inner OSC. After the narrow pulse sampling signal Sample CLK Pulse is generated, the high-frequency oscillator OSC stops oscillating and returns to the initial state, preparing for the next rising edge of the input data code to wake up the high-frequency oscillator OSC; The check code Data In is inverted to obtain a signal N_DataIn, the narrow pulse signal Sample CLK Pulse is sent to the CLK2 input terminal of the phase frequency detector PFD through the CLK port of the high frequency oscillator OSC, and the check code Data In inverted signal N_DataIn is sent to the CLK2 input terminal of the phase frequency detector PFD through the CLK port of the high frequency oscillator OSC. The phase frequency detector PFD compares the phase relationship between the narrow pulse signal Sample CLK Pulse and the inverted signal N_DataIn of the check code Data In, extracts the time interval between the falling edge of the 0 code and the rising edge of the narrow pulse signal Sample CLKPulse, that is, the sampling setup time T1, generates a signal High Side, and sends it to the HS port of the charge pump CP through the Q1 port of the phase frequency detector PFD; at the same time, extracts the time interval between the rising edge of the narrow pulse signal Sample CLKPulse and the falling edge of the 1 code, that is, the sampling hold time T2, and generates a signal Low Side, sent to the LS port of the charge pump CP through the Q2 port of the phase frequency detector PFD; if the sampling setup time T1 is less than the sampling hold time T2, the charge amount of the capacitor C charged by the charge pump CP is less than the discharge charge amount, the output control voltage of the charge pump CP is reduced, and after passing through the low-pass filter LPF, the output data of the analog-to-digital converter ADC is reduced, the switch of the switch capacitor array in the high-frequency oscillator OSC is controlled to be closed, the internal capacitance of the switch capacitor array is increased, the output frequency of the high-frequency oscillator OSC is reduced, and the sampling time interval, that is, Tst+Tck is increased , then the setup time T1 of the sampling increases; on the contrary, if the setup time T1 of the sampling is greater than the holding time T2 of the sampling, the amount of charge charged to the capacitor C by the charge pump CP is greater than the amount of discharge charge, the output control voltage of the charge pump CP increases, the data output by the analog-to-digital converter ADC increases, the switch of the switch capacitor array in the high-frequency oscillator OSC is controlled to open, the internal capacitance of the switch capacitor array decreases, the output frequency of the high-frequency oscillator OSC increases, the sampling time interval, that is, Tst+Tck decreases, then the holding time T2 of the sampling increases; after multiple comparisons and iterations, the check code Data After In is sent, it is ensured that the setup time T1 of the sampling is approximately equal to the hold time T2 of the sampling, the sampling clock can accurately sample at the average of the high-level duration of the 0-code and the high-level duration of the 1-code, and the setup time T1 of the sampling is approximately equal to the hold time T2 of the sampling; since the narrow pulse sampling signal Sample CLKPulse is strictly synchronized with the input data code rate, the sampling time interval can dynamically track the average of the high-level duration of the 0-code and the high-level duration of the 1-code, thereby realizing adaptive tracking sampling of the code rate and code word duty cycle.

2. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The duty cycle of the 0 code of the verification code Data In does not have to be strictly equal to 1 / 4, and the duty cycle of the 1 code of the verification code Data In does not have to be strictly equal to 3 / 4.

3. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The frequency range of the high frequency oscillator OSC is greater than or equal to 400 KHz and less than or equal to 1.2 MHz.

4. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The switching range of the switch capacitor array in the high-frequency oscillator OSC is greater than or equal to 4 bits and less than or equal to 12 bits.

5. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The current of the charge pump CP is 10uA.

6. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The value of the capacitor C is greater than or equal to 5PF and less than or equal to 20PF.

7. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The bandwidth of the low-pass filter is greater than or equal to 8 kHz and less than or equal to 80 kHz.

8. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: The analog-to-digital converter is greater than or equal to 4 bits and less than or equal to 12 bits.

9. The code rate and code word duty cycle adaptive circuit as claimed in claim 1, characterized in that: After the verification code DataIn is sent, the high frequency oscillator OSC generates a lock completion flag signal Lock Indication to enable the output latch in the ADC to lock the control information of the verification code rate and duty cycle in the current value.

10. An LED driver chip, characterized in that: The LED driver chip is provided with a code rate and code word duty cycle adaptive circuit as described in any one of claims 1-9.