CN1996729A - Multi-channel PWM generation system and method - Google Patents
Multi-channel PWM generation system and method Download PDFInfo
- Publication number
- CN1996729A CN1996729A CN 200610157738 CN200610157738A CN1996729A CN 1996729 A CN1996729 A CN 1996729A CN 200610157738 CN200610157738 CN 200610157738 CN 200610157738 A CN200610157738 A CN 200610157738A CN 1996729 A CN1996729 A CN 1996729A
- Authority
- CN
- China
- Prior art keywords
- pwm
- mcu
- common
- port
- ports
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
This invention relates to one process, which comprises the following steps: connecting PWM terminal of MCU into one end of resistance with other end of resistance into any outer interval end of MCU; MCU connects multiple regular I/O ends into drive circuit with software process to realize multiple regular I/o terminal PWM output of MCU. This invention does not impact MCU control property to lower product cost and to improve reliability.
Description
Technical field
The present invention relates to a kind of MCU of band PWM that utilizes and realize the system and method that multi-channel PWM is exported.
Background technology
Along with the development of technology, need PWM (pulse-width modulation) control in a lot of fields, particularly in Motor Control Field and inverter field.In Motor Control Field, except brush direct current motor control, generally all need multi-channel PWM to control.Common PWM producing method has following several: (1) discrete component; (2) dedicated PWM chip; (3) MCU (microcontroller) has PWM; (4) DSP (digital signal processor) has PWM.More than in these several modes, the reliability of discrete component is low, cost is than higher; Dedicated PWM chip cost height, be inconvenient to operate and intelligent poor; DSP cost height, driving force is poor.Only MCU has the PWM mode, because of low, the easy to operate and intelligent height of MCU cost, uses more and more general in Motor Control Field and inverter field.But it also has weak point: general MCU only is with one road PWM, and using so just has a lot of restrictions.Therefore, the company that has also develops the MCU that has six road PWM specially, or employing logic hardware demultiplexing PWM, but the cost height of this dual mode, and not having flexibility, particularly present switched reluctance machines has the control greater than three-phase, increases hardware cost with the hardware demultiplexing, also make control circuit become complicated, reliability decrease.
Summary of the invention
The objective of the invention is to overcome deficiency of the prior art, provide a kind of MCU of normal tape PWM that utilizes to realize the system that multi-channel PWM is exported: the PWM port by MCU connects a resistance, be connected to any one external interrupt port of MCU again, many common i/o ports of MCU are directly connected to drive circuit, just can realize the PWM output of many common i/o ports of MCU in conjunction with software processes.
For reaching goal of the invention, the present invention also provides a kind of MCU of normal tape PWM that utilizes to realize the method that multi-channel PWM is exported, and comprise step: the MCU initialization is provided with; MCU is provided with a plurality of common i/o ports that need output PWM; MCU response PWM timer interrupts, and a plurality of common i/o ports to needs output PWM in timer interrupts are provided with high level or low level; The MCU response external is interrupted, in externally interrupting in the described a plurality of common i/o port settings that need output PWM and the described timer interruption opposite low level or high level being set.
Description of drawings
Fig. 1 is the circuit block diagram of the embodiment of multi-channel PWM generation system of the present invention and method;
Fig. 2 is the software processes flow chart of the embodiment of multi-channel PWM generation system of the present invention and method.
Fig. 3 is the PWM port of the embodiment of multi-channel PWM generation system of the present invention and method and the duty ratio schematic diagram of the common i/o port of output PWM.
Embodiment
As shown in Figure 1, be the circuit block diagram of the embodiment of multi-channel PWM generation system of the present invention and method.The PWM port for utilizing MCU that present embodiment provided produces the example of six road PWM output in the controller of DC brushless motor field.MCU10 has a PWM port one 10, draws circuit by PWM port one 10 and is connected to a resistance 40, and the other end of resistance 40 connects any one external interrupt port one 20 of MCU10.Six road PWM output is finished by first common i/o port, 101, the second common i/o ports, 102, the three common i/o ports, 103, the four common i/o ports, 104, the five common i/o ports, 105, the six common i/o ports 106 of MCU10 respectively.Six road common i/o ports six tunnel connect the input of drive circuit 20, and the output of drive circuit 20 connects the controller circuitry 30 of motor, controls six road power tubes of controller circuitry 30 by drive circuit 20.During enforcement, only need the duty ratio of the PWM port one 10 of adjusting MCU10, the duty ratio of described six road common i/o ports also changes thereupon.So just, can carry out PWM control to motor.Model and circuit structure that MCU10 in the present embodiment and drive circuit 20, controller circuitry 30 all adopt industry to know do not need to provide in detail its internal circuit structure chart again.
As shown in Figure 2, be the software processes flow chart of the embodiment of multi-channel PWM generation system of the present invention and method.At first, in step 210, carry out the initialization setting, comprise that PWM port one 10 is set is the PWM pattern, the generation period T of the PWM of PWM port one 10 is set, the PWM timer is set interrupts, operations such as external interrupt port one 20 trailing edge interruptions are set by MCU10.The PWM of six common i/o ports output makes duty ratio into and (for example is different from T1 if desired, less than T1), can in interrupting, the PWM timer six common i/o ports be set, the duty ratio (as shown in Figure 3) of the PWM that the PWM duty ratio of its output will be exported less than the PWM port one 10 of MCU10 by time-delay (T1-T2); In step 220, by MCU10 six common i/o ports being set is the PWM output mode, for speed up processing, can change the control address of six common i/o ports into a control address by logical operation; In step 230, MCU10 response PWM timer interrupts, MCU10 is provided with high level to six road common i/o ports in the PWM timer interrupts, when the level of the PWM of MCU10 port one 0 becomes low level by high level, the level of the external interrupt port one 20 of MCU10 has also produced upset, becomes low level by high level; In step 240, because of be set to import the trailing edge response at the about portion of step 210 interruptive port 120, the external interrupt port one 20 of MCU10 produces external interrupt, and MCU10 six road common i/o ports in this outside interruption are set to low level output.
The present invention is not limited to preferred forms and the various ins and outs in this specification.Therefore, the innovation and creation in the scope of any innovation and creation thought that does not break away from claims records and various equivalents thereof all belong in the protection range of claims.
Claims (4)
1, a kind of multi-channel PWM generation system is characterized in that, the MCU of circuit is done following improvement: the PWM port of MCU is connected to any one external interrupt port of described MCU, realizes the PWM output of a plurality of common i/o ports of described MCU.
2, multi-channel PWM generation system according to claim 1, it is characterized in that, can insert a resistance in the connecting circuit of any one external interrupt port of the PWM of described MCU port and described MCU, described resistance string is associated between any one external interrupt port of the PWM port of described MCU and described MCU.
3, a kind of multi-channel PWM production method is characterized in that, comprises step:
The MCU initialization is provided with;
The a plurality of common i/o ports of MCU are set to the PWM output mode;
MCU response PWM timer interrupts, and in described timer interrupts the described a plurality of common i/o ports of output PWM that need is provided with high level or low level;
The MCU response external is interrupted, in the described external interrupt in described a plurality of common i/o port settings and the described timer interruption opposite low level or high level being set.
4, a plurality of described common i/o ports of step MCU as claimed in claim 3 are set to the PWM output mode, it is characterized in that, also comprise following setting: change the control address of a plurality of described common i/o ports into a control address by logical operation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200610157738 CN1996729A (en) | 2006-12-23 | 2006-12-23 | Multi-channel PWM generation system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200610157738 CN1996729A (en) | 2006-12-23 | 2006-12-23 | Multi-channel PWM generation system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN1996729A true CN1996729A (en) | 2007-07-11 |
Family
ID=38251701
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200610157738 Pending CN1996729A (en) | 2006-12-23 | 2006-12-23 | Multi-channel PWM generation system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1996729A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104796118A (en) * | 2015-04-29 | 2015-07-22 | 深圳市振邦智能科技有限公司 | Method for breaking through limited pwm (pulse width modulation) output of MCU (micro control unit) hardware |
-
2006
- 2006-12-23 CN CN 200610157738 patent/CN1996729A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104796118A (en) * | 2015-04-29 | 2015-07-22 | 深圳市振邦智能科技有限公司 | Method for breaking through limited pwm (pulse width modulation) output of MCU (micro control unit) hardware |
CN104796118B (en) * | 2015-04-29 | 2017-09-26 | 深圳市振邦智能科技有限公司 | A kind of limitation output pwm of breakthrough MCU hardware method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102801379A (en) | Universal full-digital direct-current motor servo driver | |
CA2819105C (en) | Converting sub-circuit board of interface signals of electronically commutated motor | |
CN101420198A (en) | Five phase DC brushless motor controller | |
CN204613716U (en) | A kind of interface module of multi-motor driving centralized control system | |
CN103343743B (en) | The automatic identifying method of a kind of frequency conversion and constant speed compressor and refrigerator | |
CN102208865B (en) | Bridge-driven IPM (intelligent power module) circuit for three-phase electric machine | |
CN1996729A (en) | Multi-channel PWM generation system and method | |
CN204836005U (en) | Brushless DC motor does not have position sensor driver chip and system | |
WO2012142757A1 (en) | Motor controller for automatically configuring plural types of interfaces | |
CN204886768U (en) | Extensible multichannel step actuator and extensible multichannel motor control system | |
CN103107622A (en) | Motor winding and electronic power switch combination assembly capable of switching output state | |
US20120299523A1 (en) | Motor driving device, integrated circuit device, motor apparatus and motor driving system | |
CN104579197B (en) | A kind of audio power amplifying circuit and its mode control circuit | |
CN207717107U (en) | A kind of photoelectric encoder | |
CN102011744A (en) | Multi-fan control system | |
CN206077270U (en) | A kind of SCM Based brushless DC motor control system | |
CN204517709U (en) | A kind of drive unit of DC brushless motor and drive system thereof | |
CN209281194U (en) | A kind of bus type controllor for step-by-step motor | |
CN213461577U (en) | Intelligent motor drive board | |
CN106856385A (en) | A kind of brushless electric machine electronic phase change method based on CPLD | |
CN102468802B (en) | Servomotor-driven feedback switching device and method | |
CN208092485U (en) | A kind of multiple-axis servo driver with Industrial Ethernet communication | |
CN117956649A (en) | Light source control circuit and light source controller with same | |
CN100590564C (en) | Compound signal processing system and method for multiple fans | |
CN206117547U (en) | Brushless motor drive controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
C57 | Notification of unclear or unknown address | ||
DD01 | Delivery of document by public notice |
Addressee: Duan Shirui Document name: Written notice of preliminary examination of application for patent for invention |
|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |