A strobe controller and output control method thereof
By configuring the timer of the strobe controller to provide N light sources and N camera outputs for the general-purpose processor, the problem of the general-purpose processor being unable to meet the demand for 2N independent timers is solved, and precise control is achieved.
Patent Information
- Application Number
- CN202210458149.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-04-27
AI Technical Summary
General-purpose processors cannot meet the controller's requirements for precise control of N-channel light source outputs and N-channel camera outputs, especially the requirements for 2N independent timers.
A strobe controller is provided. Each timer in a processor includes a channel comparison register, a count register, and a channel control register. Through configuration information and a trigger signal, one PWM mode output and one comparison mode output are realized, thereby reducing the requirement for the number of timers in the processor.
The use of a general-purpose processor enables precise control of N-channel light source outputs and N-channel camera outputs, reduces the difficulty of processor selection, and meets the demand for 2N independent timers.
Smart Images

Figure CN114779700B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of industrial control, and in particular to a strobe controller and an output control method thereof. Background Art
[0002] With the development of industrial automation, machine vision systems have become the core driver of industrial automation. Lighting is a key factor affecting machine vision system input. Since there are no universal standards for light source equipment, controllers are used to adjust the light source for each specific application scenario to achieve optimal machine vision system performance.
[0003] To meet current industrial needs, controllers often need to control multiple light source outputs and multiple camera outputs, each of which is controlled by an independent timer. As the number of light source outputs and camera outputs increases, the requirements for the controller's control chip also increase. To precisely control N light source outputs and N camera outputs, the controller processor needs at least 2N independent timers, and each of these 2N timers must support at least one PWM (Pulse Width Modulation) output. However, general-purpose processors generally support 3-5 (less than 2N) independent timers, which is insufficient for meeting the requirement of 2N independent timers. Summary of the Invention
[0004] The present application provides a stroboscopic controller and an output control method thereof to solve the technical problem that the controller cannot achieve precise control of N-way light source output and N-way camera output using a general-purpose processor.
[0005] In order to achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, the present application provides a strobe controller, characterized in that it includes N light source outputs, N camera outputs, and a processor, wherein the processor has at least M timers (N≤M<2N), each timer including a channel comparison register, a count register, and a channel control register, and each timer is configured as follows:
[0007] Acquire configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width;
[0008] When the configuration information meets the configuration conditions, determining, according to the configuration of the channel control register, that the timer has one PWM mode output for light source output and one comparison mode output for controlling camera output, and modifying the values of the channel comparison register and the counter register according to the configuration information;
[0009] Obtaining a trigger signal and starting the timer to count;
[0010] According to the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained.
[0011] In combination with the first aspect, in one implementable manner, the configuration conditions include: the preset light source output delay is greater than the delay threshold; the preset light source output pulse width is greater than or equal to 0us and less than or equal to 999us; the preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width.
[0012] In combination with the first aspect, in one implementable manner, modifying the values of the channel comparison register and the counting register according to the configuration information includes: the value of the counting register is the sum of a preset light source output pulse width and a preset light source output delay; when the light source is output, the first value corresponding to the channel comparison register is the preset light source output pulse width; when controlling the camera output, the second value corresponding to the channel comparison register is the sum of the preset light source output pulse width and the preset light source output delay minus the preset camera output delay.
[0013] In combination with the first aspect, in one implementable method, each timer also includes a counter automatic reload register: when the configuration information meets the configuration conditions, the value of the counter automatic reload register is configured according to the configuration information, and the value of the counter automatic reload register is greater than the sum of the preset light source output delay and the preset light source output pulse width.
[0014] In combination with the first aspect, in one implementable manner, obtaining one-way light source control output and one-way camera control output based on the count value of the counting register and the working mode of the timer includes: outputting a level by comparing the count value of the counting register with the value of a channel comparison register; turning off the light source output when the first count value of the timer is equal to zero; and turning off the control camera output when the second count value of the timer is equal to zero.
[0015] In combination with the first aspect, in one implementable manner, when the light source is outputting and the working mode of the timer is down counting, outputting a level by comparing the count value of the counting register with the value of the channel comparison register includes:
[0016] When the count value of the counting register is greater than the first value of the channel comparison register, a low level is output;
[0017] When the count value of the counting register is less than or equal to the first value of the channel comparison register, a high level is output.
[0018] In combination with the first aspect, in one implementable manner, when controlling the camera output and the working mode of the timer is down counting, outputting a level by comparing the count value of the counting register with the value of the channel comparison register includes:
[0019] When the count value of the counting register is greater than the second value of the channel comparison register, a low level is output;
[0020] When the count value of the counting register is equal to the second value of the channel comparison register, a high level is output;
[0021] When the count value of the counting register is equal to zero, a high level is output;
[0022] Counting down from the value of the counter auto-reload register;
[0023] When the count value of the counting register is equal to the second value of the channel comparison register again, a low level is output.
[0024] As can be seen from the above technical solution, the present application provides a strobe controller, including N light source outputs, N camera outputs, and a processor, wherein the processor has at least M timers (N≤M<2N), each timer including a channel comparison register, a count register, and a channel control register, and each timer is configured to: obtain configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width. When the configuration information meets the configuration conditions, the timer is determined to have one PWM mode output for light source output and one comparison mode output for controlling camera output according to the configuration of the channel control register, and the values of the channel comparison register and the count register are modified according to the configuration information; a trigger signal is obtained, and the counting of the timer is started; according to the count value of the count register and the working mode of the timer, one light source output and one camera control output are obtained. The present application uses one timer to realize one light source output and one camera control output; reduces the requirements for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to realize the functions of the strobe controller.
[0025] In a second aspect, the present application provides an output control method for a strobe controller, the output control method comprising the following steps:
[0026] Acquire configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width;
[0027] When the configuration information meets the configuration conditions, determining that the timer has one PWM mode output for light source output and one comparison mode output for controlling camera output according to the configuration of the channel control register, and modifying the values of the channel comparison register and the counter register according to the configuration information;
[0028] Obtaining a trigger signal and starting the timer to count;
[0029] According to the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained.
[0030] As can be seen from the above technical solution, the present application provides an output control method for a strobe-type controller, including obtaining configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width. When the configuration information meets the configuration conditions, the timer is determined to have one PWM mode output for light source output and one comparison mode output for controlling camera output according to the configuration of the channel control register, and the values of the channel comparison register and the counting register are modified according to the configuration information; a trigger signal is obtained, and the counting of the timer is started; according to the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained. The present application uses a one-way timer to realize one-way light source output and one-way camera control output; reduces the requirements for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to realize the functions of the strobe-type controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 This is a structural diagram of a strobe controller according to an embodiment of the present application;
[0033] Figure 2 This is a diagram showing the relationship between the trigger signal, light source output, and camera output of a strobe-type controller according to an embodiment of the present application;
[0034] Figure 3 This is a flow chart of an output control method of a strobe controller according to an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] Machine vision automates factory processes based on acquired image data. Machine vision primarily involves light sources, lenses, and cameras. Lighting is a crucial factor affecting the input of machine vision systems. Since there are no universal standards for light source equipment, controllers adjust the lighting for each specific application scenario to achieve optimal results.
[0038] The main function of a light source controller is to control the brightness and lighting status (e.g., on, off, etc.) of the light source. Generally speaking, the controller has two main light source control modes: constant light mode and strobe mode. In constant light mode, the light source remains illuminated at a set current or voltage value. In strobe mode, the light source controller illuminates the light source at specific moments and remains off at other times. This can instantly increase the light source's brightness several times without affecting its lifespan.
[0039] The controller in strobe mode provides instant brightness by controlling the light source device. Since the light source is on for a short time, the internal temperature rise of the light source device is suppressed, thus extending the service life of the light source device.
[0040] To precisely control N light source outputs and N camera control outputs, the controller processor requires at least 2N independent timers, each of which must support at least one PWM (Pulse Width Modulation) output. However, general-purpose processors typically support 3-5 (less than 2N) independent timers, making them incapable of meeting the 2N independent timer requirement.
[0041] In order to solve the above problems, some embodiments of the present application provide a strobe controller, such as Figure 1 As shown, the strobe controller includes N light source outputs, N camera outputs, and a processor. The processor has M timers (N≤M<2N), each of which is independent. Each timer includes a counter auto-reload register, a channel comparison register, a count register, and a channel control register.
[0042] For ease of description, in this embodiment, the counter auto-reload register is recorded as PERIOD; the channel comparison register is recorded as CHxVAL, where x is 0 for light source output and x is 1 for camera control output; the counting register is recorded as COUNT; and the channel control register is recorded as CHxCTL, where x is 0 for light source output and x is 1 for camera control output.
[0043] Each timer is configured as:
[0044] Obtain configuration information, including a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width. For ease of description in this embodiment, the preset light source output delay is denoted as dch, the preset light source output pulse width is denoted as pch, the preset camera output delay is denoted as dtr, and the camera output pulse width is denoted as ptr.
[0045] The camera output pulse width is a fixed value. The units of the preset light source output delay, preset light source output pulse width, preset camera output delay, and camera output pulse width are in µs and are positive integers.
[0046] Determine whether the configuration information meets the configuration conditions, the configuration conditions being that the preset light source output delay is greater than the delay threshold, the preset light source output pulse width is greater than or equal to 0us and less than or equal to 999us, and the preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width. That is, the configuration conditions are that the preset light source output delay dch > delay threshold; the preset light source output pulse width pch > = 0us and the preset light source output pulse width pch = < 999us; the preset camera output delay dtr > = dch and the preset camera output delay dtr <dch+pch。
[0047] In one embodiment, the delay threshold may be set to 10 us. For general hardware, if the delay is within 10 us, software compensation is required to reach a state close to 10 us. At the same time, the delay threshold may also be set to 20 us.
[0048] When the configuration information does not meet the configuration conditions, the current configuration operation is terminated and the previous configuration information can be retained.
[0049] When the configuration information meets the configuration conditions, it is determined according to the configuration of the channel control register that the timer has one PWM mode output for light source output and one comparison mode output for controlling camera output, and the values of the channel comparison register and the counting register are modified according to the configuration information, and the value of the counter automatic reload register is configured according to the configuration information.
[0050] The value of the counter automatic reload register is greater than the sum of the preset light source output delay and the preset light source output pulse width.
[0051] Modifying the values of the channel comparison register and the counter register according to the configuration information includes:
[0052] The value of the counting register COUNT is the sum of the preset light source output pulse width and the preset light source output delay, that is, COUNT=dch+pch.
[0053] In PWM mode output (ie, light source output), the value of the channel comparison register CH0VAL (ie, the corresponding first value) is the preset light source output pulse width, ie, CH0VAL=pch.
[0054] In comparison mode output (i.e., controlling camera output), the value of the channel comparison register CH1VAL (i.e., the corresponding second value) is the sum of the preset light source output pulse width and the preset light source output delay minus the preset camera output delay, i.e., CH1VAL=dch+pch–dtr.
[0055] Configure the channel control register CH0CTL for PWM output mode, i.e., light source output; configure the channel control register CH1CTL for compare output mode, i.e., camera output control. The light source output controls the strobe lighting according to the preset light source output pulse width and preset light source output delay. Camera output controls the camera according to the camera output pulse width and preset camera output delay. Edge-triggered signals are typically used, outputting a rising edge signal from a low level to a high level, or a falling edge signal from a high level to a low level.
[0056] like Figure 2 As shown, the control camera output can be triggered by a rising edge, and the following embodiments of the present application will take the rising edge trigger as an example; the control camera output can also be triggered by a falling edge. Figure 2 In , time means as follows:
[0057] t0: starting time;
[0058] t1: The strobe controller receives an external rising edge trigger signal;
[0059] t2: The light source starts to output a high level;
[0060] t3: Control the camera to start outputting high level;
[0061] t4: The light source stops outputting;
[0062] t5: Control the camera to end output;
[0063] t6: The strobe controller ends the current trigger output and disables the timer counting function. During t1 to t6, it only responds to the trigger signal at time t1, and the trigger signal between t5 and t6 is ignored.
[0064] The configuration information must be confirmed before the trigger signal is received for the configuration to take effect.
[0065] A trigger signal is obtained, and a counting function of the timer is started.
[0066] When the light source is output, when the timer count value COUNT is equal to 0 for the first time, the light source output is turned off.
[0067] In one embodiment, the timer adopts a down-counting working mode. When the count value COUNT of the counting register is greater than the channel comparison register CH0VAL, that is, CH0VAL=pch, the timer outputs a low level; when the count value COUNT of the counting register is less than or equal to the channel comparison register CH0VAL, that is, CH0VAL=pch, the timer outputs a high level.
[0068] When controlling the camera output, the camera output will be turned off only when the second count value COUNT of the timer is equal to 0.
[0069] In one embodiment, Figure 2 As shown, at time t1, the count value COUNT of the count register in the timer is greater than the channel comparison register CH1VAL, and the output is low; at time t3, the count value COUNT of the count register in the timer is equal to the channel comparison register CH1VAL, and the output is high; at time t4, the count value COUNT of the count register in the timer is equal to 0, and the output is still high, and the counter starts counting the next cycle (counting down from the value PERIOD of the counter automatic reload register); at time t5, the count value COUNT of the count register in the timer is equal to the channel comparison register CH1VAL again, and the output is low.
[0070] For example, when precise control of four light source outputs and four camera control outputs is required, the processor in the strobe controller requires at least eight independent timers, and each of these eight timers supports at least one PWM (Pulse Width Modulation) output. However, general-purpose processors generally support three to five independent timers, which cannot meet the requirement for eight independent timers. This application enables a general-purpose processor (supporting at least four independent timers) to meet the requirements for controlling four light source outputs and four camera control outputs.
[0071] As can be seen from the above technical solution, the present application provides a strobe controller, including N light source outputs, N camera outputs, and a processor, wherein the processor has at least M timers (N≤M<2N), each timer including a channel comparison register, a count register, and a channel control register, and each timer is configured to: obtain configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width. When the configuration information meets the configuration conditions, the timer is determined to have one PWM mode output for light source output and one comparison mode output for controlling camera output according to the configuration of the channel control register, and the values of the channel comparison register and the count register are modified according to the configuration information; a trigger signal is obtained, and the counting of the timer is started; according to the count value of the count register and the working mode of the timer, one light source output and one camera control output are obtained. The present application uses one timer to realize one light source output and one camera control output; reduces the requirements for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to realize the functions of the strobe controller.
[0072] Some embodiments of the present application provide an output control method for a strobe type controller, such as Figure 3 As shown, the output control method includes the following steps:
[0073] S101. Acquire configuration information, where the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width.
[0074] The camera output pulse width is a fixed value. The units of the preset light source output delay, preset light source output pulse width, preset camera output delay, and camera output pulse width are in µs and are positive integers.
[0075] S102. When the configuration information meets the configuration conditions, determine, according to the configuration of the channel control register, that the timer has one PWM mode output for light source output and one comparison mode output for controlling camera output, and modify the values of the channel comparison register and the counter register according to the configuration information.
[0076] The value of the counting register COUNT is the sum of the preset light source output pulse width and the preset light source output delay, that is, COUNT=dch+pch.
[0077] In PWM mode output (ie, light source output), the value of the channel comparison register CH0VAL (ie, the corresponding first value) is the preset light source output pulse width, ie, CH0VAL=pch.
[0078] In comparison mode output (i.e., controlling camera output), the value of the channel comparison register CH1VAL (i.e., the corresponding second value) is the sum of the preset light source output pulse width and the preset light source output delay minus the preset camera output delay, i.e., CH1VAL=dch+pch–dtr.
[0079] S103: When the configuration information does not meet the configuration conditions, end the configuration operation.
[0080] At this point, you can keep the previous configuration information.
[0081] S104: Acquire a trigger signal and start counting of the timer.
[0082] S105 , obtaining one light source output and one camera control output according to the count value of the count register and the working mode of the timer.
[0083] When the light source is output, when the timer count value COUNT is equal to 0 for the first time, the light source output is turned off.
[0084] In one embodiment, the timer adopts a down-counting working mode. When the count value COUNT is greater than the channel comparison register CH0VAL, that is, CH0VAL=pch, the timer outputs a low level; when the count value COUNT is less than or equal to the channel comparison register CH0VAL, that is, CH0VAL=pch, the timer outputs a high level.
[0085] When controlling the camera output, the camera output will be turned off only when the second count value COUNT of the timer is equal to 0.
[0086] In one embodiment, Figure 2 As shown, at time t1, the timer count value COUNT is greater than the channel comparison register CH1VAL, and the output is low; at time t3, the timer count value COUNT is equal to the channel comparison register CH1VAL, and the output is high; at time t4, the timer count value COUNT is equal to 0, and the output is still high, and the counter starts counting the next cycle (counting down from the value PERIOD of the counter auto-reload register); at time t5, the timer count value COUNT is equal to the channel comparison register CH1VAL again, and the output is low.
[0087] As can be seen from the above technical solution, the present application provides an output control method for a strobe-type controller, including obtaining configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width. When the configuration information meets the configuration conditions, the timer is determined to have one PWM mode output for light source output and one comparison mode output for controlling camera output according to the configuration of the channel control register, and the values of the channel comparison register and the counting register are modified according to the configuration information; a trigger signal is obtained, and the counting of the timer is started; according to the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained. The present application uses a one-way timer to realize one-way light source output and one-way camera control output; reduces the requirements for the number of timers in the processor, reduces the difficulty of processor selection, and uses a general-purpose processor to realize the functions of the strobe-type controller.
[0088] The above content is only for explaining the technical idea of the present application and cannot be used to limit the protection scope of the present application. Any changes made on the basis of the technical solution in accordance with the technical idea proposed in the present application shall fall within the protection scope of the claims of the present application.
[0089] In addition, unless expressly stated in the claims, the order of the processing elements and sequences described in this application, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of this application. Although the above disclosure discusses some embodiments currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of this application. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.
[0090] Similarly, it should be noted that, in order to simplify the description of the present disclosure and thus facilitate understanding of one or more embodiments, the foregoing descriptions of the embodiments of the present disclosure sometimes combine multiple features into a single embodiment, figure, or description thereof. However, this disclosure method does not mean that the subject matter of the present disclosure requires more features than those recited in the claims. In fact, the features of an embodiment may be fewer than all the features of a single embodiment disclosed above.
[0091] Each patent, patent application, patent application disclosure, and other materials, such as articles, books, specifications, publications, documents, etc., cited in this application is hereby incorporated by reference in its entirety. This includes application history documents that are inconsistent with or conflict with the content of this application, as well as documents (currently or subsequently attached to this application) that limit the broadest scope of the claims of this application. It should be noted that if the descriptions, definitions, and / or use of terms in the accompanying materials of this application are inconsistent or conflicting with the content of this application, the descriptions, definitions, and / or use of terms in this application shall prevail.
Claims
1. A strobe controller, characterized in that: include: N-way light source output; N-channel camera output; A processor having at least M timers, where M is less than 2N and not less than N, each timer including a channel comparison register, a counter register, and a channel control register, and each timer is configured as follows: Acquire configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width; When the configuration information meets the configuration conditions, determining, according to the configuration of the channel control register, that the timer has one PWM mode output for light source output and one comparison mode output for controlling camera output, and modifying the values of the channel comparison register and the counter register according to the configuration information; Obtaining a trigger signal and starting the timer to count; According to the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained; The configuration conditions include: The preset light source output delay is greater than the delay threshold; The preset light source output pulse width is greater than or equal to 0us and less than or equal to 999us; The preset camera output delay is greater than or equal to the preset light source output delay and less than the sum of the preset light source output delay and the preset light source output pulse width; The modifying the values of the channel comparison register and the counter register according to the configuration information includes: The value of the counting register is the sum of the preset light source output pulse width and the preset light source output delay; When the light source is outputting, the first value corresponding to the channel comparison register is the preset light source output pulse width; When controlling the camera output, the second value corresponding to the channel comparison register is the sum of the preset light source output pulse width and the preset light source output delay minus the preset camera output delay; The method of obtaining one-way light source control output and one-way camera control output according to the count value of the count register and the working mode of the timer includes: Outputting a level by comparing the count value of the counting register with the value of the channel comparison register; When the timer count value is equal to zero for the first time, the light source output is turned off; When the second count value of the timer is equal to zero, the camera output is turned off.
2. A strobe controller according to claim 1, characterized in that: Each timer also includes a counter auto-reload register: When the configuration information meets the configuration conditions, the value of the counter automatic reload register is configured according to the configuration information, and the value of the counter automatic reload register is greater than the sum of the preset light source output delay and the preset light source output pulse width.
3. A strobe controller according to claim 2, characterized in that: When the light source is output and the working mode of the timer is down counting, the output level is output by comparing the count value of the counting register with the value of the channel comparison register, including: When the count value of the counting register is greater than the first value of the channel comparison register, a low level is output; When the count value of the counting register is less than or equal to the first value of the channel comparison register, a high level is output.
4. A strobe controller according to claim 2, characterized in that: When the camera output is controlled and the working mode of the timer is down counting, the output level is output by comparing the count value of the count register with the value of the channel comparison register, including: When the count value of the counting register is greater than the second value of the channel comparison register, a low level is output; When the count value of the counting register is equal to the second value of the channel comparison register, a high level is output; When the count value of the counting register is equal to zero, a high level is output; Counting down from the value of the counter auto-reload register; When the count value of the counting register is equal to the second value of the channel comparison register again, a low level is output.
5. A method for controlling the output of a strobe controller, said method being applicable to the strobe controller according to any one of claims 1 to 4, characterized in that: include: Acquire configuration information, wherein the configuration information includes a preset light source output delay, a preset light source output pulse width, a preset camera output delay, and a camera output pulse width; When the configuration information meets the configuration conditions, determining that the timer has one PWM mode output for light source output and one comparison mode output for controlling camera output according to the configuration of the channel control register, and modifying the values of the channel comparison register and the counter register according to the configuration information; Obtaining a trigger signal and starting the timer to count; According to the count value of the counting register and the working mode of the timer, one light source output and one camera control output are obtained.
6. The output control method of a strobe controller according to claim 5, characterized in that: The modifying the values of the channel comparison register and the counter register according to the configuration information includes: The value of the counting register is the sum of the preset light source output pulse width and the preset light source output delay; When the light source is outputting, the first value corresponding to the channel comparison register is the preset light source output pulse width; When controlling the camera output, the second value corresponding to the channel comparison register is the sum of the preset light source output pulse width and the preset light source output delay minus the preset camera output delay.
7. The output control method of a strobe controller according to claim 6, characterized in that: The method of obtaining one-way light source control output and one-way camera control output according to the count value of the count register and the working mode of the timer includes: Outputting a level by comparing the count value of the counting register with the value of the channel comparison register; When the timer count value is equal to zero for the first time, the light source output is turned off; When the second count value of the timer is equal to zero, the camera output is turned off.
Citation Information
Patent Citations
Stroboscopic controller and output control method thereof
CN114779699A