US20020007467A1 - Microcontroller with a user configurable pulse width modulator - Google Patents

Microcontroller with a user configurable pulse width modulator Download PDF

Info

Publication number
US20020007467A1
US20020007467A1 US09/771,155 US77115501A US2002007467A1 US 20020007467 A1 US20020007467 A1 US 20020007467A1 US 77115501 A US77115501 A US 77115501A US 2002007467 A1 US2002007467 A1 US 2002007467A1
Authority
US
United States
Prior art keywords
pulse width
width modulation
microcontroller
bit
circuit
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.)
Abandoned
Application number
US09/771,155
Inventor
Edward Ma
Frank Taylor
Sai Wong
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to US09/771,155 priority Critical patent/US20020007467A1/en
Publication of US20020007467A1 publication Critical patent/US20020007467A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/025Digital function generators for functions having two-valued amplitude, e.g. Walsh functions

Definitions

  • the present invention relates to integrated circuit devices and more particularly to microcontrollers that incorporate pulse width modulation circuitry.
  • the 8051 style microcontroller core is a microcontroller core that is commonly used in “embedded control” applications.
  • the term “8051 microcontroller” hereinafter includes any microcontroller that executes, at least, a substantial portion of the well-known 8051 microcontroller instruction set.
  • Embedded microcontrollers are frequently found in appliances (microwave ovens, toaster ovens, mixers, bread making machines), computers and computer related equipment (printers, modems, I/O cards, disk drives, scanners), automotive related devices (engine control, suspension control, diagnostics, traction control, anti-lock brakes), and manufacturing machinery (numeric control, stepper motor control, hydraulic presses, machine control, robotic control). Often more than one microcontroller can be found in a given machine, unit or device.
  • An 8-bit microcontroller is designed into many products and devices because of its small size, low power consumption and versatility. As the market for 8-bit microcontrollers continues to grow, manufacturers of microcontrollers scramble to make more efficient and useful microcontrollers which meet the needs of the industry.
  • Some microcontrollers include pulse width modulation circuitry in the integrated circuit.
  • drawbacks to the pulse width modulators incorporated into microcontroller circuitry include the inability of the user to change important aspects of the pulse width modulator such as the bit-width or resolution.
  • prior pulse width modulators found in microcontrollers cannot be concatenated or divided to establish one large pulse width modulator or a plurality of smaller bit-width pulse width modulators.
  • a microcontroller that includes a user configurable pulse width modulator circuit that can be configured to provide, for example, one 16-bit, two 8-bit, or four 4-bit pulse width modulators.
  • FIG. 1 depicts a block diagram of an exemplary microcontroller incorporating an exemplary user configurable pulse width modulator
  • FIG. 2 depicts an exemplary microcontroller core of the exemplary microcontroller of FIG. 1;
  • FIG. 3 depicts a block diagram of exemplary pulse width modulator circuitry in accordance with the present invention
  • FIG. 4 depicts a block diagram of an exemplary clock generator in accordance with the present invention
  • FIG. 5 depicts a block diagram of an exemplary pulse width modulator generator in accordance with the present invention.
  • FIG. 6 depicts a high level schematic/block diagram of an exemplary pulse width modulator configuration.
  • An exemplary microcontroller is preferably a “high speed” 8-bit microcontroller operating at a crystal oscillator speed of up to about 33 MHZ. It is compatible with the 8051 microcontroller instruction set and offers additional hardware and firmware capabilities beyond the standard 8051 instruction set. Furthermore, the exemplary microcontroller may include an 8051-compatible high-speed microcontroller core which may have been redesigned to reduce the original 8051's 12 clocks per instruction cycle to four clocks per instruction cycle, while using less power.
  • the exemplary microcontroller may include four 8-bit pulse width modulated output channels that generate programmable lengths and intervals.
  • Each pulse width modulator has a dedicated clock generator that accepts one of four internal clock sources or external clocks as its clock reference.
  • the exemplary four 8-bit pulse width modulators can be configured into two 16-bit pulse width modulators to provide longer repetition intervals and increased pulse width resolutions.
  • a preferred exemplary microcontroller may include a variety of features. Such features may include, but are not limited to, being 8051 instruction set compatible; having bi-directional I/O ports; having three 16-bit timers/counters with selectable up/down count as well as capture and compare features; having a scratchpad RAM; having a power on reset flag; having a stop mode which exits on a reset pulse; and utilizing low power CMOS logic.
  • the preferred microcontroller has a four cycle 8051 microcontroller style core which operates at a clock rate of about 0 to 33 MHZ. Higher clock rates are potentially achievable. It may contain bandgap circuitry to prevent low or high input power crashes.
  • the bandgap circuitry may comprise a bandgap reference reset and/or a power-up reset time-out circuit.
  • the exemplary microcontroller further contains useful circuitry and functionalities.
  • the exemplary microcontroller provides six external and ten internal interrupt sources. It has 1K bytes of on-chip data SRAM, 8K bytes of EPROM.
  • the microcontroller may include timed access protection circuitry for control of “sensitive” secure or anti-pirating functions such as preventing accidental writes to critical functions.
  • a programmable watchdog timer and a selectable internal ring oscillator for lower power operation may also be provided.
  • the preferred exemplary microcontroller may further include an 8-channel 10-bit analog to digital (“A/D”) converter as well as an oscillator failure detection circuit.
  • A/D analog to digital
  • the exemplary embodiment provides four, or potentially more, pulse width modulated output channels. There may also be four capture and three compare logic modules.
  • the preferred 8051 style 8-bit microcontroller core can also have a programmable data pointer decrement function with a toggle between two or more data pointers.
  • FIG. 1 depicts the main functional blocks of a preferred exemplary 8051 style microcontroller 10 . It is understood that various aspects of the present invention are not limited to incorporation into an 8051 style microcontroller, but could also be incorporated into virtually any 8-bit, 16-bit, 32-bit, etc. microcontroller.
  • a central processing unit, CPU, 12 contains an arithmetic logic unit, ALU, for calculations and logic functions, as well as the accumulator, program status words and the B-register (see FIG. 2).
  • a program counter and data pointer block, PC and DPTR, 14 block contains the program counter and two data pointers (DPTR and DPTR 1 ), which support fast data movement in data memory.
  • the PC and DPTR 14 block also contains a data pointer select, DPS, register to support user selected data pointer options.
  • An internal registers block 16 is preferably an on-chip RAM that is divided into a scratchpad register area and a special function register (SFR) area.
  • SFR special function register
  • An instruction decode and control block 18 contain the instruction register, the NOR-plane and the timing plane of a programmable logic array (“PLA”) which generates the majority of the control signals for each instruction.
  • PLA programmable logic array
  • a stack pointer 20 contains a stack pointer register that is accessed during interrupts, LCALL, PUSH, and POP instructions.
  • the stack pointer block 20 can be used to address memory locations in the scratchpad RAM.
  • An interrupt block 22 contains the control logic that detects and services all incoming interrupts from the micro. This interrupt block 22 can detect an interrupt and force an “LJMP” instruction into the instruction register. The “special function registers” which directly support the interrupts are contained in this interrupt block 22 .
  • a timers block 24 includes three timers (timer 0 , timer 1 , and timer 2 ) as well as the necessary control logic for the timers.
  • the special function registers that directly support a timer function and a capture/compare logic modules are also located in this block 24 .
  • a power management block 26 includes a band-gap reference and analog circuitry to monitor power supply conditions to the integrated circuit.
  • a watchdog timer and reset block 28 contains reset control logic, a watchdog timer register and a power control register which operates in communication with the power management block 26 .
  • a memory control and clocks block 30 generates four phases of clocks C 1 -C 4 , machine cycle clocks B 1 -B 5 , and the peripheral clocks P 1 -P 4 .
  • the clock block 30 also includes a clock control register.
  • a self-contained 8-channel 10-bit A/D converter 30 and four pulse width modulators are incorporated to support real-time applications.
  • the A/D converter contains a 10-bit successive approximation analog to digital converter, an eight input analog multiplexer, an analog (digital) comparator, control SFRs and a result register.
  • the pulse width modulators contain an independent selectable prescaled clock reference and external connections for clock references for their clock generators. The output of the clock generator is used for clocking the 8-bit free running timer in the pulse generator.
  • SFRs provide programmable clock selection and controls.
  • Each pulse width (PWM) modulator has its own frequency generator register and pulse width value register.
  • the four 8-bit PWM channels can be used as two independent 16-bit PWM channels or be configured to be a plurality of variable length pulse width modulators (PWMs).
  • Seven I/O ports 32 are composed of parallel bi-directional pins, with each pin having an associated latch accessed via a SFR.
  • Ports 0 to 5 are 8-bit ports.
  • Port 0 and Port 2 can be used as a memory bus for off-chip memory access.
  • Ports 1 and 3 have alternate functions that can be used in place of general I/O.
  • Port 1 supports timer 2 , serial Port 1 and four external capture trigger inputs.
  • Port 3 supports serial port 0 , two external interrupts, external inputs for Timers 0 and 1 , and control strobes for external memory access.
  • Port 4 can be used as Timer 2 compare match outputs.
  • Port S provides analog inputs to the A/D converter.
  • Port 6 is a 7-bit port, supporting the pulse width modulators'I/O and the A/D converter external trigger
  • the exemplary microcontroller 10 is a high speed 8-bit microcontroller designed with an 8-channel 10-bit A/D converter and four pulse width modulators that are user configurable.
  • the exemplary high speed core 40 is an accumulator based architecture using internal registers for data storage and peripheral control. It executes the industry standard 8051 instruction set with a machine cycle that consists of four periods of the base oscillator, as compared to a machine cycle in the original 8051 microcontroller which consists of twelve cycles of the base oscillator.
  • the exemplary CPU 50 operates at four clocks per machine cycle.
  • the main functional blocks of the exemplary microcontroller core is illustrated in FIG. 2.
  • an instruction is fetched and sent over the 8-bit internal data bus to a register of the execution unit ALU.
  • the arithmetic logic unit, ALU 42 performs math functions, logical operations and makes comparisons and general decisions.
  • the ALU 42 primarily uses the Accumulator 44 and a B register 46 as the source or destination for operations. It is understood that the CPU may operate at 1, 2, 4, 8, 12 or other numbers of clock cycles per machine cycles without leaving the spirit of the present invention.
  • SFRs Special Function Registers
  • the Accumulator 44 is the primary register used in the CPU 50 . It is the source or destination of most operations.
  • the B register 46 is used as the second 8-bit argument in multiply and divide operations. When not used for these purposes, the B register 46 can be used as a general purpose register.
  • a Program Status Word (PSW) 52 contains several flags, including the Carry Flag, Auxiliary Carry Flag, General purpose Flag, Register Bank Select bits, Overflow Flag, and Parity Flag.
  • the Data Pointers (DPTR, DPTR 1 ) 54 , 55 are used to assign a memory address for a MOVX instruction. Two pointers are useful when moving data from one memory area to another memory area, or when using a memory mapped peripheral for both source and destination addresses.
  • the exemplary microcontroller 10 provides a stack in the on-chip RAM area 56 (FIG. 1).
  • the Stack Pointer 20 denotes the register location at the top of the stack, which is the last used value.
  • the address bus provides address for opcode/operand fetching and all external instructions.
  • the DA data bus 60 is used for addressing of SFRs 48 for fetched instructions and operands from external memory, and for providing addresses to the internal stack.
  • the DB data bus 62 is used for data exchange between SFRs 48 and for output of all ALU 42 operations.
  • the Special Function Registers (SFRs) 48 provide the user selected functions that are not explicit instructions in the exemplary microcontroller 10 , to control peripherals and programming modes. In many cases, an SFR controls an individual function or reports the function's status.
  • the SFRs 48 preferably reside in register locations 80 h-FFh and are only accessible by direct addressing. SFRs that end in 0h or 8h are preferably bit addressable.
  • All standard SFR locations from the 8051 style microcontroller are duplicated in the exemplary microcontroller 10 .
  • Several SFRs have been added to aid the additional novel features of the exemplary microcontroller 10 .
  • Most of these additional features are controlled by bits in SFRs located in unused SFR locations in the standard 8051 SFR map. This allows for increased functionality while maintaining complete instruction set compatibility.
  • the exemplary microcontroller 10 incorporates four independent 8-bit pulse width modulators (PWMs) with independently selectable clock sources for their timer function.
  • PWMs pulse width modulators
  • Each pulse width modulator is capable of generating an output waveform with a programmable duty cycle of n/256%, where n is between 0 and 255.
  • the four 8-bit PWMs can be used as two 16-bit PWMs or two 8-bit PWMs and one 16-bit PWM by setting the corresponding 16-bit mode enable bits in the PWM Mode SFR.
  • FIG. 3 illustrates the functional blocks for the pulse width modulators in the 8-bit mode. It is understood that the plurality of pulse width modulators do not each have to be the same bit-size. For example, each pulse width modulator circuit could be a different bit-size and still be concatentable.
  • the prescaler 72 takes the CPU machine clock (MCLK) and divides it to produce four reduced clock outputs to the clock generators.
  • the CPU machine clock period t MCLK is derived from the oscillator clock period multiplied by 1, 2, 4 or 1024 as determined by programming of the system clock divider bits.
  • the prescaler 72 is capable of generating four clock speeds: t MCLK ⁇ 1, T MCLK ⁇ 4, t MCLK ⁇ 16, and t MCLK ⁇ 64. All clock speeds are available simultaneously if required. It is understood that other multipliers could also be used thereby producing a wider variety of clock speeds.
  • each clock generator 74 may contain an 8-bit auto-reloadable counter that provides a selectable clock frequency to an 8-bit free running timer contained therein. The timer value is compared to zero and to a user selectable value to set and reset a flip-flop, thereby determining and establishing the PWM duty cycle.
  • All four clock generators 74 are identical and operate substantially independent of each other. Each clock generator 74 accepts either the prescaled clock outputs or an external pin signal as inputs.
  • PWMC 0 may be selected as the external clock generator input for PWM 0 and PWM 1 .
  • PWMC 1 may be selected as the external clock generator input for PWM 2 and PWM 3 . If either of the external PWMC pins is to be used as the clock source, then the associated port bit latch must be programmed as an input by setting it to 1 to enable the alternate function of the pin.
  • the external clock sources are sampled and synchronized to the internal CPU timing as with other 8051 compatible timer inputs.
  • the dotted PWMC busses indicate that an external clock source potentially can clock any combination of the four clock generators.
  • FIG. 4 shows the exemplary clock generator 80 functional blocks. There are five clock sources available to the clock generators, four of which are created and distributed by the prescaler 72 .
  • Each clock generator via the clock select Register 82 , selects one of the five clock sources to drive an 8-bit auto-reloadable counter 84 by programming its associated clock select bits in the clock select registers 82 .
  • a frequency generator enable bit PWnEN in the clock select register 82 has to be set to enable the clock generator 80 .
  • the clock generator 80 is disabled after all forms of a reset signal and/or no clock is generated.
  • the four 8-bit PWM channels are substantially identical and independent of each other.
  • the pulse width generator 76 for each of the PWM channels is illustrated in FIG. 5.
  • Each pulse width generator 76 contains an 8-bit free running timer 90 which is clocked by its associated PWM clock generator. The timer value is compared to zero in the zero comparator 92 and to a user selectable value in the match comparator 94 . Each time the timer value reaches zero, the zero comparator 92 sets a flip-flop 96 .
  • the match comparator 94 resets the flip-flop 96 .
  • the user selected PWM match value thereby determines the PWM duty cycle.
  • the zero rollover condition sets the PWnF bit for the associated channel. Since there is no interrupt vector in the exemplary microcontroller 10 that is dedicated to any PWM channel flag, this flag is useful only for polling purposes. This bit (PWnF) must be cleared by software to remove the flagged condition.
  • the PWM channel timer 90 value can be accessed via the PWM value register 98 with its associated PWnT/C bit set to 1.
  • the PWM compare value can be read or written to the PWM value register 98 with its associated PWnT/C bit cleared to 0.
  • the PWM match value is transferred from the value register 98 to the match comparator 94 after the next match occurs.
  • the match value can be changed once every 256 clock cycles. This prevents software from creating glitches on the PWM output.
  • a PWM value of 00h creates a PWM output that is always zero. This special condition is deglitched to prevent a simultaneous set and reset.
  • a PWM value of FFh creates a waveform that is high for 255 of 256 clock cycles.
  • a DC override bit PWnDC which forces a constant 1 on the PWM output, is provided for each channel.
  • the exemplary microcontroller 10 also supports 16-bit PWMs by setting the corresponding 16-bit mode enable bit to a logic 1 in the 16-Bit PWM Mode Enable SFR.
  • Enabling the 16-bit PWM mode of operation concatenates two of the 8-bit free-running timers 90 together to form a 16-bit timer.
  • the corresponding Zero 92 and Match comparators 94 also concatenate.
  • the PW 0 EN and PW 0 S bits provide the programmable clock controls to the 16-bit PWM channel 0
  • the PW 2 EN and PW 2 S bits provide the programmable clock controls to the 16-bit PWM channel 1 .
  • the divisor values for the 16-bit PWM operating frequency are contained in the PW 0 FG and PW 2 FG registers.
  • the four least significant bits in the PW 01 CS and PW 23 CS registers have no effect on PWM clock generation in 16-bit mode.
  • the 16-bit pulse generators function just like the 8-bit PWMs except the pulse generators act on a 16-bit boundary instead of 8-bit. If the channel's associated output enable bit PW 0 OE or PW 20 E is set, the modulator pulses are driven out on the associated port pin P6.0 or P6.2, respectively. Port pins P6.1 and P6.3 can be used as general purpose I/Os.
  • the 16-bit PWM match values are transferred from the value register to the match comparator after the next match occurs. Thus, the match value can be changed once every 65,536 cycles.
  • PW0FG (D2h) PWM0 Frequency Generator Register Initialization This register is cleared to 00h on all forms of reset.
  • Read/Write Access Unrestricted read/write.
  • PW3FG (D5h) PWM3 Frequency Generator Register Initialization This register is cleared to 00h on all forms of reset. Read/Write Access: Unrestricted read/write. PW3FG.7-PW3FG.0
  • This register contains the divisor value for the 8-bit PWM3 operating frequency, which is derived from the clock source selected by PW3S2-PW3S0 divided by the value of PW3FG + 1. This value is the reload value for the clock generator's 8-bit auto-reload timer. The PWM3 frequency is correct after one reload. This bit has no effect on 16-bit PWM operation.
  • PWMADR (D6h) 16-Bit PWM Mode Enable and A/D Reference Select Initialization This register is initialized to 0xxxx00b on all forms of reset. Read/Write Access: Unrestricted read/write. PWMADR.0: PWEO 16-bit PWM Enable 0. Setting this bit to 1 enables the 16-bit PWM channel 0. The 16-bit PWM0 is formed by combining the 8-bit PWM0 and PWM1 channels. The corresponding free-running Timers, the Zero and Match Comparators, and the value registers are concatenated to form the 16-bit PWM0 channel. Clearing this bit to 0 disables the 16-bit PWM0 and automatically enables the 8-bit PWM0 and PWM1.
  • PWMADR.1 PWE1 16-bit PWM Enable 1. Setting this bit to 1 enables the 16-bit PWM channel 1.
  • the 16-bit PWM1 is formed by combining the 8-bit PWM2 and PWM3 channels. The corresponding free-running Timers, the Zero and Match Comparators, and the value registers are concatenated to form the 16-bit PWM1 channel. Clearing this bit to 0 disables the 16-bit PWM1 and automatically enables the 8-bit PNM2 and PWM3.
  • PWMADR.7:ADRS A/D Reference Select Setting this bit to 1 selects an external source as the reference voltage for A/D conversions. Clearing this bit to 0 selects the internal bandgap as the reference voltage.
  • the pulse width modulator circuitry of the present exemplary embodiments is not limited to incorporation with only an 8051 style microcontroller core. It could also be s slightly modified, without leaving the spirit of the invention, to be a 32-bit or 64-bit pulse width modulator. Furthermore, the channels could be designed to be less than an 8-bit PWM channel.
  • the present exemplary embodiment provides a microcontroller combined with a plurality of pulse width modulators.
  • the plurality of pulse width modulators can be configured by a user to be combined to provide different bit-size pulse width modulators depending on the needs of the user.
  • a single microcontroller device can be configured to operate in various systems requiring varying ranges of pulse width modulation resolution. Potentially 4, 8, 16, 32, 64, and other pulse width modulation resolutions can be made available by a single device.
  • An innovation of the exemplary microcontroller is the two separate 8-bit pulse width modulation channels can be linked together to operate as a single 16-bit pulse width modulator via a user programmable configuration.
  • the exemplary microcontroller can provide four 8-bit modulators, two 16-bit modulators or two 8-bit and one 16-bit modulators. Simple modifications would allow one 8-bit and one 24-bit modulator or one 32-bit.
  • FIG. 6 there is depicted how two pulse width modulators can be used separately or be concantenated to provide one larger pulse width modulator.
  • Two 8-bit PWM modules 100 which are independent, are labeled PWM 0 and PWM 1 .
  • Each of the 8-bit PWM modules may have a different clock source.
  • the different clock sources could be ClK 0 and ClK 1 as shown.
  • each PWM PWM 0 and PWM 1
  • each PWM have separate outputs labeled out 0 and out 1 , respectively.
  • the control line, CNTR can be used.
  • the CNTR line will switch the MUX circuit 102 to allow CLK 0 to be used by both PWM 0 and PWM 1 .
  • the CNTR line will also switch MUX 104 to provide a single 16-bit PWM output.
  • the CNTR line will require PWM 0 to provide a carry bit to PWM 1 .
  • the two PWM modules are concatenated.
  • a user can configure the size of the PWM required for a particular need or design.
  • the present invention is a significant improvement in the art by providing, at least, a microcontroller with a user configurable pulse width modulator(s).
  • a microcontroller with a user configurable pulse width modulator(s).
  • Such a device can be used in a variety pulse width modulation activities and allow an electronic designer to become familiar with a single microcontroller device rather than a plurality of different microcontroller devices.
  • the present invention is believed to be specifically effective when configured and employed as described herein, however, those skilled in the art will readily recognize that numerous variations and substitutions may be made in the invention and its use and configuration to achieve substantially the same results as achieved by the embodiments and, in particular, the preferred embodiments described herein. Each of the variations is intended to be included in the description herein and forms a part of the present invention.
  • the foregoing detailed description is, thus, to be clearly understood as being given by way of illustration and example only, the spirit and scope of the present invention being limited solely by the appended claims.

Abstract

A microcontroller integrated circuit incorporating a user configurable pulse width modulator. The pulse width modulator circuitry is configurable to be a single, for example 32-bit pulse width modulator, or a plurality of pulse width modulators each having a bit width that is divisible by the single 32-bit pulse width modulator (e.g., 2, 4, 8 or 16-bit pulse width modulators).

Description

    BACKGROUND OF THE PRESENT INVENTION
  • 1. Technical Field of the Invention [0001]
  • The present invention relates to integrated circuit devices and more particularly to microcontrollers that incorporate pulse width modulation circuitry. [0002]
  • 2. Description of Related Art [0003]
  • The 8051 style microcontroller core is a microcontroller core that is commonly used in “embedded control” applications. The term “8051 microcontroller” hereinafter includes any microcontroller that executes, at least, a substantial portion of the well-known 8051 microcontroller instruction set. Embedded microcontrollers are frequently found in appliances (microwave ovens, toaster ovens, mixers, bread making machines), computers and computer related equipment (printers, modems, I/O cards, disk drives, scanners), automotive related devices (engine control, suspension control, diagnostics, traction control, anti-lock brakes), and manufacturing machinery (numeric control, stepper motor control, hydraulic presses, machine control, robotic control). Often more than one microcontroller can be found in a given machine, unit or device. [0004]
  • An 8-bit microcontroller is designed into many products and devices because of its small size, low power consumption and versatility. As the market for 8-bit microcontrollers continues to grow, manufacturers of microcontrollers scramble to make more efficient and useful microcontrollers which meet the needs of the industry. [0005]
  • Some microcontrollers include pulse width modulation circuitry in the integrated circuit. To date there have been drawbacks to the pulse width modulators incorporated into microcontroller circuitry. Such drawbacks include the inability of the user to change important aspects of the pulse width modulator such as the bit-width or resolution. Furthermore, prior pulse width modulators found in microcontrollers cannot be concatenated or divided to establish one large pulse width modulator or a plurality of smaller bit-width pulse width modulators. [0006]
  • SUMMARY OF THE INVENTION
  • It is an object of the present invention to provide a single integrated circuit which combines a microcontroller with a user configurable pulse width modular. [0007]
  • It is an object of the present invention to provide a microcontroller and a user configurable pulse width modulator on the same integrated circuit wherein the bit width of the pulse width modulator can be configured by a user. [0008]
  • It is also an object of the present invention to provide a user configurable pulse width modulator that can be divided into a plurality of pulse width modulators. [0009]
  • These and other objects are provided by the below described invention by providing a microcontroller that includes a user configurable pulse width modulator circuit that can be configured to provide, for example, one 16-bit, two 8-bit, or four 4-bit pulse width modulators. [0010]
  • A more complete appreciation of the present invention and the scope thereof can be obtained from the accompanying drawings which are briefly summarized below, the following detailed description of the presently-preferred embodiments of the invention, and the appended claims.[0011]
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • A more complete understanding of the method and apparatus of the present invention may be obtained by referring to the following Detailed Description of the Presently Preferred Exemplary Embodiments of the present invention in conjunction with the accompanying drawings wherein: [0012]
  • FIG. 1 depicts a block diagram of an exemplary microcontroller incorporating an exemplary user configurable pulse width modulator; [0013]
  • FIG. 2 depicts an exemplary microcontroller core of the exemplary microcontroller of FIG. 1; [0014]
  • FIG. 3 depicts a block diagram of exemplary pulse width modulator circuitry in accordance with the present invention; [0015]
  • FIG. 4 depicts a block diagram of an exemplary clock generator in accordance with the present invention; [0016]
  • FIG. 5 depicts a block diagram of an exemplary pulse width modulator generator in accordance with the present invention; and [0017]
  • FIG. 6 depicts a high level schematic/block diagram of an exemplary pulse width modulator configuration.[0018]
  • DETAILED DESCRIPTION OF THE PRESENTLY PREFERRED EXEMPLARY EMBODIMENTS
  • The present invention will now be described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. [0019]
  • An exemplary microcontroller is preferably a “high speed” 8-bit microcontroller operating at a crystal oscillator speed of up to about 33 MHZ. It is compatible with the 8051 microcontroller instruction set and offers additional hardware and firmware capabilities beyond the standard 8051 instruction set. Furthermore, the exemplary microcontroller may include an 8051-compatible high-speed microcontroller core which may have been redesigned to reduce the original 8051[0020] 's 12 clocks per instruction cycle to four clocks per instruction cycle, while using less power.
  • In addition to providing standard 8051 functions with higher throughput, the exemplary microcontroller may include four 8-bit pulse width modulated output channels that generate programmable lengths and intervals. Each pulse width modulator has a dedicated clock generator that accepts one of four internal clock sources or external clocks as its clock reference. The exemplary four 8-bit pulse width modulators can be configured into two 16-bit pulse width modulators to provide longer repetition intervals and increased pulse width resolutions. [0021]
  • A preferred exemplary microcontroller may include a variety of features. Such features may include, but are not limited to, being 8051 instruction set compatible; having bi-directional I/O ports; having three 16-bit timers/counters with selectable up/down count as well as capture and compare features; having a scratchpad RAM; having a power on reset flag; having a stop mode which exits on a reset pulse; and utilizing low power CMOS logic. [0022]
  • The preferred microcontroller has a four cycle 8051 microcontroller style core which operates at a clock rate of about 0 to 33 MHZ. Higher clock rates are potentially achievable. It may contain bandgap circuitry to prevent low or high input power crashes. The bandgap circuitry may comprise a bandgap reference reset and/or a power-up reset time-out circuit. [0023]
  • The exemplary microcontroller further contains useful circuitry and functionalities. The exemplary microcontroller provides six external and ten internal interrupt sources. It has 1K bytes of on-chip data SRAM, 8K bytes of EPROM. The microcontroller may include timed access protection circuitry for control of “sensitive” secure or anti-pirating functions such as preventing accidental writes to critical functions. A programmable watchdog timer and a selectable internal ring oscillator for lower power operation may also be provided. There may also be two full-duplex hardware serial ports and four pulse width modulated output channels. The preferred exemplary microcontroller may further include an 8-channel 10-bit analog to digital (“A/D”) converter as well as an oscillator failure detection circuit. [0024]
  • The exemplary embodiment provides four, or potentially more, pulse width modulated output channels. There may also be four capture and three compare logic modules. The preferred 8051 style 8-bit microcontroller core can also have a programmable data pointer decrement function with a toggle between two or more data pointers. [0025]
  • FIG. 1 depicts the main functional blocks of a preferred exemplary 8051 [0026] style microcontroller 10. It is understood that various aspects of the present invention are not limited to incorporation into an 8051 style microcontroller, but could also be incorporated into virtually any 8-bit, 16-bit, 32-bit, etc. microcontroller. A central processing unit, CPU, 12 contains an arithmetic logic unit, ALU, for calculations and logic functions, as well as the accumulator, program status words and the B-register (see FIG. 2).
  • A program counter and data pointer block, PC and DPTR, [0027] 14 block contains the program counter and two data pointers (DPTR and DPTR 1), which support fast data movement in data memory. The PC and DPTR 14 block also contains a data pointer select, DPS, register to support user selected data pointer options.
  • An [0028] internal registers block 16 is preferably an on-chip RAM that is divided into a scratchpad register area and a special function register (SFR) area.
  • An instruction decode and [0029] control block 18 contain the instruction register, the NOR-plane and the timing plane of a programmable logic array (“PLA”) which generates the majority of the control signals for each instruction.
  • A [0030] stack pointer 20 contains a stack pointer register that is accessed during interrupts, LCALL, PUSH, and POP instructions. The stack pointer block 20 can be used to address memory locations in the scratchpad RAM.
  • An interrupt [0031] block 22 contains the control logic that detects and services all incoming interrupts from the micro. This interrupt block 22 can detect an interrupt and force an “LJMP” instruction into the instruction register. The “special function registers” which directly support the interrupts are contained in this interrupt block 22.
  • A timers block [0032] 24 includes three timers (timer 0, timer 1, and timer 2) as well as the necessary control logic for the timers. The special function registers that directly support a timer function and a capture/compare logic modules are also located in this block 24.
  • A [0033] power management block 26 includes a band-gap reference and analog circuitry to monitor power supply conditions to the integrated circuit. A watchdog timer and reset block 28 contains reset control logic, a watchdog timer register and a power control register which operates in communication with the power management block 26.
  • A memory control and clocks block [0034] 30 generates four phases of clocks C1-C4, machine cycle clocks B1-B5, and the peripheral clocks P1-P4. The clock block 30 also includes a clock control register.
  • A self-contained 8-channel 10-bit A/[0035] D converter 30 and four pulse width modulators are incorporated to support real-time applications. The A/D converter contains a 10-bit successive approximation analog to digital converter, an eight input analog multiplexer, an analog (digital) comparator, control SFRs and a result register. The pulse width modulators contain an independent selectable prescaled clock reference and external connections for clock references for their clock generators. The output of the clock generator is used for clocking the 8-bit free running timer in the pulse generator. SFRs provide programmable clock selection and controls. Each pulse width (PWM) modulator has its own frequency generator register and pulse width value register. The four 8-bit PWM channels can be used as two independent 16-bit PWM channels or be configured to be a plurality of variable length pulse width modulators (PWMs). Seven I/O ports 32 are composed of parallel bi-directional pins, with each pin having an associated latch accessed via a SFR. Ports 0 to 5 are 8-bit ports. Port 0 and Port 2 can be used as a memory bus for off-chip memory access. Ports 1 and 3 have alternate functions that can be used in place of general I/O. Port 1 supports timer 2, serial Port 1 and four external capture trigger inputs. Port 3 supports serial port 0, two external interrupts, external inputs for Timers 0 and 1, and control strobes for external memory access. Port 4 can be used as Timer 2 compare match outputs. Port S provides analog inputs to the A/D converter. Port 6 is a 7-bit port, supporting the pulse width modulators'I/O and the A/D converter external trigger.
  • The [0036] exemplary microcontroller 10 is a high speed 8-bit microcontroller designed with an 8-channel 10-bit A/D converter and four pulse width modulators that are user configurable. Referring to FIG. 2, the exemplary high speed core 40 is an accumulator based architecture using internal registers for data storage and peripheral control. It executes the industry standard 8051 instruction set with a machine cycle that consists of four periods of the base oscillator, as compared to a machine cycle in the original 8051 microcontroller which consists of twelve cycles of the base oscillator.
  • The [0037] exemplary CPU 50 operates at four clocks per machine cycle. The main functional blocks of the exemplary microcontroller core is illustrated in FIG. 2. In general, an instruction is fetched and sent over the 8-bit internal data bus to a register of the execution unit ALU. The arithmetic logic unit, ALU 42, performs math functions, logical operations and makes comparisons and general decisions. The ALU 42 primarily uses the Accumulator 44 and a B register 46 as the source or destination for operations. It is understood that the CPU may operate at 1, 2, 4, 8, 12 or other numbers of clock cycles per machine cycles without leaving the spirit of the present invention.
  • All peripherals and operations that are not explicit instructions in the exemplary microcontroller are controlled via Special Function Registers (SFRs) [0038] 48. The Accumulator 44 is the primary register used in the CPU 50. It is the source or destination of most operations. The B register 46 is used as the second 8-bit argument in multiply and divide operations. When not used for these purposes, the B register 46 can be used as a general purpose register.
  • A Program Status Word (PSW) [0039] 52 contains several flags, including the Carry Flag, Auxiliary Carry Flag, General purpose Flag, Register Bank Select bits, Overflow Flag, and Parity Flag.
  • The Data Pointers (DPTR, DPTR[0040] 1) 54, 55 are used to assign a memory address for a MOVX instruction. Two pointers are useful when moving data from one memory area to another memory area, or when using a memory mapped peripheral for both source and destination addresses.
  • The [0041] exemplary microcontroller 10 provides a stack in the on-chip RAM area 56 (FIG. 1). The Stack Pointer 20 denotes the register location at the top of the stack, which is the last used value. Referring to both FIGS. 1 and 2, there are three main internal buses: one 16-bit address bus 58 and two 8-bit data buses (DA 60 and DB 62). The address bus provides address for opcode/operand fetching and all external instructions. The DA data bus 60 is used for addressing of SFRs 48 for fetched instructions and operands from external memory, and for providing addresses to the internal stack. The DB data bus 62 is used for data exchange between SFRs 48 and for output of all ALU 42 operations.
  • The Special Function Registers (SFRs) [0042] 48 provide the user selected functions that are not explicit instructions in the exemplary microcontroller 10, to control peripherals and programming modes. In many cases, an SFR controls an individual function or reports the function's status. The SFRs 48 preferably reside in register locations 80h-FFh and are only accessible by direct addressing. SFRs that end in 0h or 8h are preferably bit addressable.
  • All standard SFR locations from the 8051 style microcontroller are duplicated in the [0043] exemplary microcontroller 10. Several SFRs have been added to aid the additional novel features of the exemplary microcontroller 10. Most of these additional features are controlled by bits in SFRs located in unused SFR locations in the standard 8051 SFR map. This allows for increased functionality while maintaining complete instruction set compatibility.
  • The [0044] exemplary microcontroller 10 incorporates four independent 8-bit pulse width modulators (PWMs) with independently selectable clock sources for their timer function. Each pulse width modulator is capable of generating an output waveform with a programmable duty cycle of n/256%, where n is between 0 and 255. The four 8-bit PWMs can be used as two 16-bit PWMs or two 8-bit PWMs and one 16-bit PWM by setting the corresponding 16-bit mode enable bits in the PWM Mode SFR. FIG. 3 illustrates the functional blocks for the pulse width modulators in the 8-bit mode. It is understood that the plurality of pulse width modulators do not each have to be the same bit-size. For example, each pulse width modulator circuit could be a different bit-size and still be concatentable.
  • Within the pulse [0045] width modulator circuitry 70, the prescaler 72 takes the CPU machine clock (MCLK) and divides it to produce four reduced clock outputs to the clock generators. The CPU machine clock period tMCLK is derived from the oscillator clock period multiplied by 1, 2, 4 or 1024 as determined by programming of the system clock divider bits. The prescaler 72 is capable of generating four clock speeds: tMCLK×1, TMCLK×4, tMCLK×16, and tMCLK×64. All clock speeds are available simultaneously if required. It is understood that other multipliers could also be used thereby producing a wider variety of clock speeds.
  • Four substantially [0046] identical clock generators 74, one for each of the four independent pulse width generators 76, each may contain an 8-bit auto-reloadable counter that provides a selectable clock frequency to an 8-bit free running timer contained therein. The timer value is compared to zero and to a user selectable value to set and reset a flip-flop, thereby determining and establishing the PWM duty cycle.
  • All four [0047] clock generators 74 are identical and operate substantially independent of each other. Each clock generator 74 accepts either the prescaled clock outputs or an external pin signal as inputs. PWMC0 may be selected as the external clock generator input for PWM0 and PWM1. PWMC1 may be selected as the external clock generator input for PWM2 and PWM3. If either of the external PWMC pins is to be used as the clock source, then the associated port bit latch must be programmed as an input by setting it to 1 to enable the alternate function of the pin. The external clock sources are sampled and synchronized to the internal CPU timing as with other 8051 compatible timer inputs. The dotted PWMC busses indicate that an external clock source potentially can clock any combination of the four clock generators.
  • FIG. 4 shows the exemplary clock generator [0048] 80 functional blocks. There are five clock sources available to the clock generators, four of which are created and distributed by the prescaler 72.
  • Each clock generator, via the clock [0049] select Register 82, selects one of the five clock sources to drive an 8-bit auto-reloadable counter 84 by programming its associated clock select bits in the clock select registers 82.
  • The [0050] counter 84 output provides a divide by N+1selectable frequency for its PWM channel. N is the value programmed into the frequency select register 86 of the PWM channel. When a value of 00h is programmed into the counter the input clock frequency is passed through as the clock output to the channel's pulse width generator 76. A value of FFh results in the clock input frequency being divided by 256 and output to the associated pulse width generator 76.
  • A frequency generator enable bit PWnEN in the clock [0051] select register 82 has to be set to enable the clock generator 80. The clock generator 80 is disabled after all forms of a reset signal and/or no clock is generated.
  • The four 8-bit PWM channels are substantially identical and independent of each other. The [0052] pulse width generator 76 for each of the PWM channels is illustrated in FIG. 5.
  • Each [0053] pulse width generator 76 contains an 8-bit free running timer 90 which is clocked by its associated PWM clock generator. The timer value is compared to zero in the zero comparator 92 and to a user selectable value in the match comparator 94. Each time the timer value reaches zero, the zero comparator 92 sets a flip-flop 96.
  • When the [0054] timer 90 reaches the user selected PWM match value, the match comparator 94 resets the flip-flop 96. The user selected PWM match value thereby determines the PWM duty cycle.
  • If the channel's associated output enable bit PWnOE is set, the output of this flip-[0055] flop 96 is driven onto the associated port pin. The port pin's full complementary push-pull driver is enabled on the corresponding pin when the output enable bit is set. A weak pull-up on the pin is deactivated, and the general purpose port bit function is logically disconnected from the pin.
  • The zero rollover condition sets the PWnF bit for the associated channel. Since there is no interrupt vector in the [0056] exemplary microcontroller 10 that is dedicated to any PWM channel flag, this flag is useful only for polling purposes. This bit (PWnF) must be cleared by software to remove the flagged condition.
  • The [0057] PWM channel timer 90 value can be accessed via the PWM value register 98 with its associated PWnT/C bit set to 1. The PWM compare value can be read or written to the PWM value register 98 with its associated PWnT/C bit cleared to 0. The PWM match value is transferred from the value register 98 to the match comparator 94 after the next match occurs. Thus, the match value can be changed once every 256 clock cycles. This prevents software from creating glitches on the PWM output.
  • A PWM value of 00h creates a PWM output that is always zero. This special condition is deglitched to prevent a simultaneous set and reset. A PWM value of FFh creates a waveform that is high for 255 of 256 clock cycles. A DC override bit PWnDC which forces a constant 1 on the PWM output, is provided for each channel. [0058]
  • The [0059] exemplary microcontroller 10 also supports 16-bit PWMs by setting the corresponding 16-bit mode enable bit to a logic 1 in the 16-Bit PWM Mode Enable SFR.
  • Enabling the 16-bit PWM mode of operation concatenates two of the 8-bit free-running [0060] timers 90 together to form a 16-bit timer. The corresponding Zero 92 and Match comparators 94 also concatenate.
  • Setting a PMEO SFR bit to [0061] logic 1 enables 16-bit PWMO, formed by combining the 8-bit PWM0 (least significant byte) and PWM1 (most significant byte). Setting PME1 to logic 1 enables 16-bit PWM1, formed by combining 8-bit PWM2 (least significant byte) and PWM3 (most significant byte). Clearing the enable bit to 0 automatically enables the 8-bit PWM mode for the corresponding PWM channels. The 16-bit PWM mode enable bits default to 0 on all forms of reset. The feature allows the user the selection of four 8-bit PWMs, two 16-bit PWMs, or two 8-bit PWMs and one 16-bit PWM for various applications. It is understood, that the PWM could also be set for one 32-bit PWM if needed. More PWM channels could be added to provide more PWM resolution/bit-width combinations.
  • The PW[0062] 0EN and PW0S bits provide the programmable clock controls to the 16-bit PWM channel 0, while the PW2EN and PW2S bits provide the programmable clock controls to the 16-bit PWM channel 1. The divisor values for the 16-bit PWM operating frequency are contained in the PW0FG and PW2FG registers. The four least significant bits in the PW01CS and PW23CS registers have no effect on PWM clock generation in 16-bit mode.
  • The 16-bit pulse generators function just like the 8-bit PWMs except the pulse generators act on a 16-bit boundary instead of 8-bit. If the channel's associated output enable bit PW[0063] 0OE or PW20E is set, the modulator pulses are driven out on the associated port pin P6.0 or P6.2, respectively. Port pins P6.1 and P6.3 can be used as general purpose I/Os. The 16-bit PWM match values are transferred from the value register to the match comparator after the next match occurs. Thus, the match value can be changed once every 65,536 cycles.
  • The SFR registers most relevant to the pulse width modulator functionality are described in the chart below: [0064]
    REGISTER DESCRIPTION
    PW0FG (D2h) PWM0 Frequency Generator Register
    Initialization: This register is cleared to 00h on all
    forms of reset.
    Read/Write Access: Unrestricted read/write.
    PW0FG.7-PW0FG.0 This register contains the divisor
    value for the 8-bit PWM0 (also for the
    16-bit PWM0 if PWE0 = 1) operating
    frequency, which is derived from the
    clock source selected by PW0S2-PW0S0
    divided by the value of PW0FG + 1.
    This value is the reload value for the
    clock generator's 8-bit auto-reload
    timer. the PWM0 frequency is correct
    after one reload.
    PW1FG (D3h) PWM1 Frequency Generator Register
    Initialization: This register is cleared to 00h on all
    forms of reset.
    Read/Write Access: unrestricted read/write.
    PW1FG.7-PW1FG.0 This register contains the divisor
    value for the 8-bit PWM1 operating
    frequency, which is derived from the
    clock source selected by PW1S2-PW1S0
    divided by the value of PW1FG + 1.
    This value for the clock generator's 8-
    bit auto-reload timer. The PWM1
    frequency is correct after one reload.
    This register has no effect on 16-bit
    PWM operation.
    PW2FG (D4h) PWM2 Frequency Generator Register
    Initialization: This register is cleared to 00h on all
    forms of reset.
    Read/Write Access: Unrestricted read/write.
    PW2FG.7-PW2FG.0 This register contains the divisor
    value for the 8-bit PWM2 (also for the
    16-bit PWM1 when PWE1 = 1) operating
    frequency, which is derived from the
    clock source selected by PW2S2-PW2S0
    divided by the value of PW2FG + 1. This
    value is the reload value for the clock
    generator's 8-bit auto-reload timer.
    The PWM2 frequency is correct after one
    reload.
    PW3FG (D5h) PWM3 Frequency Generator Register
    Initialization: This register is cleared to 00h on all
    forms of reset.
    Read/Write Access: Unrestricted read/write.
    PW3FG.7-PW3FG.0 This register contains the divisor
    value for the 8-bit PWM3 operating
    frequency, which is derived from the
    clock source selected by PW3S2-PW3S0
    divided by the value of PW3FG + 1.
    This value is the reload value for the
    clock generator's 8-bit auto-reload
    timer. The PWM3 frequency is correct
    after one reload. This bit has no
    effect on 16-bit PWM operation.
    PWMADR (D6h) 16-Bit PWM Mode Enable and A/D
    Reference Select
    Initialization: This register is initialized to
    0xxxx00b on all forms of reset.
    Read/Write Access: Unrestricted read/write.
    PWMADR.0: PWEO 16-bit PWM Enable 0. Setting this bit
    to 1 enables the 16-bit PWM channel 0.
    The 16-bit PWM0 is formed by combining
    the 8-bit PWM0 and PWM1 channels. The
    corresponding free-running Timers, the
    Zero and Match Comparators, and the
    value registers are concatenated to
    form the 16-bit PWM0 channel. Clearing
    this bit to 0 disables the 16-bit PWM0
    and automatically enables the 8-bit
    PWM0 and PWM1.
    PWMADR.1: PWE1 16-bit PWM Enable 1. Setting this bit
    to 1 enables the 16-bit PWM channel 1.
    The 16-bit PWM1 is formed by combining
    the 8-bit PWM2 and PWM3 channels. The
    corresponding free-running Timers, the
    Zero and Match Comparators, and the
    value registers are concatenated to
    form the 16-bit PWM1 channel. Clearing
    this bit to 0 disables the 16-bit PWM1
    and automatically enables the 8-bit
    PNM2 and PWM3.
    PWMADR.2-PWMADR.6 Reserved.
    PWMADR.7:ADRS A/D Reference Select. Setting this bit
    to 1 selects an external source as the
    reference voltage for A/D conversions.
    Clearing this bit to 0 selects the
    internal bandgap as the reference
    voltage.
  • The pulse width modulator circuitry of the present exemplary embodiments is not limited to incorporation with only an 8051 style microcontroller core. It could also be s slightly modified, without leaving the spirit of the invention, to be a 32-bit or 64-bit pulse width modulator. Furthermore, the channels could be designed to be less than an 8-bit PWM channel. [0065]
  • The present exemplary embodiment provides a microcontroller combined with a plurality of pulse width modulators. The plurality of pulse width modulators can be configured by a user to be combined to provide different bit-size pulse width modulators depending on the needs of the user. Thus, a single microcontroller device can be configured to operate in various systems requiring varying ranges of pulse width modulation resolution. Potentially 4, 8, 16, 32, 64, and other pulse width modulation resolutions can be made available by a single device. An innovation of the exemplary microcontroller is the two separate 8-bit pulse width modulation channels can be linked together to operate as a single 16-bit pulse width modulator via a user programmable configuration. [0066]
  • The exemplary microcontroller can provide four 8-bit modulators, two 16-bit modulators or two 8-bit and one 16-bit modulators. Simple modifications would allow one 8-bit and one 24-bit modulator or one 32-bit. [0067]
  • Referring now to FIG. 6, there is depicted how two pulse width modulators can be used separately or be concantenated to provide one larger pulse width modulator. Two 8-[0068] bit PWM modules 100, which are independent, are labeled PWM0 and PWM1. Each of the 8-bit PWM modules may have a different clock source. The different clock sources could be ClK0 and ClK1 as shown. In the dual 8-bit PWM configuration, each PWM (PWM0 and PWM1) have separate outputs labeled out0 and out1, respectively.
  • If a user wants to switch from the dual 8-bit mode to a 16-bit PWM mode, the control line, CNTR, can be used. The CNTR line will switch the [0069] MUX circuit 102 to allow CLK0 to be used by both PWM0 and PWM1. The CNTR line will also switch MUX 104 to provide a single 16-bit PWM output. Furthermore, the CNTR line will require PWM0 to provide a carry bit to PWM1. Such that the two PWM modules are concatenated. Thus, a user can configure the size of the PWM required for a particular need or design.
  • As is clearly seen, the present invention is a significant improvement in the art by providing, at least, a microcontroller with a user configurable pulse width modulator(s). Such a device can be used in a variety pulse width modulation activities and allow an electronic designer to become familiar with a single microcontroller device rather than a plurality of different microcontroller devices. The present invention is believed to be specifically effective when configured and employed as described herein, however, those skilled in the art will readily recognize that numerous variations and substitutions may be made in the invention and its use and configuration to achieve substantially the same results as achieved by the embodiments and, in particular, the preferred embodiments described herein. Each of the variations is intended to be included in the description herein and forms a part of the present invention. The foregoing detailed description is, thus, to be clearly understood as being given by way of illustration and example only, the spirit and scope of the present invention being limited solely by the appended claims. [0070]

Claims (19)

What is claimed is:
1. A microcontroller integrated circuit comprising:
a microcontroller core;
a first data bus connected to said microcontroller core;
a first user configurable pulse width modulation circuit connected to said first data bus; and
a second user configurable pulse width modulation circuit connected to said first data bus, said first user configurable pulse width modulation circuit and said second user configurable pulse width modulation circuit being concatenatable to thereby create a third user configurable pulse width modulator circuit.
2. The microcontroller integrated circuit of claim 1, further comprising special function registers mapped substantially in accordance with an 8051 style microcontroller requirement.
3. The microcontroller integrated circuit of claim 1, wherein said first user configurable pulse width modulation circuit comprises:
a clock generator circuit for configuring a pulse width modulation clock signal, and
a pulse generator circuit for generating a pulse width modulation output.
4. The microcontroller integrated circuit of claim 3, wherein said second user configurable pulse width modulation circuit comprises:
a clock generator circuit for configuring a pulse width modulation clock signal, and
a pulse generator circuit for generating a pulse width modulation output.
5. The microcontroller integrated circuit of claim 1, wherein said first user configurable pulse width modulation circuit and said second user configurable pulse width modulation circuit each 8-bit pulse modulation circuits.
6. The microcontroller integrated circuit of claim 1, wherein said third user configurable pulse width modulator circuit is a 16-bit pulse width modulation circuit.
7. The microcontroller integrated circuit of claim 1, wherein said first user configurable pulse width modulator is an X-bit pulse width modulation circuit, said second user configurable pulse width modulator is a Y-bit pulse width modulation circuit, and said third user configurable pulse width modulator circuit is an X+Y bit pulse width modulation circuit.
8. The microcontroller integrated circuit of claim 1, wherein said microcontroller core is substantially an 8051 compatible microcontroller core.
9. The microcontroller integrated circuit of claim 1, wherein said microcontroller core is a four-cycle 8051 compatible microcontroller core.
10. An 8051 style microcontroller comprising:
a central processing circuit;
a data bus connected to said central processing circuit; and
at least two pulse width modulation circuits that are user configurable to be used individually or be concatinated together, said at least two pulse width modulation circuits being connected.
11. The 8051 style microcontroller of claim 10, further comprising dual data pointer circuitry connected to said data bus.
12. The 8051 style microcontroller of claim 10, wherein said central processing circuit is at least one of a four-cycle central processing core and a one-cycle central processing core.
13. The 8051 style microcontroller of claim 10, wherein said at least two pulse width modulation circuits are each 8-bit pulse width modulation circuits.
14. The 8051 style microcontroller of claim 10, wherein said at least two pulse width modulation circuits are each different bit-length pulse width modulation circuits.
15. A microcontroller comprising:
a central processing core;
a first pulse width modulation circuit;
a second pulse width modulation circuit;
at least one data bus connected to said central processing core, said first pulse width modulation circuit, and to said second pulse width modulation circuit, said first pulse width modulation circuit and said second pulse width modulation circuit each being user configurable so that said first pulse width modulation circuit can operate independently of said second pulse width modulation circuit and so that said first pulse width modulation circuit and said second pulse width modulation circuit can be combined to provide a third pulse width modulation circuit.
16. The microcontroller of claim 15, wherein said central processing core is an 8051 instruction set compatible microcontroller.
17. The microcontroller of claim 15, wherein said first pulse width modulation circuit is an 8-bit pulse width modulation circuit.
18. The microcontroller of claim 17, wherein said second pulse width modulation circuit is other than an 8-bit pulse width modulation circuit.
19. The microcontroller of claim 15, wherein said central processing core is a four-cycle microprocessing core.
US09/771,155 1998-12-30 2001-01-26 Microcontroller with a user configurable pulse width modulator Abandoned US20020007467A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US09/771,155 US20020007467A1 (en) 1998-12-30 2001-01-26 Microcontroller with a user configurable pulse width modulator

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US09/224,813 US6182235B1 (en) 1998-12-30 1998-12-30 Microcontroller with a user configurable pulse width modulator
US09/771,155 US20020007467A1 (en) 1998-12-30 2001-01-26 Microcontroller with a user configurable pulse width modulator

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US09/224,813 Continuation US6182235B1 (en) 1998-12-30 1998-12-30 Microcontroller with a user configurable pulse width modulator

Publications (1)

Publication Number Publication Date
US20020007467A1 true US20020007467A1 (en) 2002-01-17

Family

ID=22842319

Family Applications (2)

Application Number Title Priority Date Filing Date
US09/224,813 Expired - Fee Related US6182235B1 (en) 1998-12-30 1998-12-30 Microcontroller with a user configurable pulse width modulator
US09/771,155 Abandoned US20020007467A1 (en) 1998-12-30 2001-01-26 Microcontroller with a user configurable pulse width modulator

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US09/224,813 Expired - Fee Related US6182235B1 (en) 1998-12-30 1998-12-30 Microcontroller with a user configurable pulse width modulator

Country Status (1)

Country Link
US (2) US6182235B1 (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050235069A1 (en) * 2004-04-20 2005-10-20 Fujitsu Limited Microcontroller
US20050237083A1 (en) * 2003-07-31 2005-10-27 Actel Corporation, A California Corporation Programmable system on a chip
US20060104343A1 (en) * 2004-10-29 2006-05-18 Stmicroelectronics Pvt. Ltd. PWM generator providing improved duty cycle resolution
US20060132250A1 (en) * 2004-12-21 2006-06-22 Actel Corporation, A California Corporation Voltage- and temperature-compensated RC oscillator circuit
US20060138544A1 (en) * 2004-12-29 2006-06-29 Actel Corporation, A California Corporation ESD protection structure for I/O pad subject to both positive and negative voltages
US7099189B1 (en) 2004-10-05 2006-08-29 Actel Corporation SRAM cell controlled by non-volatile memory cell
US7119398B1 (en) 2004-12-22 2006-10-10 Actel Corporation Power-up and power-down circuit for system-on-a-chip integrated circuit
US7138824B1 (en) 2004-05-10 2006-11-21 Actel Corporation Integrated multi-function analog circuit including voltage, current, and temperature monitor and gate-driver circuit blocks
US20070045294A1 (en) * 2005-07-12 2007-03-01 Holtek Semiconductor Inc Power control apparatus and method for electric cookers
US20080048716A1 (en) * 2003-07-31 2008-02-28 Actel Corporation Integrated circuit including programmable logic and external-device chip-enable override control
US20100122007A1 (en) * 2008-11-12 2010-05-13 Microchip Technology Incorporated Microcontroller with configurable logic array
US8069428B1 (en) * 2001-10-24 2011-11-29 Cypress Semiconductor Corporation Techniques for generating microcontroller configuration information
US20140306630A1 (en) * 2011-11-09 2014-10-16 Conti Temic Microelectronic Gmbh Method for controlling a motor using pulse width modulation (pwm)
US9766650B2 (en) 2000-10-26 2017-09-19 Cypress Semiconductor Corporation Microcontroller programmable system on a chip with programmable interconnect
US9843327B1 (en) 2000-10-26 2017-12-12 Cypress Semiconductor Corporation PSOC architecture
US10698662B2 (en) 2001-11-15 2020-06-30 Cypress Semiconductor Corporation System providing automatic source code generation for personalization and parameterization of user modules

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7176948B2 (en) * 2000-04-12 2007-02-13 Honeywell International Inc. Method, apparatus and computer program product for controlling LED backlights and for improved pulse width modulation resolution
US6963948B1 (en) * 2001-11-01 2005-11-08 Advanced Micro Devices, Inc. Microcomputer bridge architecture with an embedded microcontroller
US7088070B2 (en) * 2002-06-14 2006-08-08 Texas Instruments Incorporated Resonant scanning mirror driver circuit
EP1650862B1 (en) * 2004-10-22 2019-08-07 Dialog Semiconductor GmbH System-on-chip for high voltage applications
US7547310B2 (en) * 2005-03-29 2009-06-16 Tyco Healthcare Group Lp Specimen retrieval apparatus
US20070106877A1 (en) * 2005-11-10 2007-05-10 Tsan-Bih Tang Single-chip multiple-microcontroller architecture and timing control method for the same
FR2895597B1 (en) * 2005-12-22 2008-09-05 Valeo Equip Electr Moteur METHOD FOR CONTROLLING A POLYPHASE VOLTAGE ONDULATOR
US8344777B2 (en) * 2010-02-24 2013-01-01 Intersil Americas Inc. Method and apparatus for adaptively modifying a pulse width of a pulse width modulated output
IT201700067192A1 (en) 2017-06-16 2018-12-16 St Microelectronics Srl PWM CONFIGURATIONS GENERATOR CIRCUIT, CORRESPONDING DEVICE AND PROCEDURE

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4908790A (en) 1988-03-10 1990-03-13 Dallas Semiconductor Corporation Backup battery switching circuitry for a microcomputer or a microprocessor
US5237699A (en) 1988-08-31 1993-08-17 Dallas Semiconductor Corp. Nonvolatile microprocessor with predetermined state on power-down
US5754462A (en) 1988-12-09 1998-05-19 Dallas Semiconductor Corporation Microprocessor auxiliary with ability to be queried re power history
US5303390A (en) 1990-06-28 1994-04-12 Dallas Semiconductor Corporation Microprocessor auxiliary with combined pin for reset output and pushbutton input
US5515540A (en) 1990-08-27 1996-05-07 Dallas Semiconducter Corp. Microprocessor with single pin for memory wipe
US5577235A (en) * 1994-08-31 1996-11-19 Microchip Technologies, Inc. Microcontroller with multiple timing functions available in a single peripheral module
US5615228A (en) * 1995-03-23 1997-03-25 Texas Instruments Incorporated Apparatus and method to decode a pulse width modulated serial data stream
AU6762296A (en) 1995-07-20 1997-02-18 Dallas Semiconductor Corporation Microcircuit with memory that is protected by both hardware and software

Cited By (62)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9766650B2 (en) 2000-10-26 2017-09-19 Cypress Semiconductor Corporation Microcontroller programmable system on a chip with programmable interconnect
US9843327B1 (en) 2000-10-26 2017-12-12 Cypress Semiconductor Corporation PSOC architecture
US10020810B2 (en) 2000-10-26 2018-07-10 Cypress Semiconductor Corporation PSoC architecture
US10725954B2 (en) 2000-10-26 2020-07-28 Monterey Research, Llc Microcontroller programmable system on a chip
US10248604B2 (en) 2000-10-26 2019-04-02 Cypress Semiconductor Corporation Microcontroller programmable system on a chip
US10261932B2 (en) 2000-10-26 2019-04-16 Cypress Semiconductor Corporation Microcontroller programmable system on a chip
US10466980B2 (en) 2001-10-24 2019-11-05 Cypress Semiconductor Corporation Techniques for generating microcontroller configuration information
US8069428B1 (en) * 2001-10-24 2011-11-29 Cypress Semiconductor Corporation Techniques for generating microcontroller configuration information
US8793635B1 (en) 2001-10-24 2014-07-29 Cypress Semiconductor Corporation Techniques for generating microcontroller configuration information
US10698662B2 (en) 2001-11-15 2020-06-30 Cypress Semiconductor Corporation System providing automatic source code generation for personalization and parameterization of user modules
US7362131B2 (en) 2003-07-31 2008-04-22 Actel Corporation Integrated circuit including programmable logic and external-device chip-enable override control
US7423451B2 (en) 2003-07-31 2008-09-09 Actel Corporation System-on-a-chip integrated circuit including dual-function analog and digital inputs
US7102391B1 (en) 2003-07-31 2006-09-05 Actel Corporation Clock-generator architecture for a programmable-logic-based system on a chip
US7129746B1 (en) 2003-07-31 2006-10-31 Actel Corporation System-on-a-chip integrated circuit including dual-function analog and digital inputs
US20050237083A1 (en) * 2003-07-31 2005-10-27 Actel Corporation, A California Corporation Programmable system on a chip
US7170315B2 (en) 2003-07-31 2007-01-30 Actel Corporation Programmable system on a chip
US7675320B2 (en) 2003-07-31 2010-03-09 Actel Corporation Non-volatile memory architecture for programmable-logic-based system on a chip
US7256610B1 (en) 2003-07-31 2007-08-14 Actel Corporation Programmable system on a chip for temperature monitoring and control
US20080048717A1 (en) * 2003-07-31 2008-02-28 Actel Corporation Programmable system on a chip
US20080048716A1 (en) * 2003-07-31 2008-02-28 Actel Corporation Integrated circuit including programmable logic and external-device chip-enable override control
US7352206B1 (en) 2003-07-31 2008-04-01 Actel Corporation Integrated circuit device having state-saving and initialization feature
US20060119385A1 (en) * 2003-07-31 2006-06-08 Actel Corporation, A California Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US7937601B2 (en) 2003-07-31 2011-05-03 Actel Corporation Programmable system on a chip
US7365565B2 (en) 2003-07-31 2008-04-29 Actel Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US20080122481A1 (en) * 2003-07-31 2008-05-29 Actel Corporation Programmable system on a chip
US7030649B1 (en) 2003-07-31 2006-04-18 Actel Corporation Integrated circuit including programmable logic and external-device chip-enable override control
US7616026B2 (en) 2003-07-31 2009-11-10 Actel Corporation System-on-a-chip integrated circuit including dual-function analog and digital inputs
US7102384B1 (en) 2003-07-31 2006-09-05 Actel Corporation Non-volatile memory architecture for programmable-logic-based system on a chip
US20080224731A1 (en) * 2003-07-31 2008-09-18 Actel Corporation Non-volatile memory architecture for programmable-logic-based system on a chip
US7613943B2 (en) 2003-07-31 2009-11-03 Actel Corporation Programmable system on a chip
US7446560B2 (en) 2003-07-31 2008-11-04 Actel Corporation Programmable system on a chip for temperature monitoring and control
US7603578B2 (en) 2003-07-31 2009-10-13 Actel Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US7034569B1 (en) 2003-07-31 2006-04-25 Actel Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US20080303547A1 (en) * 2003-07-31 2008-12-11 Actel Corporation Programmable system on a chip for temperature monitoring and control
US7487376B2 (en) * 2003-07-31 2009-02-03 Actel Corporation Programmable system on a chip
US7492183B2 (en) 2003-07-31 2009-02-17 Actel Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US7493506B2 (en) 2003-07-31 2009-02-17 Actel Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US7579895B2 (en) 2003-07-31 2009-08-25 Actel Corporation Clock-generator architecture for a programmable-logic-based system on a chip
US20050235069A1 (en) * 2004-04-20 2005-10-20 Fujitsu Limited Microcontroller
US7421605B2 (en) 2004-05-10 2008-09-02 Actel Corporation Programmable system on a chip for power-supply voltage and current monitoring and control
US7414427B1 (en) 2004-05-10 2008-08-19 Actel Corporation Integrated multi-function analog circuit including voltage, current, and temperature monitor and gate-driver circuit blocks
US7138824B1 (en) 2004-05-10 2006-11-21 Actel Corporation Integrated multi-function analog circuit including voltage, current, and temperature monitor and gate-driver circuit blocks
US7558112B2 (en) 2004-10-05 2009-07-07 Actel Corporation SRAM cell controlled by flash memory cell
US7099189B1 (en) 2004-10-05 2006-08-29 Actel Corporation SRAM cell controlled by non-volatile memory cell
US20060104343A1 (en) * 2004-10-29 2006-05-18 Stmicroelectronics Pvt. Ltd. PWM generator providing improved duty cycle resolution
US7642876B2 (en) * 2004-10-29 2010-01-05 Stmicroelectronics Pvt. Ltd. PWM generator providing improved duty cycle resolution
US7439818B2 (en) 2004-12-21 2008-10-21 Actel Corporation Voltage-and temperature-compensated RC oscillator circuit
US20080284532A1 (en) * 2004-12-21 2008-11-20 Actel Corporation Voltage- and temperature-compensated rc oscillator circuit
US20060132250A1 (en) * 2004-12-21 2006-06-22 Actel Corporation, A California Corporation Voltage- and temperature-compensated RC oscillator circuit
US7116181B2 (en) 2004-12-21 2006-10-03 Actel Corporation Voltage- and temperature-compensated RC oscillator circuit
US7911226B2 (en) 2004-12-22 2011-03-22 Actel Corporation Power-up and power-down circuit for system-on-a-chip integrated circuit
US7119398B1 (en) 2004-12-22 2006-10-10 Actel Corporation Power-up and power-down circuit for system-on-a-chip integrated circuit
US7659585B2 (en) 2004-12-29 2010-02-09 Actel Corporation ESD protection structure for I/O pad subject to both positive and negative voltages
US7446378B2 (en) 2004-12-29 2008-11-04 Actel Corporation ESD protection structure for I/O pad subject to both positive and negative voltages
US20060138544A1 (en) * 2004-12-29 2006-06-29 Actel Corporation, A California Corporation ESD protection structure for I/O pad subject to both positive and negative voltages
US7355152B2 (en) * 2005-07-12 2008-04-08 Holtek Semiconductor Inc. Power control apparatus and method for electric cookers
US20070045294A1 (en) * 2005-07-12 2007-03-01 Holtek Semiconductor Inc Power control apparatus and method for electric cookers
US9946667B2 (en) * 2008-11-12 2018-04-17 Microchip Technology Incorporated Microcontroller with configurable logic array
US20100122007A1 (en) * 2008-11-12 2010-05-13 Microchip Technology Incorporated Microcontroller with configurable logic array
CN102209959A (en) * 2008-11-12 2011-10-05 密克罗奇普技术公司 Microcontroller with configurable logic array
US9628000B2 (en) * 2011-11-09 2017-04-18 Audi Ag Method for controlling a motor using pulse width modulation (PWM)
US20140306630A1 (en) * 2011-11-09 2014-10-16 Conti Temic Microelectronic Gmbh Method for controlling a motor using pulse width modulation (pwm)

Also Published As

Publication number Publication date
US6182235B1 (en) 2001-01-30

Similar Documents

Publication Publication Date Title
US6182235B1 (en) Microcontroller with a user configurable pulse width modulator
US11105851B2 (en) Combined analog architecture and functionality in a mixed-signal array
US6157997A (en) Processor and information processing apparatus with a reconfigurable circuit
US6765407B1 (en) Digital configurable macro architecture
US20060109061A1 (en) System and method for narrow bandwidth amplitude modulation
US5577235A (en) Microcontroller with multiple timing functions available in a single peripheral module
EP1226505B1 (en) Generic serial port architecture and system
WO2012145578A1 (en) Configurable logic cells
US5734927A (en) System having registers for receiving data, registers for transmitting data, both at a different clock rate, and control circuitry for shifting the different clock rates
US6564334B1 (en) Programmable output generator
CN219533780U (en) Pulse width modulation device and motor control system
KR20050044674A (en) Polarity independent power supply control methods and systems using the same
CN114026552B (en) Microcontroller with configurable logic peripherals
KR100206987B1 (en) Multifunction timer
Kalra et al. Architecture and Programming of 8051 Microcontroller
Raghavan et al. Single Cycle 8051 Core–AT89LP Family of High Performance & Low Power Flash Microcontrollers
Bradley TMS320DM6446 to TMS320DM6437 Migration Guide
US20200401407A1 (en) Microcontroller with Configurable Logic Peripheral
KR100202683B1 (en) One-chip micro computer
Bradley Migrating from TMS320DM6446 to TMS320DM6437
ADC et al. Mixed-Signal DSP Controller with CAN ADSP-21992
HADC Revision History
Brief ColdFire+ Portfolio Product Brief
Controller et al. Revision History
Host ADSP-BF522/ADSP-BF523/ADSP-BF524/ADSP-BF525/ADSP-BF526/ADSP-BF527

Legal Events

Date Code Title Description
STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION