PWM circuit

By designing multiple control circuits in the beginning and end of PWM control in the PWM circuit, the oscillating problem caused by external trigger signals is solved, and a more stable PWM signal output and higher control accuracy are achieved.

CN119382675APending Publication Date: 2025-01-28LAPIS TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410997455.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-26
Filing Date
2024-07-24
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

When using a microcomputer to perform PWM control, external trigger signals are prone to oscillation in the edge control method, affecting the stability of the PWM signal.

Method used

A PWM circuit is designed, which contains the counter circuit and the output control circuit. It is controlled by multiple control circuits at the beginning and end of the PWM control to ensure that the PWM signal generating circuit is effectively run effectively at the specified moment to reduce the effect of oscillation.

Benefits of technology

Effectively reduce the effect of oscillation, improve the stability and control accuracy of the PWM signal, and reduce the dependence and delay of the micro computer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382675A_ABST
    Figure CN119382675A_ABST
Patent Text Reader

Abstract

According to the PWM circuit, the influence of oscillation can be reduced. A PWM circuit (11) includes: a PWM signal generation circuit (13) configured to include a counter circuit (21) and an output control circuit (23) and generate a PWM control signal; a first control circuit (31) configured to generate a first control signal SCTL1 in response to a first external trigger signal STRG1; and a second control circuit (43) configured to generate a second control signal SCTL2 in response to a second external trigger signal STRG2, the PWM signal generation circuit (13) starts operation of the counter circuit (21) in association with a first control signal SCTL1 from the first control circuit (31), and the PWM signal generation circuit (13) includes a first circuit (39) configured to generate a second control signal SCTL2 in response to a second external trigger signal STRG2. The first circuit (39) is configured to perform PWM control in response to a second control signal SCTL2 from the second control circuit (43).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a PWM circuit. Background Art

[0002] Patent Document 1 discloses a pulse width modulation signal generating circuit that outputs a desired PWM signal that is not affected by switching noise, regardless of the initial setting of the circuit operation and the setting of the duty.

[0003] Patent Document 1: Japanese Patent Application Publication No. 2011-193181.

[0004] There are two methods of performing PWM (Pulse Width Modulation) control using a microcomputer: edge control and level control. In the edge control method, a trigger signal for starting and ending PWM control may be oscillated from outside the microcomputer.

[0005] In PWM control, one seeks to reduce the effects of oscillations. Summary of the invention

[0006] The object of the present invention is to provide a PWM circuit to reduce the influence of oscillation.

[0007] The PWM circuit of the first technical solution of the present invention includes: a PWM signal generating circuit, which is configured to include a counter circuit and an output control circuit, and generates a PWM control signal; and a plurality of control circuits, which are configured to control the above-mentioned PWM signal generating circuit at least one of the start time and the end time of the PWM control, the above-mentioned control circuit includes a first control circuit, which is configured to generate a first control signal in response to a first external trigger signal, and control the above-mentioned PWM signal generating circuit at the above-mentioned start time, the above-mentioned control circuit includes a second control circuit, which is configured to generate a second control signal in response to a second external trigger signal, and control the above-mentioned PWM signal generating circuit at either the above-mentioned start time or the above-mentioned end time, the above-mentioned PWM signal generating circuit is associated with the above-mentioned first control signal from the above-mentioned first control circuit to start the operation of the above-mentioned counter circuit, the above-mentioned PWM signal generating circuit includes at least one of the following first circuit, second circuit and third circuit, the above-mentioned first circuit is configured to control the above-mentioned PWM signal generating circuit at the above-mentioned start time when the above-mentioned first control circuit controls The PWM control is performed in response to the first control signal from the first control circuit and the second control signal from the second control circuit when the first control circuit and the second control circuit control the operation of the PWM signal generation circuit at the start time, and when the second control circuit specifies the operation of the PWM signal generation circuit at the end time, the second circuit is configured to place the counter circuit in an output-disabled state during a first period of the second control signal from the second control circuit when the first control circuit and the second control circuit control the operation of the PWM signal generation circuit at the start time, and when a third control circuit different from the first control circuit and the second control circuit specifies the operation of the PWM signal generation circuit at the end time, and the third circuit is configured to place the output control circuit in an output-disabled state during a first period of the second control signal from the second control circuit when the first control circuit and the second control circuit control the operation of the PWM signal generation circuit at the start time, and when the third control circuit controls the operation of the PWM signal generation circuit at the end time.

[0008] According to the above technical solution, a PWM circuit is provided that reduces the influence of oscillation. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a diagram schematically showing a PWM circuit according to this embodiment.

[0010] Figure 2 This is a diagram schematically showing an exemplary PWM circuit according to the present embodiment.

[0011] Figure 3Yes means Figure 2 Diagram of the waveforms of the main nodes of the PWM circuit shown.

[0012] Figure 4 This is a diagram schematically showing an exemplary PWM circuit according to the present embodiment.

[0013] Figure 5 Yes means Figure 4 Diagram of the waveforms of the main nodes of the PWM circuit shown.

[0014] Figure 6 This is a diagram schematically showing an exemplary PWM circuit according to the present embodiment.

[0015] Figure 7 Yes means Figure 6 Diagram of the waveforms of the main nodes of the PWM circuit shown.

[0016] Figure 8 This is a block diagram schematically showing a circuit for starting and stopping using a PWM control circuit.

[0017] Fig. 9 This is a diagram showing operation waveforms when the PWM control circuit is started and stopped by a software command.

[0018] Fig.10 This is a diagram showing operation waveforms when the PWM control circuit is edge-controlled to perform start control and stop control by an external trigger signal.

[0019] Fig.11 This is a diagram showing an operation waveform when the PWM control circuit is operated by level control of start control and stop control.

[0020] Fig.12 This is a diagram showing the operating waveform when an external trigger signal generates oscillation.

[0021] Fig.13 This is a block diagram schematically showing a circuit that starts / stops the PWM control circuit in response to a sampled signal of an external trigger signal.

[0022] Fig.14 This is a diagram showing an operation waveform of a control of a sampling signal using an external trigger signal.

[0023] Description of Reference Numerals

[0024] 10...microcomputer; 11, 11b, 11c, 11d...PWM circuit; 12...trigger circuit; 12b, 12c, 12d...external trigger circuit; 13...signal generation circuit; 14...controlled object device; 15...edge control circuit; 17...level control circuit; 21...counter circuit; 23...output control circuit; 25...counter control circuit; 31...first control circuit; 33...third control circuit; 39...first circuit; 41...fourth control circuit; 43...second control circuit; 44...software; 49...second circuit ; 53...the fifth control circuit; 55...the sixth control circuit; 59...the third circuit; 60...the selection circuit; SCLK...the clock signal; SCNL1...the first control signal; SCNL2...the second control signal; SCNL3...the third control signal; SCNT...the counting signal; SPWM...the PWM control signal; STRG1...the first external trigger signal; STRG2...the second external trigger signal; STRG3...the third external trigger signal; STRG4...the fourth external trigger signal; STRG5...the fifth external trigger signal; T1...the first period. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments for implementing the present invention will be described with reference to the accompanying drawings. In the following description, the same or similar parts are denoted by the same or similar reference numerals, and duplicate descriptions are omitted.

[0026] Figure 1 This is a diagram schematically showing a PWM circuit according to this embodiment.

[0027] The PWM circuit 11 can include a PWM signal generating circuit 13 and a plurality of control circuits (31, 33, 41, 43, 53). The PWM circuit 11 can be configured to operate according to edge control.

[0028] The PWM circuit 11 shown as an example can be built in the microcomputer 10. The PWM circuit 11 can receive a trigger signal from one or more trigger circuits 12 (12b, 12c, 12d) provided outside the microcomputer 10. Figure 1, the PWM circuit 11 can, for example, receive five trigger signals (STRG1, STRG2, STRG3, STRG4, STRG5). Multiple control circuits (31, 33, 41, 43, 53) include one or more start control circuits and one or more stop control circuits. The start control circuit is configured to control the start of PWM control. The stop control circuit is configured to control the end of PWM control. Specifically, a single external trigger circuit can control a single start control circuit and a single stop control circuit. In addition, a single external trigger circuit can control a single control circuit, which, as a separate control circuit, can perform controls related to the start and end of PWM control. The start control circuit can be set to respond to one of the rise and fall of the input signal, and the stop control circuit can be set to respond to one of the rise and fall of the input signal independently of the start control circuit.

[0029] In the control circuit (31, 33, 41, 43, 53), the start control circuit receives an external trigger signal from the external trigger circuit, and then the stop control circuit receives the external trigger signal. However, when two external trigger signals are input to the PWM circuit 11 substantially at the same time, the external trigger signal for the stop control is processed with priority over the external trigger signal for the start control.

[0030] The PWM signal generation circuit 13 is configured to provide a PWM control signal SPWM, and the PWM control signal SPWM is provided to the control target device 14. The PWM signal generation circuit 13 can include a counter circuit 21, an output control circuit 23, and a counter control circuit 25. The counter circuit 21 counts the clock signal SCLK. The output control circuit 23 is configured to generate the PWM control signal SPWM in response to the count signal SCNT output from the counter circuit 21, and control the output of the PWM control signal SPWM. The counter control circuit 25 stores the count value of the prescribed PWM waveform. If the count signal SCNT is compared with the count signal SCNT and the count signal SCNT is equal to the stored value, the counter control circuit 25 allows the output of the output control circuit 23 by the counter circuit 21 and clears the counter circuit 21. In response to the clearing operation, the counter circuit 21 counts for the next PWM waveform.

[0031] The PWM signal generation circuit 13 controls the operation of the counter circuit 21 in association with the first external trigger signal STRG1 and the first control signal SCTL1. Specifically, the operation start of the counter circuit 21 is associated with the transition of the first external trigger signal STRG1 and the first control signal SCTL1.

[0032] The first control circuit 31 is configured to generate a first control signal SCTL1 in response to the first external trigger signal STRG1, and control the start timing of PWM control to the PWM signal generation circuit 13. The first control circuit 31 operates as a start control circuit to control the start of the PWM control signal SPWM. Specifically, the start control circuit is configured to start the operation of the counter circuit 21 and the output control circuit 23. The stop control circuit is configured to stop the operation of both the counter circuit 21 and the output control circuit 23.

[0033] The PWM signal generation circuit 13 includes at least one of a first circuit 39, a second circuit 49, and a third circuit 59. The first circuit 39, the second circuit 49, and the third circuit 59 can perform various types of PWM control.

[0034] The first circuit 39 is used for the PWM signal generation circuit 13 in which the operation of the PWM signal generation circuit 13 at the start time is controlled by the first control circuit 31 and the operation of the PWM signal generation circuit 13 at the end time is controlled by the second control circuit 43. In the PWM signal generation circuit 13, the first circuit 39 controls the transition of the PWM control signal SPWM in response to the first control signal SCTL1 and the second control signal SCTL2. The first control circuit 31 operates as a start control circuit that responds to the initial transition of the input external trigger signal and does not respond to subsequent transitions. The second control circuit 43 operates as a stop control circuit that responds to the initial transition of the input external trigger signal and does not respond to subsequent transitions.

[0035] The second circuit 49 is used for the PWM signal generation circuit 13 in which the operation of the PWM signal generation circuit 13 at the start time is controlled by the first control circuit 31 and the second control circuit 43, and the operation of the PWM signal generation circuit 13 at the end time is controlled by the third control circuit 33. In this PWM signal generation circuit 13, the second circuit 49 is configured to put the counter circuit 21 in a non-output state during the first period of the second control signal SCTL2. The second control circuit 43 operates as a separate control circuit. The third control circuit 33 operates as a stop control circuit that responds to the initial transition of the input external trigger signal and does not respond to subsequent transitions.

[0036] The third circuit 59 is used for the PWM signal generation circuit 13 in which the operation of the PWM signal generation circuit 13 at the start time is controlled by the first control circuit 31 and the second control circuit 43, and the operation of the PWM signal generation circuit 13 at the end time is controlled by the third control circuit 33. In this PWM signal generation circuit 13, the third circuit 59 is configured to put the output control circuit 23 in a non-output state during the first period of the signal from the second control circuit 43 that operates in response to the second external trigger signal STRG2. The second control circuit 43 operates as a separate control circuit. The third control circuit 33 operates as a stop control circuit that responds to the initial transition of the input external trigger signal and does not respond to subsequent transitions.

[0037] When the PWM signal generating circuit 13 uses the first circuit 39, the counter circuit 21 operates in response to the first control signal SCTL1 from the first control circuit 31. When the PWM signal generating circuit 13 uses the second circuit 49, the counter circuit 21 operates in response to the first control signal SCTL1 and the second control signal SCTL2. Specifically, the operation of the counter circuit 21 starts following the operation permission of the first control signal SCTL1 and the release of the operation prohibition of the second control signal SCTL2. When the PWM signal generating circuit 13 uses the third circuit 59, the output control circuit 23 operates in response to the first control signal SCTL1 and the second control signal SCTL2. Specifically, the operation of the output control circuit 23 starts following the operation permission of the first control signal SCTL1 and the release of the operation prohibition of the second control signal SCTL2.

[0038] Specifically, the PWM signal generation circuit 13 may include a first circuit 39. The PWM signal generation circuit 13 may include a second circuit 49. The PWM signal generation circuit 13 may include a third circuit 59. The PWM signal generation circuit 13 may include a first circuit 39 and a second circuit 49. The PWM signal generation circuit 13 may include a second circuit 49 and a third circuit 59. The PWM signal generation circuit 13 may include a first circuit 39 and a third circuit 59. The PWM signal generation circuit 13 may include a first circuit 39, a second circuit 49 and a third circuit 59.

[0039] The PWM signal generation circuit 13 can include a selection circuit 60 that can select any one of the first circuit 39 , the second circuit 49 , and the third circuit 59 to operate.

[0040] The second control circuit 43 is configured to generate a second control signal SCTL2 in response to the second external trigger signal STRG2 at either the start time or the end time of the PWM control, and control the PWM signal generation circuit 13. In addition, the third control circuit 33 is configured to generate a third control signal SCTL3 in response to the third external trigger signal STRG3 at the end time of the PWM control, and control the PWM signal generation circuit 13.

[0041] Next, refer to Figures 2 to 7 , while explaining the first circuit 39, the second circuit 49 and the third circuit 59 respectively.

[0042] Figure 2 This is a diagram schematically showing an exemplary PWM circuit. Figure 3 Yes means Figure 2 FIG. 1 is a diagram of operation waveforms of main nodes in the exemplary PWM circuit shown.

[0043] like Figure 2 As shown, in the PWM circuit 11b, the first control circuit 31 and the third control circuit 33 are respectively configured to receive the first external trigger signal STRG1 and the third external trigger signal STRG3 from the external trigger circuit 12b. The second control circuit 43 and the fourth control circuit 41 are respectively configured to receive the second external trigger signal STRG2 and the fourth external trigger signal STRG4 from the external trigger circuit 12d. The fifth control circuit 53 is respectively configured to receive the fifth external trigger signal STRG5 from the external trigger circuit 12c. The first control circuit 31 and the fourth control circuit 41 can act as a start control circuit. The second control circuit 43 and the third control circuit 33 can act as a stop control circuit. The fifth control circuit 53 can act as a separate control circuit.

[0044] In the illustrated PWM circuit 11b, the first control circuit 31 and the second control circuit 43 are set to be operable (ENABLE), and the third control circuit 31, the fourth control circuit 33, and the fifth control circuit 41 are set to be inoperable (DISABLE). According to this setting, the PWM signal generation circuit 13 uses the first control circuit 31 at the beginning of the PWM control period to generate the PWM control signal SPWM, and uses the second control circuit 43 at the end of the PWM control period.

[0045] The first control circuit 31 operates as a startup control circuit that responds to the initial transition (either rising or falling) of the input external trigger signal STRG1 and does not respond to subsequent transitions. This operation can be initialized in response to the trigger signal STRG5 / STRG4, for example. The initialized first control circuit 31 can again operate as a startup control circuit that responds to the initial transition of the input external trigger signal STRG2 and does not respond to subsequent transitions.

[0046] The second control circuit 43 operates as a stop control circuit that responds to the initial transition (either rising or falling) of the input external trigger signal STRG2 and does not respond to subsequent transitions. This operation can be initialized in response to the trigger signal STRG1, for example. The initialized second control circuit 43 can again operate as a stop control circuit that responds to the initial transition of the input external trigger signal STRG2 and does not respond to subsequent transitions.

[0047] In the exemplified PWM circuit 11 b , the second control circuit 43 can be provided as a stop control circuit. The second control circuit 43 is configured to receive the second external trigger signal STRG2 and control the PWM signal generation circuit 13 at the end timing.

[0048] In the illustrated PWM circuit 11b, the PWM signal generating circuit 13 may include a first circuit 39. When the second external trigger signal STRG2 specifies the operation of the second control circuit 43 at the end time, the second control circuit 43 generates the second control signal SCTL2 in response to the second external trigger signal STRG2. Through the operation of the first circuit 39, the PWM signal generating circuit 13 can operate in a manner that the PWM control signal SPWM is migrated in response to the second control signal SCTL2 at the end time. In addition, at the start time, the PWM signal generating circuit 13 can operate in a manner that the PWM control signal SPWM is migrated in response to the first control signal SCTL1. The first circuit 39 can control the migration of the PWM control signal SPWM by the PWM signal generating circuit 13 in response to the first control signal SCTL1 and the second control signal SCTL2.

[0049] In the illustrated PWM signal generation circuit 13, the first circuit 39 can be operated by the counter circuit 21 and the output control circuit 23 in response to the first control signal SCTL1 from the first control circuit 31. In response to the output signal of the counter circuit 21, the PWM signal generation circuit 13 starts the period of the PWM control signal SPWM.

[0050] Reference Figure 2 as well as Figure 3If the first control circuit 31 receives the first external trigger signal STRG1, the first control circuit 31 acts as a start control circuit in response to the initial transition of the first external trigger signal STRG1. The first control circuit 31 generates a first control signal SCTL1 to operate the counter circuit 21 of the PWM signal generating circuit 13. In addition, if the second control circuit 43 receives the second external trigger signal STRG2, the second control circuit 43 acts as a stop control circuit in response to the initial transition of the second external trigger signal STRG2. The second control signal SCTL2 stops the operation of the counter circuit 21 of the PWM signal generating circuit 13. Such a signal flow can be carried out through the first circuit 39.

[0051] At the beginning of the PWM control period, if Figure 3 As shown in FIG. 1 , when the first external trigger signal STRG1 includes oscillation, the PWM signal generating circuit 13 operates in response to a single transition edge of the first control signal SCTL1. Figure 3 As shown, when the second external trigger signal STRG2 includes oscillation, the PWM signal generation circuit 13 operates in response to a single transition edge of the second control signal SCTL2.

[0052] In the illustrated PWM circuit 11b, the PWM signal generation circuit 13 starts the PWM control period in response to the first control signal SCTL1 from the first control circuit 31. In addition, the PWM signal generation circuit 13 ends the PWM control period in response to the second control signal SCTL2 from the second control circuit 43.

[0053] Figure 4 This is a diagram schematically showing an exemplary PWM circuit. Figure 5 Yes means Figure 4 FIG. 1 is a diagram of operation waveforms of main nodes in the exemplary PWM circuit shown.

[0054] like Figure 4As shown, the first control circuit 31 and the third control circuit 33 are respectively configured to receive the first external trigger signal STRG1 and the third external trigger signal STRG3 from the external trigger circuit 12b. The second control circuit 43 is configured to receive the second external trigger signal STRG2 from the external trigger circuit 12d. The fourth control circuit 41 and the fifth control circuit 53 are respectively configured to receive the fourth external trigger signal STRG4 and the fifth external trigger signal STRG5 from the external trigger circuit 12c. The first control circuit 31 and the fifth control circuit 53 can operate as a start control circuit, and the third control circuit 33 and the fifth control circuit 53 can operate as a stop control circuit. The second control circuit 43 can operate as a separate control circuit.

[0055] In the illustrated PWM circuit 11c, the first control circuit 31, the second control circuit 33, and the third control circuit 43 are set to be operable (ENABLE), and the fourth control circuit 41 and the fifth control circuit 53 are set to be inoperable (DISABLE). According to this setting, the PWM signal generation circuit 13 starts using the first control circuit 31 and the second control circuit 33 during the PWM control period, and uses the third control circuit 43 at the end of the PWM control period.

[0056] In the exemplified PWM circuit 11 c , a third control circuit 33 can be provided as a stop control circuit. The third control circuit 33 is configured to receive a third external trigger signal STRG3 and control the PWM signal generation circuit 13 at the end timing.

[0057] In the illustrated PWM circuit 11c, the PWM signal generating circuit 13 may include a second circuit 49. When the second external trigger signal STRG2 specifies the operation of the second control circuit 43 at the start time, the second circuit 49 is configured to suppress the output of the count signal SCNT to the counter circuit 21 during the first period T1 of the second control signal SCTL2. This operation is provided by, for example, stopping the counting operation of the counter circuit 21.

[0058] The third control circuit 33 operates as a stop control circuit that responds to the initial transition (either rising or falling) of the input external trigger signal STRG3 and does not respond to subsequent transitions. This operation is initialized in response to the external trigger signal STRG1, for example. The initialized third control circuit 33 can again operate as a stop control circuit that responds to the initial transition of the input external trigger signal STRG3 and does not respond to subsequent transitions.

[0059] The second control circuit 43 operates as a separate control circuit that responds to the initial transition (either rising or falling) of the input external trigger signal STRG2 and does not respond to subsequent transitions. This operation is initialized, for example, in response to the input of a trigger signal for the next start of PWM control. The initialized second control circuit 43 can again operate as a control circuit that responds to the initial transition of the input external trigger signal STRG2 and does not respond to subsequent transitions. The second control circuit 43 generates the waveform of the window of the first period T1 based on the waveform of the external trigger signal STRG2.

[0060] On the other hand, the first control circuit 31 operates as a startup control circuit that responds to each transition (either rising or falling) of the input external trigger signal STRG1.

[0061] In the illustrated PWM circuit 11 c , the third control circuit 33 can be provided as a stop control circuit, and the second control circuit 43 is configured to receive the second external trigger signal STRG2 and control the PWM signal generation circuit 13 at the start timing.

[0062] In the illustrated PWM circuit 11c, the PWM signal generating circuit 13 may include a second circuit 49. The second control circuit 43 is used to prohibit the counter circuit 21 from outputting the count signal SCNT during a potential period of oscillation, for example, during a first period T1. After the first period T1 ends, the output control circuit 23 provides the PWM control signal SPWM in response to the count signal SCNT from the counter circuit 21. The illustrated second circuit 49 is configured to put the counter circuit 21 in a reset state during the first period T1 of the signal, and to release the reset of the counter circuit 21 after the first period T1 ends. The second circuit 49 can prevent the counter circuit 21 of the PWM signal generating circuit 13 from responding to the input to the counter circuit 21 during the first period T1 of the window signal of the second control signal SCTL2 at the start time. The first period T1 shields the first external trigger signal STRG1 that potentially contains an oscillation waveform from acting on the PWM control. As a result, at the start time, the PWM signal generating circuit 13 does not immediately generate the PWM control signal SPWM in response to the first control signal SCTL1. The second circuit 49 can start PWM control by the PWM signal generation circuit 13 in response to the second control signal SCTL2 from the second control circuit 43. In addition, the third control circuit 33 generates a third control signal SCTL3 in response to the third external trigger signal STRG3 at the end time to control the PWM signal generation circuit 13. The PWM signal generation circuit 13 stops the counter circuit 21 and the output control circuit 23 in response to the third control signal SCTL3.

[0063] Specifically, in the PWM circuit 11 c , the operation start of the counter circuit 21 follows the permission of the operation of the first control signal SCTL1 and the cancellation of the prohibition of the operation of the second control signal SCTL2 .

[0064] Reference Figure 4 as well as Figure 5 When the second control circuit 43 receives the second external trigger signal STRG2, it generates the second control signal SCTL2. In response to the second control signal SCTL2, the second circuit 49 prohibits the output control circuit 23 from providing the count signal SCNT of the counter circuit 21, or prohibiting the counter circuit 21 from operating.

[0065] At the beginning of the period of the PWM control signal SPWM, after the first period T1 of the second control signal SCTL2 ends, the PWM signal generation circuit 13 causes the PWM control signal SPWM to transition. Specifically, the PWM control signal SPWM transitions after the counter circuit 21 completes counting of one cycle.

[0066] In the illustrated PWM circuit 11c, the PWM signal generation circuit 13 starts the PWM control period in response to the end of the second control signal SCTL2 from the second control circuit 43. Specifically, the PWM control signal SPWM transitions after the counter circuit 21 completes counting of one cycle.

[0067] At the end of the period of the PWM control signal SPWM, Figure 5 As shown, the PWM signal generation circuit 13 causes the PWM control signal SPWM to transition in response to the third control signal SCTL3 from the first transition edge of the third external trigger signal STRG3 including an oscillation waveform.

[0068] The PWM signal generating circuit 13 prohibits the counter circuit 21 from outputting the count signal SCNT using the second circuit 49 during the first period T1 of the signal from the second control circuit 43 that operates in response to the second external trigger signal STRG2. Figure 5 As shown, the first period T1 can be set to a period including a period of oscillation operation of the first external trigger signal STRG1 and the first control signal SCTL1.

[0069] Figure 6 This is a diagram schematically showing an exemplary PWM circuit. Figure 7 Yes means Figure 6 FIG. 1 is a diagram of operation waveforms of main nodes in the exemplary PWM circuit shown.

[0070] like Figure 6As shown, the first control circuit 31 and the third control circuit 33 are respectively configured to receive the first external trigger signal STRG1 and the third external trigger signal STRG3 from the external trigger circuit 12b. The second control circuit 43 is configured to receive the second external trigger signal STRG2 from the external trigger circuit 12d. The fourth control circuit 41 and the fifth control circuit 53 are respectively configured to receive the fourth external trigger signal STRG4 and the fifth external trigger signal STRG5 from the external trigger circuit 12c. The first control circuit 31 and the fifth control circuit 53 can operate as a start control circuit, and the third control circuit 33 and the fourth control circuit 41 can operate as a stop control circuit. The second control circuit 43 can operate as a separate control circuit.

[0071] In the illustrated PWM circuit 11d, the first control circuit 31, the second control circuit 33, and the third control circuit 43 are set to be operable (ENABLE), and the fourth control circuit 41 and the fifth control circuit 53 are set to be inoperable (DISABLE). According to this setting, the PWM signal generation circuit 13 uses the first control circuit 31 at the beginning of the period of the PWM control signal SPWM, and uses the third control circuit 33 at the end of the period of the PWM control signal SPWM.

[0072] In the illustrated PWM circuit 11d, the PWM signal generating circuit 13 may include a third circuit 59. When the second external trigger signal STRG2 specifies the operation of the second control circuit 43 at the start time, the third circuit 59 is configured to prevent the output control circuit 23 from outputting the PWM control signal SPWM during the first period of the window signal of the second control signal SCTL2.

[0073] The third control circuit 33 operates as a stop control circuit that responds to the initial transition (either rising or falling) of the input external trigger signal STRG3 and does not respond to subsequent transitions. This operation is initialized in response to the input of a trigger signal for the next start of PWM control, for example. The initialized third control circuit 33 can again operate as a stop control circuit that responds to the initial transition of the input external trigger signal STRG3 and does not respond to subsequent transitions.

[0074] The second control circuit 43 operates as a separate control circuit that responds to the initial transition (either rising or falling) of the input external trigger signal STRG2 and does not respond to subsequent transitions. This operation is initialized, for example, in response to the input of the next end trigger signal for PWM control. The initialized second control circuit 43 can again operate as a control circuit that responds to the initial transition of the input external trigger signal STRG2 and does not respond to subsequent transitions. The second control circuit 43 generates the waveform of the first period T1 based on the waveform of the external trigger signal STRG2.

[0075] On the other hand, the first control circuit 31 operates as a startup control circuit that responds to each transition (either rising or falling) of the input external trigger signal STRG1.

[0076] In the illustrated PWM circuit 11 d , the third control circuit 33 can be provided as a stop control circuit, and the second control circuit 43 is configured to receive the second external trigger signal STRG2 and control the PWM signal generation circuit 13 at the start timing.

[0077] In the illustrated PWM circuit 11d, the PWM signal generating circuit 13 may include a third circuit 59. The second control circuit 43 is used to prohibit the output control circuit 23 from outputting the PWM control signal SPWM during a period of potential generation of oscillation, for example, during the first period T1. After the first period T1 ends, the output control circuit 23 provides the PWM control signal SPWM in response to the count signal SCNT from the counter circuit 21. The illustrated third circuit 59 is configured to place the output control circuit 23 in a non-output state in a state where the counter circuit 21 is operated during the first period T1 of the signal, and to enable the output control circuit 23 to output after the first period T1 ends. The third circuit 59 can prevent the output control circuit 23 of the PWM signal generating circuit 13 from responding to the input from the counter circuit 21 at the start time during the first period T1 of the window signal of the second control signal SCTL2. The first period T1 shields the first external trigger signal STRG1 that potentially contains an oscillation waveform from acting on the PWM control. As a result, at the start time, the PWM signal generating circuit 13 does not immediately generate the PWM control signal SPWM in response to the first control signal SCTL1. The third circuit 59 can start PWM control by the PWM signal generation circuit 13 in response to the second control signal SCTL2 from the second control circuit 43. In addition, the third control circuit 33 generates a third control signal SCTL3 in response to the third external trigger signal STRG3 at the end time to control the PWM signal generation circuit 13. The PWM signal generation circuit 13 stops the counter circuit 21 and the output control circuit 23 in response to the third control signal SCTL3.

[0078] Specifically, in the PWM circuit 11 c , the operation start of the output control circuit 23 follows the cancellation of the operation permission of the first control signal SCTL1 and the cancellation of the operation prohibition of the second control signal SCTL2 .

[0079] Reference Figure 6 as well as Figure 7 If the second control circuit 43 receives the second external trigger signal STRG2, it generates the second control signal SCTL2. In response to the second control signal SCTL2, the third circuit 59 prohibits the output control circuit 23 from outputting the count signal SCNT of the counter circuit 21.

[0080] At the beginning of the period of the PWM control signal SPWM, after the first period T1 of the second control signal SCTL2 ends, the PWM signal generation circuit 13 causes the PWM control signal SPWM to transition. Specifically, the PWM control signal SPWM transitions after the output control circuit 23 can operate. After the first period T1 of the second control signal SCTL2 ends, the counter circuit 21 is temporarily cleared and starts counting again. Specifically, the PWM control signal SPWM transitions after the counter circuit 21 completes counting for one cycle.

[0081] At the end of the period of the PWM control signal SPWM, Figure 7 As shown, the PWM signal generation circuit 13 causes the PWM control signal SPWM to transition in response to the third control signal SCTL3 from the first transition edge of the third external trigger signal STRG3 including an oscillation waveform.

[0082] The PWM signal generating circuit 13 prohibits the output control circuit 23 from outputting a signal using the third circuit 59 during the first period T1 of the signal from the second control circuit 43 that operates in response to the second external trigger signal STRG2. Figure 7 As shown, the first period T1 can be set to a period including a period of oscillation operation of the first external trigger signal STRG1 and the first control signal SCTL1.

[0083] Refer again Figure 1 The PWM circuit 11 can include a sixth control circuit 55 that controls the PWM signal generating circuit 13 in response to the operation of the software 44 .

[0084] Each of the first control circuit 31 to the sixth control circuit 55 can include an edge control circuit 15 and a level control circuit 17 that can perform edge control and level control, respectively. The first control circuit 31 to the fifth control circuit 55 of this embodiment can be set to an edge control mode, for example. In the control circuits (31, 33, 41, 43, 53), the edge control circuit 15 and the level control circuit 17 can each include a setting circuit that can exclusively perform their respective control operations.

[0085] This embodiment relates to a technique for starting a PWM circuit 11 mounted on a microcomputer 10 by an external trigger signal. The external trigger signal may generate oscillation during switching, and it is required to reduce the influence of the oscillation when the PWM circuit 11 is started or stopped.

[0086] According to the present embodiment, the PWM circuit 11 which reduces the influence of oscillation is provided.

[0087] Next, the technical background of this embodiment will be described.

[0088] Figure 8 This is a schematic diagram showing a PWM circuit in a microcomputer MC and circuit blocks related to start / stop of the PWM circuit.

[0089] Reference Figure 8 The PWM circuit includes: a counter circuit, a PWM control circuit that generates a PWM waveform corresponding to a counter value of the counter circuit, a start control circuit that controls the start of the PWM control, and a stop control circuit that controls the stop of the PWM control.

[0090] The soft command (software command) indicates a signal generated by the central processing unit of the microcomputer MC. The external trigger circuit is a circuit independent of the microcomputer MC, and generates an external trigger signal for the microcomputer. The PWM control circuit performs start control and stop control in response to the soft command or the external trigger signal. In addition, the start control and stop control have a level control function and an edge control function.

[0091] Fig. 9 The operation waveforms when the PWM control circuit is started and stopped by a software command are shown. Fig.10 This shows the action waveform when the PWM control circuit is started and stopped by an external trigger signal. When using soft commands, no oscillation occurs.

[0092] The start / stop signal for edge control is provided by an external trigger signal.

[0093] In the operation under the soft command, the result of a series of commands of the central processing unit of the microcomputer MC is converted into a control signal, and on the other hand, in the operation using edge control, the external trigger signal is converted into an internal signal. Therefore, the signal indicating the same action causes the same action in the PWM control circuit.

[0094] Fig.11 This shows the waveform when the PWM control circuit is operated by level control of start control and stop control. When level control is used, the start / stop signal is provided by an external trigger signal. Figure 8 In the circuit shown, when an external trigger signal is used and level control is used to perform start control / stop control, as shown in FIG. Fig.11 As shown, in the level control, the PWM control circuit starts when the external trigger signal maintains the start level ("H" level in the figure), and stops when the stop level ("L" level in the figure) is maintained.

[0095] Fig.12 This shows the operation waveform when the PWM control circuit is operated by edge control of start control and stop control. Figure 8 In the circuit shown, when an external trigger signal is used and edge control is used to perform start control / stop control, as shown in FIG. Fig.12 As shown in FIG. 1 , the external trigger signal may oscillate. During the period of oscillation, the PWM control circuit may repeat the ON / OFF operation, and the control target circuit connected to the output of the PWM control circuit may not be able to ensure proper operation.

[0096] In such a situation, the following countermeasures have been applied so far.

[0097] Countermeasure 1. Either the start control or the stop control is controlled by an external trigger signal, and the other is started or stopped by control of a soft command without using an external trigger signal.

[0098] Countermeasure 2: When the PWM circuit is started, the start control is enabled and the stop control is disabled. After the start control is completed, the start control is disabled and the stop control is enabled.

[0099] Countermeasure 3. Fig.13 as well as Fig.14 As shown, an externally triggered sampling signal is accepted.

[0100] Countermeasure 4: Use level control to implement start control / stop control.

[0101] However, there are several issues with these countermeasures.

[0102] In countermeasures 1 and 2, when there is a soft command, the microcomputer MC needs to be activated, and the central processing unit interrupts other processing and performs control of the PWM control circuit. Alternatively, after implementing other controls, the start / stop control of the PWM circuit is performed. In this case, the PWM control is delayed.

[0103] In Countermeasure 3, oscillation occurs within a few milliseconds. Therefore, if a sampling period is set to remove it, the PWM circuit cannot be started / stopped for a few milliseconds after receiving the external trigger signal, thereby reducing the responsiveness to the external trigger signal.

[0104] In countermeasure 4, the PWM circuit repeatedly performs an ON / OFF operation while oscillation is occurring.

[0105] As can be understood from the above description, there are problems with the start / stop of the PWM circuit built into the microcomputer. According to this embodiment, a PWM circuit that reduces the influence of oscillation can be provided. According to this embodiment, the above-mentioned problems can be reduced.

[0106] As described below, this embodiment can have various technical aspects.

[0107] The PWM circuit of the first technical solution of the present embodiment includes: a PWM signal generating circuit, which is configured to include a counter circuit and an output control circuit, and generates a PWM control signal; and a plurality of control circuits, which are configured to control the above-mentioned PWM signal generating circuit at least one of the start time and the end time of PWM control, the above-mentioned control circuit includes a first control circuit, the first control circuit is configured to generate a first control signal in response to a first external trigger signal, and control the above-mentioned PWM signal generating circuit at the above-mentioned start time, the above-mentioned control circuit includes a second control circuit, the second control circuit is configured to generate a second control signal in response to a second external trigger signal, and control the above-mentioned PWM signal generating circuit at either the above-mentioned start time or the above-mentioned end time, the above-mentioned PWM signal generating circuit is associated with the above-mentioned first control signal from the above-mentioned first control circuit to start the operation of the above-mentioned counter circuit, the above-mentioned PWM signal generating circuit includes at least one of the following first circuit, second circuit and third circuit, the above-mentioned first circuit is configured to control the above-mentioned PWM signal generating circuit at the above-mentioned start time when the above-mentioned first control circuit controls The PWM control is performed in response to the first control signal from the first control circuit and the second control signal from the second control circuit when the first control circuit and the second control circuit control the action of the PWM signal generating circuit at the start time, and the action of the PWM signal generating circuit at the end time is specified by the second control circuit. The second circuit is configured to place the counter circuit in an output-disabled state during a first period of the second control signal from the second control circuit when the first control circuit and the second control circuit control the action of the PWM signal generating circuit at the start time, and a third control circuit different from the first control circuit and the second control circuit specifies the action of the PWM signal generating circuit at the end time. The third circuit is configured to place the output control circuit in an output-disabled state during a first period of the second control signal from the second control circuit when the first control circuit and the second control circuit control the action of the PWM signal generating circuit at the start time, and the third control circuit controls the action of the PWM signal generating circuit at the end time.

[0108] In the PWM circuit of the second technical scheme according to the first technical scheme in the present embodiment, the above-mentioned PWM signal generating circuit includes the above-mentioned first circuit, the above-mentioned control circuit also includes a third control circuit, and the third control circuit responds to the third external trigger signal of the action of the above-mentioned PWM signal generating circuit that specifies the above-mentioned end time to act, and the above-mentioned control circuit also includes a fourth control circuit, and the fourth control circuit responds to the fourth external trigger signal of the action of the above-mentioned PWM signal generating circuit that specifies the above-mentioned end time to act, and the above-mentioned fourth control circuit is set to be inoperable, the above-mentioned first external trigger signal and the above-mentioned third external trigger signal are provided by the first trigger circuit, and the above-mentioned second external trigger signal and the above-mentioned fourth external trigger signal are provided by a second trigger circuit different from the above-mentioned first trigger circuit.

[0109] In the PWM circuit of the third technical solution of the first technical solution or the second technical solution in this embodiment, the above-mentioned PWM signal generating circuit includes the above-mentioned second circuit, the above-mentioned second circuit puts the above-mentioned output control circuit into a non-output state, the above-mentioned third control circuit can respond to a third external trigger signal to operate, the above-mentioned first external trigger signal and the above-mentioned third external trigger signal are provided by a first trigger circuit, and the above-mentioned second external trigger signal is provided by a second trigger circuit different from the above-mentioned first trigger circuit.

[0110] In the PWM circuit of the fourth technical solution of the first technical solution, the second technical solution or the third technical solution in this embodiment, the above-mentioned PWM signal generating circuit includes the above-mentioned third circuit, the above-mentioned third circuit puts the above-mentioned counter circuit in a non-output state, the above-mentioned third control circuit responds to the third external trigger signal to operate, the above-mentioned first external trigger signal and the above-mentioned third external trigger signal are provided by the first trigger circuit, and the above-mentioned second external trigger signal is provided by a second trigger circuit different from the above-mentioned first trigger circuit.

[0111] In the PWM circuit of the fifth technical solution according to any one of the first to fourth technical solutions of this embodiment, the first control circuit and the second control circuit each include an edge control circuit and a level control circuit capable of performing edge control and level control, respectively.

[0112] In the PWM circuit of the sixth aspect according to the fifth aspect of the present embodiment, each of the first control circuit and the second control circuit is set to the edge control method.

[0113] The present invention is not limited to the above-described embodiments, and can be implemented with various modifications within the scope of the present invention. Moreover, all of these modifications are included in the technical concept of the present invention.

Claims

1. A PWM circuit, wherein: Include: A PWM signal generating circuit, comprising a counter circuit and an output control circuit, and generating a PWM control signal; and A plurality of control circuits are configured to control the PWM signal generating circuit at at least one of the start time and the end time of the PWM control, The control circuit includes a first control circuit configured to generate a first control signal in response to a first external trigger signal and control the PWM signal generation circuit at the start time. The control circuit includes a second control circuit configured to generate a second control signal in response to a second external trigger signal and control the PWM signal generation circuit at either the start time or the end time. The PWM signal generation circuit starts the operation of the counter circuit in association with the first control signal from the first control circuit. The PWM signal generating circuit includes at least one of the following first circuit, second circuit and third circuit, The first circuit is configured to perform the PWM control in response to the first control signal from the first control circuit and the second control signal from the second control circuit, when the first control circuit controls the operation of the PWM signal generating circuit at the start time and the second control circuit specifies the operation of the PWM signal generating circuit at the end time. The second circuit is configured to place the counter circuit in a non-output state during a first period of the second control signal from the second control circuit, when the first control circuit and the second control circuit control the operation of the PWM signal generating circuit at the start time, and a third control circuit different from the first control circuit and the second control circuit specifies the operation of the PWM signal generating circuit at the end time. The third circuit is configured to place the output control circuit in a non-output state during a first period of the second control signal from the second control circuit when the first control circuit and the second control circuit control the operation of the PWM signal generating circuit at the start time and the third control circuit controls the operation of the PWM signal generating circuit at the end time.

2. The PWM circuit according to claim 1, wherein: The PWM signal generating circuit comprises the first circuit, The control circuit further includes a third control circuit that operates in response to a third external trigger signal that specifies the operation of the PWM signal generation circuit at the end time. The control circuit further includes a fourth control circuit that operates in response to a fourth external trigger signal that specifies the operation of the PWM signal generation circuit at the end time. The fourth control circuit is set to be inoperable. The first external trigger signal and the third external trigger signal are provided by a first trigger circuit. The second external trigger signal and the fourth external trigger signal are provided by a second trigger circuit different from the first trigger circuit.

3. The PWM circuit according to claim 1, wherein: The PWM signal generating circuit includes the second circuit, The second circuit puts the output control circuit into a non-output state, The third control circuit is capable of operating in response to a third external trigger signal. The first external trigger signal and the third external trigger signal are provided by a first trigger circuit. The second external trigger signal is provided by a second trigger circuit different from the first trigger circuit.

4. The PWM circuit according to claim 1, wherein: The PWM signal generating circuit includes the third circuit, The third circuit puts the counter circuit into a non-output state. The third control circuit operates in response to a third external trigger signal. The first external trigger signal and the third external trigger signal are provided by a first trigger circuit. The second external trigger signal is provided by a second trigger circuit different from the first trigger circuit.

5. The PWM circuit according to claim 1, wherein: The first control circuit and the second control circuit include an edge control circuit and a level control circuit respectively capable of performing edge control and level control.

6. The PWM circuit according to claim 5, wherein: The first control circuit and the second control circuit are each set to the edge control method.

Citation Information

Patent Citations

  • Pulse width modulation signal generation circuit

    JP2011193181A