RU2600563C1 - Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range - Google Patents

Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range Download PDF

Info

Publication number
RU2600563C1
RU2600563C1 RU2016114326/93A RU2016114326A RU2600563C1 RU 2600563 C1 RU2600563 C1 RU 2600563C1 RU 2016114326/93 A RU2016114326/93 A RU 2016114326/93A RU 2016114326 A RU2016114326 A RU 2016114326A RU 2600563 C1 RU2600563 C1 RU 2600563C1
Authority
RU
Russia
Prior art keywords
pulse
frequency
microcontroller
width
output
Prior art date
Application number
RU2016114326/93A
Other languages
Russian (ru)
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 RU2016114326/93A priority Critical patent/RU2600563C1/en
Application granted granted Critical
Publication of RU2600563C1 publication Critical patent/RU2600563C1/en

Links

Images

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)
  • Pulse Circuits (AREA)

Abstract

FIELD: digital equipment.
SUBSTANCE: invention relates to digital engineering and can be used for generation of pulse-width sequences with a given pulse ratio with high accuracy and not depending on variation of frequency of information signal. Task of invention is generating a pulse-width sequence with a given pulse ratio with high accuracy during variation of frequency of information signal. Comparison of present invention with existing methods and prototype shows that claimed method exhibits new technical properties, which comprise production of a pulse-width sequence with a given pulse ratio, wherein value of pulse ratio remains invariable during change of frequency of information signal. Method makes it possible to set pulse ratio of pulse-width sequences with higher accuracy. Use of indicator provides unique control of frequency and given value of pulse ratio of pulse-width sequence. Device for generation of pulse-width sequences with variable repetition frequency and with given pulse ratio consists of a highly stable reference generator, a microcontroller, a voltage-controlled generator, a phase detector, an indicator, a divider with variable division factor. Microcontroller according to a predetermined program code algorithm controls devices connected thereto.
EFFECT: advantage of this method of generating a pulse-width sequence consists in possibility of obtaining pulse-width sequences with given pulse ratio during variation of frequency of an input information signal.
1 cl

Description

Изобретение относится к области цифровой техники и может быть использовано для формирования широтно-импульсной модуляции (ШИМ) с заданной скважностью с высокой точностью и не зависящей от изменения частоты следования импульсов.The invention relates to the field of digital technology and can be used to generate pulse width modulation (PWM) with a given duty cycle with high accuracy and independent of changes in the pulse repetition rate.

Известные способы формирования широтно-импульсной последовательности сигналов, описанные, например, в кн. Шкритек П. Справочное руководство по звуковой схемотехнике, Перевод с нем. - М.: МИР, 1991. - 446 с. По этому способу скважность выходной широтно-импульсной последовательности задается с помощью генератора линейно-изменяющегося напряжения (ГЛИН) и аналогового компаратора, на один вход которого подают опорное напряжение, а на другой - сигнал ГЛИН. Для изменения скважности выходной широтно-импульсной последовательности необходимо изменять либо скорость нарастания напряжения ГЛИН, изменяя, например, постоянную времени RC-цепи, либо изменять величину опорного напряжения. Частота следования при этом остается постоянной. При изменении частоты следования импульсов невозможно произвести адекватный пересчет постоянной времени RC-цепи или пересчет опорного напряжения для сохранения неизменным соотношения периода следования импульсов к их длительности, что в ряде случаев оказывается неприемлемым.Known methods of forming a pulse-width sequence of signals described, for example, in the book. Shkritek P. Reference Guide for Sound Circuitry, Translation from it. - M .: MIR, 1991 .-- 446 p. According to this method, the duty cycle of the output pulse-width sequence is set using a ramp generator and an analog comparator, which supplies a reference voltage to one input and a clay signal to the other. To change the duty cycle of the output pulse-width sequence, it is necessary to change either the slew rate of the GLIN voltage, changing, for example, the time constant of the RC circuit, or change the value of the reference voltage. The repetition rate remains constant. When changing the pulse repetition rate, it is impossible to adequately recalculate the time constant of the RC circuit or to recalculate the reference voltage to maintain the ratio of the pulse repetition period to their duration unchanged, which in some cases is unacceptable.

Наиболее близким по технической сущности к предлагаемому изобретению является способ формирования широтно-импульсной последовательности при помощи микроконтроллера со встроенным модулем ШИМ, описанные, например, в справочном листке на микроконтроллеры серии PIC16F87X (www.microchip.com). По этому способу микроконтроллером измеряют частоту входного информационного сигнала и формируют выходную широтно-импульсную последовательность, задавая требуемую скважность. В микроконтроллере формирование выходной широтно-импульсной последовательности с изменяющейся скважностью осуществляют, например, путем введения некоторого двоичного кода через любой стандартный цифровой параллельный или последовательный интерфейс, либо подачей напряжения постоянного тока на вход встроенного в микроконтроллер аналого-цифрового преобразователя.Closest to the technical nature of the present invention is a method of forming a pulse-width sequence using a microcontroller with an integrated PWM module, described, for example, in the data sheet on the PIC16F87X series microcontrollers (www.microchip.com). According to this method, the frequency of the input information signal is measured by a microcontroller and an output pulse-width sequence is formed, setting the required duty cycle. In the microcontroller, the formation of an output pulse-width sequence with varying duty cycle is carried out, for example, by introducing some binary code through any standard digital parallel or serial interface, or by applying a DC voltage to the input of an analog-to-digital converter built into the microcontroller.

Однако такой способ формирования широтно-импульсной последовательности обладает существенным недостатком, заключающимся в том, что при изменении частоты следования импульсов соотношение периода следования импульсов к их длительности может изменяться дискретно. Частота следования импульсов широтно-импульсной последовательности также может при этом изменяться исключительно дискретно, причем шаг изменения частоты зависит от самой частоты следования импульсов. В итоге точность задания скважности широтно-импульсной последовательности ограничивается при этом разрядностью регистров микроконтроллера и конечностью шага изменения скважности выходной широтно-импульсной последовательности. Частота выходной широтно-импульсной последовательности при этом не равна частоте задающего генератора, а задается с некоторой ошибкой, определяемой частотой тактового генератора микроконтроллера, возможностями модуля широтно-импульсной модуляции и значением самой частоты следования импульсов.However, this method of forming a pulse-width sequence has a significant drawback, namely, that when the pulse repetition rate changes, the ratio of the pulse repetition period to their duration can change discretely. The pulse repetition rate of the pulse-width sequence can also be changed exclusively discretely, and the frequency change step depends on the pulse repetition frequency itself. As a result, the accuracy of setting the duty cycle of the pulse-width sequence is limited by the bit depth of the microcontroller registers and the finiteness of the step of changing the duty cycle of the output pulse-width sequence. The frequency of the output pulse-width sequence is not equal to the frequency of the master oscillator, but is set with some error, determined by the frequency of the clock of the microcontroller, the capabilities of the pulse-width modulation module and the value of the pulse repetition rate itself.

В основу изобретения поставлена задача получения широтно-импульсной последовательности заданной скважности и частоты с высокой точностью при изменении частоты следования импульсов в широких пределах. Поставленная цель достигается тем, что по способу формирования широтно-импульсной последовательности, включающему задание частоты следования импульсов широтно-импульсной последовательности внешним задающим генератором, использование встроенного в микроконтроллер модуля широтно-импульсной модуляции, измерение частоты следования импульсов, осуществляемое с помощью встроенного в микроконтроллер модуля таймер-счетчика и осуществляемое путем сравнения этой частоты с частотой высокостабильного опорного генератора, отличающегося тем, что сигнал с выхода высокостабильного опорного генератора подают не на тактовый системный вход микроконтроллера, а на вход модуля таймер-счетчика микроконтроллера, при этом сигнал внешнего задающего генератора подают на первый вход фазового детектора, на другой вход которого подают сигнал с выхода делителя с переменным коэффициентом деления, при этом напряжение с выхода фазового детектора подают на вход генератора, управляемого напряжением, при этом сигнал с выхода генератора, управляемого напряжением, подают на тактовый системный вход микроконтроллера и одновременно на вход делителя с переменным коэффициентом деления, при этом коэффициент деления делителя с переменным коэффициентом деления задают при помощи микроконтроллера, подавая соответствующий управляющий код с выхода управления микроконтроллера на вход управления делителя с переменным коэффициентом деления, при этом величину коэффициента деления определяют путем измерения частоты следования импульсов генератора, управляемого напряжением, осуществляемое путем сравнения ее с частотой высокостабильного опорного генератора, при этом изменяют коэффициент деления делителя с переменным коэффициентом деления каждый раз при приближении частоты генератора, управляемого напряжением, к верхней или нижней границе его диапазона перестройки частоты, при этом предотвращающий неустойчивую работу системы гистерезис вводят программно, при этом скважность выходной широтно-импульсной последовательности задают с помощью встроенного в микроконтроллер модуля широтно-импульсной модуляции путем ввода в микроконтроллер двоичного кода любым доступным способом, например, с помощью любого стандартного цифрового интерфейса или с помощью встроенного в микроконтроллер модуля аналогово-цифрового преобразователя, подавая на его вход некоторый уровень постоянного напряжения, при этом с выхода индикации микроконтроллера подают сигнал на вход внешнего индикатора, который отображает частоту следования широтно-импульсной последовательности и заданное значение скважности, при этом выходную широтно-импульсную последовательность получают на выходе микроконтроллера, который соответствует выходу встроенного модуля широтно-импульсной модуляции, при этом частоту следования широтно-импульсной последовательности изменяют в широких пределах внешним задающим генератором, при этом частота выходной широтно-импульсной последовательности всегда будет в точности равна частоте следования импульсов задающего генератора, а скважность при этом будет всегда постоянной, причем величину скважности задают исключительно вводимым в микроконтроллер цифровым кодом.The basis of the invention is the task of obtaining a pulse-width sequence of a given duty cycle and frequency with high accuracy when changing the pulse repetition rate over a wide range. This goal is achieved by the fact that according to the method for generating a pulse-width sequence, which includes setting the pulse frequency of the pulse width sequence by an external master oscillator, using the pulse-width modulation module integrated in the microcontroller, measuring the pulse repetition rate using the timer module built into the microcontroller counter and carried out by comparing this frequency with the frequency of a highly stable reference generator, which differs that the signal from the output of the highly stable reference generator is supplied not to the clock system input of the microcontroller, but to the input of the timer module of the microcontroller, while the signal of the external master oscillator is fed to the first input of the phase detector, the signal from the output of the divider with a variable coefficient is supplied to its other input dividing, while the voltage from the output of the phase detector is fed to the input of the voltage-controlled generator, while the signal from the output of the voltage-controlled generator is fed to the system clock the progress of the microcontroller and at the same time to the input of the divider with a variable division coefficient, while the division ratio of the divider with a variable division coefficient is set using the microcontroller, applying the corresponding control code from the control output of the microcontroller to the control input of the divider with a variable division coefficient, and the value of the division coefficient is determined by measuring the pulse repetition rate of a voltage controlled oscillator by comparing it with a frequency highly stable about the reference generator, while changing the division ratio of the divider with a variable division coefficient each time the frequency of the generator controlled by the voltage approaches the upper or lower boundary of its frequency tuning range, while hysteresis is prevented from unstable operation, it is programmed, while the duty cycle is the pulse sequence is set using the pulse-width modulation module built into the microcontroller by entering a binary code into the microcontroller by any available m way, for example, using any standard digital interface or using the analog-to-digital converter module built into the microcontroller, applying a certain level of constant voltage to its input, while from the indication output of the microcontroller a signal is fed to the input of an external indicator that displays the repetition rate -pulse sequence and a predetermined duty cycle, while the output pulse-width sequence is obtained at the output of the microcontroller, which corresponds to the output of the built-in pulse width modulation module, while the pulse width of the pulse width sequence is changed widely by an external master oscillator, while the frequency of the pulse-width pulse sequence will always be exactly the pulse frequency of the master oscillator, and the duty cycle will always be constant moreover, the duty cycle is set exclusively by entering a digital code into the microcontroller.

Сравнение предлагаемого изобретения с уже известными способами и прототипом показывает, что заявляемый способ проявляет новые технические свойства, заключающиеся в получении широтно-импульсной последовательности заданной скважности и частоты, причем значение скважности остается неизменной при изменении частоты следования импульсов в широких пределах. Разрядность микроконтроллера и возможности модуля ШИМ при этом не оказывают влияние на дискретность формирования частоты выходной последовательности импульсов. Значение частоты выходной широтно-импульсной последовательности определяется при этом не возможностями встроенного в микроконтроллер модуля ШИМ и тактовой частотой микроконтроллера, а исключительно значением частоты внешнего задающего генератора, причем значение выходной частоты широтно-импульсной последовательности в точности равно значению частоты внешнего задающего генератора. Такой способ позволяет получить возможность задания скважности и частоты следования широтно-импульсной последовательности с более высокой точностью. Использование индикатора позволяет однозначно контролировать частоту и заданное значение скважности широтно-импульсной последовательности. A comparison of the present invention with already known methods and a prototype shows that the claimed method exhibits new technical properties, which consist in obtaining a pulse-width sequence of a given duty cycle and frequency, and the duty cycle value remains unchanged when the pulse repetition rate varies over a wide range. The depth of the microcontroller and the capabilities of the PWM module do not affect the frequency discreteness of the output pulse sequence. The frequency value of the output pulse-width sequence is determined not by the capabilities of the PWM module integrated into the microcontroller and the clock frequency of the microcontroller, but solely by the frequency of the external master oscillator, and the value of the output frequency of the pulse-width sequence is exactly equal to the frequency value of the external master oscillator. This method allows you to get the ability to set the duty cycle and repetition rate of the pulse-width sequence with higher accuracy. Using the indicator allows you to uniquely control the frequency and the set duty cycle value of the pulse-width sequence.

Указанный способ формирования широтно-импульсной последовательности заданной скважности и частоты с высокой точностью при изменении частоты повторения импульсов в широких пределах можно реализовать с помощью устройства, схема которого показана на рисунке. The specified method of forming a pulse-width sequence of a given duty cycle and frequency with high accuracy when changing the pulse repetition frequency over a wide range can be implemented using a device whose circuit diagram is shown in the figure.

Устройство для формирования широтно-импульсной последовательности заданной скважности и частоты с высокой точностью при изменении частоты повторения импульсов в широких пределах содержит высокостабильный опорный генератор 1, микроконтроллер 2, генератор, управляемый напряжением 3, фазовый детектор 4, индикатор 5, делитель с переменным коэффициентом деления 6. При этом выход высокостабильного опорного генератора 1 соединяют с первым входом микроконтроллера 2, который соответствует входу встроенного в микроконтроллер модуля таймер-счетчика, при этом второй вход микроконтроллера 2, который соответствует тактовому системному входу микроконтроллера, соединяют с выходом генератора, управляемого напряжением 3, при этом на третий вход микроконтроллера 2 подают сигнал, определяющий скважность выходной широтно-импульсной последовательности, при этом выход генератора, управляемого напряжением 3, соединяют также с сигнальным входом делителя с переменным коэффициентом деления 6, при этом выход делителя с переменным коэффициентом деления 6 соединяют с первым входом фазового детектора 4, выход которого соединяют с входом генератора, управляемого напряжением 3, при этом на второй вход фазового детектора 4 подают информационный сигнал от внешнего задающего генератора, при этом первый выход микроконтроллера 2 соединяют с входом индикатора 5, при этом на втором выходе микроконтроллера 2 получают широтно-импульсную последовательность, при этом третий выход микроконтроллера 2 соединяют с входом управления делителя с переменным коэффициентом деления 6.A device for generating a pulse-width sequence of a given duty cycle and frequency with high accuracy when changing the pulse repetition rate over a wide range contains a highly stable reference oscillator 1, a microcontroller 2, a voltage-controlled oscillator 3, a phase detector 4, indicator 5, a divider with a variable division ratio 6 Thus, the output of the highly stable reference generator 1 is connected to the first input of the microcontroller 2, which corresponds to the input of the timer-counter module integrated in the microcontroller ika, while the second input of the microcontroller 2, which corresponds to the clock system input of the microcontroller, is connected to the output of the generator controlled by voltage 3, while a signal determining the duty cycle of the output pulse-width sequence is supplied to the third input of the microcontroller 2, while the output of the generator controlled by voltage 3, is also connected to the signal input of the divider with a variable division coefficient 6, while the output of the divider with a variable division coefficient 6 is connected to the first input of the phase detector torus 4, the output of which is connected to the input of a generator controlled by voltage 3, while the second input of the phase detector 4 is supplied with an information signal from an external master oscillator, while the first output of the microcontroller 2 is connected to the input of the indicator 5, and at the second output of the microcontroller 2 pulse-width sequence, while the third output of the microcontroller 2 is connected to the control input of the divider with a variable division ratio 6.

Работает устройство следующим образом. Сигнал от внешнего задающего генератора, частота которого может изменяться в широких пределах, подают на первый вход фазового детектора. На второй вход фазового детектора подают сигнал с выхода делителя с переменным коэффициентом деления. В результате этого на выходе фазового детектора формируется некоторый уровень постоянного напряжения, зависящий от разности частот и фаз сигналов, поступающих на его входы. Это напряжение постоянного тока подают на вход генератора, управляемого напряжением. The device operates as follows. The signal from an external master oscillator, the frequency of which can vary widely, is fed to the first input of the phase detector. A signal from the output of the divider with a variable division coefficient is fed to the second input of the phase detector. As a result of this, a certain level of constant voltage is formed at the output of the phase detector, depending on the difference in frequencies and phases of the signals arriving at its inputs. This DC voltage is supplied to the input of a voltage controlled generator.

Генератор, управляемый напряжением, под действием управляющего сигнала, перестраивают в относительно узком диапазоне частот. Коэффициент перекрытия по частоте генератора, управляемого напряжением, должен составлять не менее 2 и может превышать эту величину незначительно. Реализуемый алгоритм работы микроконтроллера предполагает, что частота на выходе генератора, управляемого напряжением, должна изменяться ровно в два раза. Некоторое превышение коэффициента перекрытия по частоте указанной величины необходимо для устранения влияния дестабилизирующих факторов. Представляется, что, например, 10%-ный запас перекрытия по частоте будет вполне достаточным.The voltage-controlled generator, under the action of a control signal, is tuned in a relatively narrow frequency range. The frequency overlap coefficient of the voltage-controlled generator should be at least 2 and may slightly exceed this value. The implemented microcontroller operation algorithm assumes that the frequency at the output of the voltage-controlled generator should change exactly twice. A certain excess of the overlap coefficient in frequency of the indicated value is necessary to eliminate the influence of destabilizing factors. It seems that, for example, a 10% margin of frequency overlap would be sufficient.

Сигнал с выхода генератора, управляемого напряжением, подают на тактовый системный вход микроконтроллера. Поскольку частота на выходе генератора, управляемого напряжением, изменяется не более чем в два раза, время выполнения команд микроконтроллера также изменяется в пределах этой величины, что при известных допущениях не сказывается на работе микроконтроллера с периферийными устройствами. Кроме того, само время исполнения реализуемого алгоритма работы микроконтроллера остается достаточно малым, при том что частота следования импульсов внешнего задающего генератора может изменяться в широких пределах. The signal from the output of the voltage-controlled generator is fed to the clock system input of the microcontroller. Since the frequency at the output of the voltage-controlled generator does not change more than two times, the execution time of the microcontroller commands also varies within this value, which, under certain assumptions, does not affect the operation of the microcontroller with peripheral devices. In addition, the execution time of the implemented microcontroller operation algorithm remains quite small, despite the fact that the pulse repetition rate of the external master oscillator can vary over a wide range.

Сигнал с выхода генератора, управляемого напряжением, одновременно подают и на сигнальный вход делителя частоты с переменным коэффициентом деления. Фазовый детектор совместно с генератором, управляемым напряжением, и делителем с переменным коэффициентом деления образуют кольцо фазовой автоподстройки частоты. Коэффициент деления этого делителя может изменяться ступенчато и может составлять величины, равные степени числа 2. Минимальное значение коэффициента деления определяется возможностями модуля ШИМ микроконтроллера по формированию выходной широтно-импульсной последовательности требуемой частоты и скважности необходимого разрешения при заданной тактовой частоте микроконтроллера. Максимальное значение коэффициента деления также ограничено возможностями модуля ШИМ микроконтроллера по формированию последовательности импульсов минимальной частоты при заданной тактовой частоте микроконтроллера. В любом случае диапазон частот формируемой микроконтроллером широтно-импульсной последовательности достаточно широк и может составлять несколько декад при изменении частоты тактового системного генератора в два раза. При этом коэффициенты деления частоты внутреннего делителя частоты модуля ШИМ микроконтроллера (с учетом возможного подключения предварительного делителя частоты тактового генератора) и внешнего делителя частоты с переменным коэффициентом деления должны быть совершенно идентичны. Таким образом, делитель с переменным коэффициентом деления осуществляет деление частоты генератора, управляемого напряжением, до величины частоты входного сигнала задающего генератора. При работе системы фазовой автоподстройки частоты в режиме синхронизации эти две частоты будут равны друг другу в точности. Кроме того, частота следования импульсов выходной широтно-импульсной последовательности будет в точности равна частоте внешнего задающего генератора. The signal from the output of the voltage-controlled generator is simultaneously fed to the signal input of a frequency divider with a variable division coefficient. A phase detector together with a voltage-controlled oscillator and a variable-division divider form a phase-locked loop. The division coefficient of this divider can vary in steps and can be equal to the power of number 2. The minimum value of the division coefficient is determined by the PWM module of the microcontroller to generate the output pulse-width sequence of the required frequency and duty cycle for the required resolution at the given clock frequency of the microcontroller. The maximum value of the division coefficient is also limited by the capabilities of the PWM module of the microcontroller to generate a sequence of pulses of the minimum frequency at a given clock frequency of the microcontroller. In any case, the frequency range of the pulse-width sequence generated by the microcontroller is quite wide and can be several decades when the clock frequency of the system generator is changed twice. In this case, the frequency division factors of the internal frequency divider of the PWM module of the microcontroller (taking into account the possible connection of a preliminary clock frequency divider) and the external frequency divider with a variable division coefficient must be completely identical. Thus, a divider with a variable division coefficient divides the frequency of the voltage-controlled generator to the frequency of the input signal of the master oscillator. When the phase locked loop system operates in synchronization mode, these two frequencies will be exactly equal to each other. In addition, the pulse repetition rate of the output pulse-width sequence will be exactly equal to the frequency of the external master oscillator.

Программный код, заложенный в память микроконтроллера по заданному алгоритму в зависимости от приближения к верхней или нижней границе рабочего диапазона частот генератора, управляемого напряжением, подает цифровую комбинацию на вход управления делителя с переменным коэффициентом деления, изменяя его коэффициент деления вдвое (увеличение вдвое при приближении частоты к верхней границе диапазона или уменьшение вдвое при приближении к нижней границе диапазона). The program code stored in the memory of the microcontroller according to a predetermined algorithm, depending on the approach to the upper or lower boundary of the operating frequency range of the voltage-controlled generator, supplies a digital combination to the control input of the divider with a variable division ratio, changing its division ratio by half (doubling when the frequency approaches to the upper limit of the range or decrease by half when approaching the lower limit of the range).

Для измерения частоты сигнала генератора, управляемого напряжением, необходим источник опорного сигнала с высокой стабильностью частоты. Сигнал этого высокостабильного опорного генератора подают на вход микроконтроллера, который соответствует входу модуля таймер-счетчика микроконтроллера. При этом осуществляют измерение частоты генератора, управляемого напряжением, методом, единственное отличие которого от известного метода заключается в том, что сигнал высокостабильного опорного генератора подают не на тактовый системный вход микроконтроллера и измеряемый сигнал на вход таймера-счетчика, а наоборот, сигнал высокостабильного опорного генератора подают на вход таймера-счетчика и измеряемый сигнал подают на тактовый системный вход микроконтроллера. В любом из этих двух случаев информация о частоте генератора, управляемого напряжением, будет адекватна.To measure the frequency of a voltage controlled oscillator signal, a reference signal source with high frequency stability is required. The signal of this highly stable reference generator is fed to the input of the microcontroller, which corresponds to the input of the timer module of the microcontroller. In this case, the frequency of the voltage-controlled oscillator is measured by a method whose only difference from the known method is that the signal of the highly stable reference generator is supplied not to the clock system input of the microcontroller and the measured signal to the input of the timer-counter, but rather the signal from the highly stable reference generator fed to the input of the timer-counter and the measured signal is fed to the clock system input of the microcontroller. In either of these two cases, information about the frequency of the voltage controlled oscillator will be adequate.

Процесс переключения происходит повторно при каждом последующем приближении к границам частотного диапазона генератора, управляемого напряжением. The switching process occurs repeatedly at each subsequent approach to the boundaries of the frequency range of the generator controlled by voltage.

Если текущее значение частоты внешнего задающего генератора априори неизвестно и при очередном изменении коэффициента деления делителя с переменным коэффициентом деления вдвое частота генератора, управляемого напряжением, не изменилась вдвое в адекватную сторону, то это означает, что система фазовой автоподстройки частоты еще не работает в режиме синхронизации и коэффициент деления нужно изменить вдвое еще раз в ту же сторону. Эту процедуру необходимо повторять до тех пор, пока система фазовой автоподстройки частоты не будет работать в режиме синхронизации (при изменении вдвое коэффициента деления частота также изменяется вдвое).If the current value of the frequency of the external master oscillator is a priori unknown and the next time the dividing factor of the divider with a variable dividing factor by half, the frequency of the voltage-controlled oscillator has not changed by half in an adequate direction, then this means that the phase-locked loop does not yet work in synchronization mode and the division factor must be doubled again in the same direction. This procedure must be repeated until the phase-locked loop does not work in synchronization mode (if the division coefficient is doubled, the frequency also doubles).

После того, как система фазовой автоподстройки частоты была введена в режим синхронизации и частота следования выходных импульсов модуля широтно-импульсной модуляции стала равной в точности частоте следования импульсов внешнего задающего генератора, приступают к формированию заданной скважности импульсов. Для этого в микроконтроллер вводят необходимый цифровой код любым известным образом. В большинстве случаев 256 градаций скважности оказывается более чем достаточно, поэтому в этом случае необходимо вводить 8-разрядный цифровой двоичный код. Это можно сделать, используя, например, любой стандартный параллельный или последовательный цифровой интерфейс микроконтроллера или встроенный модуль аналого-цифрового преобразователя, подавая на его вход некоторый уровень постоянного напряжения. Введенный цифровой код задает соответствующую скважность выходной последовательности импульсов, которая не будет зависеть от частоты следования импульсов.After the phase locked loop system was put into synchronization mode and the pulse repetition rate of the pulse width modulation module became equal in accuracy to the pulse repetition rate of the external master oscillator, they begin to form the desired pulse duty cycle. For this, the necessary digital code is entered into the microcontroller in any known manner. In most cases, 256 gradations of duty cycle is more than enough, so in this case you must enter an 8-bit digital binary code. This can be done using, for example, any standard parallel or serial digital interface of the microcontroller or the built-in analog-to-digital converter module, applying a certain level of constant voltage to its input. The entered digital code sets the corresponding duty cycle of the output pulse sequence, which will not depend on the pulse repetition rate.

Индикатор, вход которого соединен с первым выходом микроконтроллера, позволяет получить наглядность процесса, отображая частоту повторения импульсов и заданную скважность выходной широтно-импульсной последовательности.The indicator, the input of which is connected to the first output of the microcontroller, allows you to get the visibility of the process by displaying the pulse repetition rate and the given duty cycle of the output pulse-width sequence.

Народнохозяйственный эффект от использования предлагаемого изобретения связан с возможностью получения широтно-импульсной последовательности заданной скважности и частоты с высокой точностью при изменении частоты следования импульсов в широких пределах. При этом значение частоты выходной широтно-импульсной последовательности определяется не содержимым регистров модуля ШИМ микроконтроллера, а внешним задающим генератором и имеет ту же нестабильность частоты и тот же шаг перестройки в случае использования цифрового метода синтеза частот.The economic effect of the use of the invention is associated with the ability to obtain a pulse-width sequence of a given duty cycle and frequency with high accuracy when changing the pulse repetition rate over a wide range. In this case, the frequency value of the output pulse-width sequence is determined not by the contents of the registers of the PWM module of the microcontroller, but by an external master oscillator and has the same frequency instability and the same tuning step in the case of using the digital method of frequency synthesis.

Claims (1)

Способ формирования широтно-импульсной последовательности заданной скважности и частоты с высокой точностью при изменении частоты следования импульсов в широких пределах, включающий задание частоты следования импульсов широтно-импульсной последовательности внешним задающим генератором, использование встроенного в микроконтроллер модуля широтно-импульсной модуляции, измерение частоты следования импульсов, осуществляемое с помощью встроенного в микроконтроллер модуля таймер-счетчика и осуществляемое путем сравнения этой частоты с частотой высокостабильного опорного генератора, отличающийся тем, что сигнал с выхода высокостабильного опорного генератора подают не на тактовый системный вход микроконтроллера, а на вход модуля таймер-счетчика микроконтроллера, при этом сигнал внешнего задающего генератора подают на первый вход фазового детектора, на другой вход которого подают сигнал с выхода делителя с переменным коэффициентом деления, при этом напряжение с выхода фазового детектора подают на вход генератора, управляемого напряжением, при этом сигнал с выхода генератора, управляемого напряжением, подают на тактовый системный вход микроконтроллера и одновременно на вход делителя с переменным коэффициентом деления, при этом коэффициент деления делителя с переменным коэффициентом деления задают при помощи микроконтроллера, подавая соответствующий управляющий код с выхода управления микроконтроллера на вход управления делителя с переменным коэффициентом деления, при этом величину коэффициента деления определяют путем измерения частоты следования импульсов генератора, управляемого напряжением, осуществляемое путем сравнения ее с частотой высокостабильного опорного генератора, при этом изменяют коэффициент деления делителя с переменным коэффициентом деления каждый раз при приближении частоты генератора, управляемого напряжением, к верхней или нижней границе его диапазона перестройки частоты, при этом предотвращающий неустойчивую работу системы гистерезис вводят программно, при этом скважность выходной широтно-импульсной последовательности задают с помощью встроенного в микроконтроллер модуля широтно-импульсной модуляции путем ввода в микроконтроллер двоичного кода любым доступным способом, например, с помощью любого стандартного цифрового интерфейса или с помощью встроенного в микроконтроллер модуля аналогово-цифрового преобразователя, подавая на его вход некоторый уровень постоянного напряжения, при этом с выхода индикации микроконтроллера подают сигнал на вход внешнего индикатора, который отображает частоту следования широтно-импульсной последовательности и заданное значение скважности, при этом выходную широтно-импульсную последовательность получают на выходе микроконтроллера, который соответствует выходу встроенного модуля широтно-импульсной модуляции, при этом частоту следования широтно-импульсной последовательности изменяют в широких пределах внешним задающим генератором, при этом частота выходной широтно-импульсной последовательности всегда будет в точности равна частоте следования импульсов задающего генератора, а скважность при этом будет всегда постоянной, причем величину скважности задают исключительно вводимым в микроконтроллер цифровым кодом. A method for generating a pulse-width sequence of a given duty cycle and frequency with high accuracy when changing the pulse repetition rate over a wide range, including setting the pulse repetition rate of the pulse-width sequence by an external master oscillator, using the pulse-width modulation module built into the microcontroller, measuring pulse repetition rate, carried out using the timer-counter module integrated in the microcontroller and carried out by comparing this frequency with the frequency of the highly stable reference generator, characterized in that the signal from the output of the highly stable reference generator is supplied not to the clock system input of the microcontroller, but to the input of the timer module of the microcontroller, while the signal from the external master oscillator is fed to the first input of the phase detector, to the other input of which apply a signal from the output of the divider with a variable division coefficient, while the voltage from the output of the phase detector is fed to the input of a voltage-controlled generator, while the output signal a voltage controlled oscillator is supplied to the clock system input of the microcontroller and simultaneously to the input of the divider with a variable division coefficient, while the division coefficient of the divider with a variable division coefficient is set using the microcontroller, applying the corresponding control code from the control output of the microcontroller to the control input of the divider with a variable coefficient division, while the value of the division coefficient is determined by measuring the pulse repetition rate of the generator controlled voltage by comparing it with the frequency of a highly stable reference oscillator, changing the division ratio of the divider with a variable division coefficient each time the frequency of the voltage controlled generator approaches the upper or lower limit of its frequency tuning range, while hysteresis is introduced to prevent unstable operation of the system programmatically, the duty cycle of the output pulse-width sequence is set using the pulse-width-m module integrated in the microcontroller dilation by entering the binary code into the microcontroller in any way possible, for example, using any standard digital interface or using the analog-to-digital converter module built into the microcontroller, supplying a certain level of constant voltage to its input, while the signal from the microcontroller is output an external indicator that displays the pulse-width sequence repetition rate and the set duty cycle value, while the output pulse-width sequence The output is obtained at the output of the microcontroller, which corresponds to the output of the built-in pulse-width modulation module, while the pulse-width repetition rate is varied widely by an external master oscillator, while the frequency of the pulse-width-pulse output will always be exactly equal to the pulse frequency of the master oscillator and the duty cycle will always be constant, and the duty cycle is set exclusively by the digital code entered into the microcontroller.
RU2016114326/93A 2016-04-13 2016-04-13 Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range RU2600563C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2016114326/93A RU2600563C1 (en) 2016-04-13 2016-04-13 Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2016114326/93A RU2600563C1 (en) 2016-04-13 2016-04-13 Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range

Publications (1)

Publication Number Publication Date
RU2600563C1 true RU2600563C1 (en) 2016-10-20

Family

ID=57138603

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2016114326/93A RU2600563C1 (en) 2016-04-13 2016-04-13 Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range

Country Status (1)

Country Link
RU (1) RU2600563C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344079A (en) * 2022-10-18 2022-11-15 武汉亚为电子科技有限公司 Pulse control equipment and use method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344079A (en) * 2022-10-18 2022-11-15 武汉亚为电子科技有限公司 Pulse control equipment and use method thereof

Similar Documents

Publication Publication Date Title
JP3406439B2 (en) Variable delay circuit delay time measurement device
JPH095408A (en) Timing signal generating circuit
KR970075214A (en) Waveform Shaping and Clock Supplies
CN103427836A (en) Frequency signal generation system and display device
TW201431296A (en) Pulse width modulation signal generation circuit and pulse width modulation signal generation method
CN106656109B (en) Digital clock duty cycle correction
US8841960B2 (en) Clock signal generating circuit and power supply including the same
CN107528567A (en) Injection locked oscillator and the semiconductor devices for including it
CN107896106A (en) Adjust the phase of digital phase locked loop
US7188131B2 (en) Random number generator
RU2600563C1 (en) Method of generating pulse-width sequence with given pulse ratio and frequency with high-accuracy with variation of pulse repetition frequency in wide range
US9602115B1 (en) Method and apparatus for multi-rate clock generation
KR100417752B1 (en) Method and apparatus for frequency modulation of high frequency signal
US9244484B2 (en) Fractional-N spread spectrum state machine
US6563350B1 (en) Timing signal generator employing direct digital frequency synthesis
CN208257788U (en) A kind of high frequency resolution pulse digit generating system
US7061417B2 (en) Method and system for increased effective resolution in an N-bit digital-to-analog converter
Li et al. An Event-Driven-Based Behavioral Modeling for Fractional-N CP-PLL
UA98433C2 (en) Method for shaping pulse duration sequence with preset pulse ratio and frequency with high accuracy at pulse repetition frequency varying within wide range
RU2612055C1 (en) Digital phase-shifting device
US4001726A (en) High accuracy sweep oscillator system
US20120313716A1 (en) Two oscillator synchronization system
RU2788980C1 (en) Measuring generator of paired pulses
US3319181A (en) High stability phase locked oscillator
CN108566201A (en) A kind of high frequency resolution pulse digit generating system

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20170818