Abstract:
A method and apparatus for generating a CMOS level clock signal from RC components for use in a microcontroller. The emulator includes an emulation chip and an emulation circuit. The emulation chip includes means for supporting RC clock input to accurately produce a sawtooth wave signal at the point of its connection with the RC network. The emulation circuit includes a comparator which transforms a sawtooth waveform produced by the emulation chip into a square waveform which is then inverted for use as a clock signal for a CMOS level microcontroller. The method includes the steps of emulating a clock signal input of an RC network, comparing the emulated RC signal to a reference signal to generate inverted square wave form output, and inverting the square wave form output for transformation into a CMOS level clock input suitable for use as a clock input for microcontrollers.

Description:
FIELD 
     The present invention relates generally to emulators for RC networks. In particular, the invention relates to an emulator circuit and method for accurately creating a Complementary Metal-Oxide Semiconductor (CMOS) level clock input, which circuit includes an emulation chip having a Resistor/Capacitor (RC) mask option for supporting RC input. The emulator circuit permits simple and cost effective RC emulation support for microcontrollers. 
     BACKGROUND 
     Various types of oscillators have been utilized for some time to form a square wave signal which is used in circuitry as a clock signal. It is desirable to provide a square wave signal microcontroller chip with the ability to support various types of clock inputs including Complementary Metal-Oxide Semiconductor (hereinafter referred to as &#34;CMOS&#34;) compatible, crystal and resistor-capacitor (hereinafter referred to as &#34;RC&#34;) type clock inputs. Known emulation chips are available and will accept CMOS level clock input. The input from a crystal-type clock can be recreated by using an inverter. 
     However, it has been found difficult to form such a square wave signal by CMOS devices from the clock input of an RC network, where the CMOS circuits use both n-channel and p-channel devices on the same IC chip, and particularly for subsequent use in a microcontroller. Thus, in particular, it has been difficult to emulate the CMOS circuitry for a first different RC circuit, since a CMOS emulation chip normally only accepts a CMOS level clock input or a crystal type clock, and is not normally compatible with an RC circuit. There are known devices which are able to transform sawtooth waveform signals into square waveform signals, but these devices are not able to maintain the same signal frequency and therefore are not suitable for generating a clock signal for use with microcontrollers. 
     There is a definite need in the art for an emulator which creates a CMOS level clock input signal from clock input received by RC circuits to provide a microcontroller with complete emulation support. 
     THE INVENTION 
    
    
     DRAWINGS 
     The invention is described in greater detail by reference to the drawings in which: 
     FIG. 1 is a block diagram showing the typical arrangement of an RC network in connection with an emulator and microcontroller of the present invention; 
     FIG. 2 is a circuit diagram showing an emulation circuit of the emulator connected to an RC circuit; and 
     FIG. 3 is a timing diagram of the clock signals in the emulator of the present invention. 
    
    
     SUMMARY 
     The present invention comprises an emulator for generating a CMOS level clock from RC components and a method for transforming a low speed clock input signal from an RC network into a square wave form input signal for use as a CMOS level clock signal. In the preferred best mode of the invention, the emulator comprises two emulation chips and an emulation circuit. In operation, the user&#39;s RC compatible microcontroller chip is replaced by the emulator which is plugged into the user&#39;s circuit board which contains the RC components. 
     The first emulation chip monitors the signal input from the RC network and accurately creates a sawtooth waveform signal having a frequency responsive to the value of the user&#39;s RC components. It has been found that a microcontroller chip having an RC clock input mask option is suitable for this purpose. 
     The emulation circuit includes a high input impedance circuit, a comparator, and an inverter. The emulation circuit is used for transforming and inverting the sawtooth wave signal into a CMOS level clock input signal. The comparator receives a voltage value from the RC circuit after passing through a resistor element at its (+) or non-inverting input and compares this to a reference voltage received at its (-) inverting input. When the voltage signal formed at the non-inverting (+) input of the comparator is less than that of the voltage signal formed at the inverting (-) input of the comparator, the non-inverting (+) output goes low and the inverting output (-) becomes high. When the voltage signal formed at the non-inverting (+) input is higher than the voltage signal formed at the inverting (-) input, the non-inverting (+) output is high and the inverting (-) output is low. 
     The inverted square wave signal may then be directed through a serially connected inverter to produce a square wave form signal which may be used as a CMOS level clock signal. The duty cycle of the square wave clock signal may be tuned by providing appropriately selected resistor elements to the reference voltage source for the comparator of the emulation circuit. 
     The second emulation chip is connected to the output of the inverter and is preferably a microcontroller chip having a CMOS clock input mask option. The second emulation chip performs all the same functions as the user&#39;s RC clock input microcontroller. 
     A separate voltage source is provided to the emulation circuit disposed medial of the inverter and the second emulation chip to boost the amplitude of the CMOS level clock input signal to a compatible level. 
     DETAILED DESCRIPTION 
     The following detailed description illustrates the invention by way of example, not by way of limitation of the principles of the invention. This description will clearly enable one skilled in the art to make and use the invention, and describes several embodiments, adaptations, variations, alternatives and uses of the invention, including what I presently believe is the best mode of carrying out the invention. 
     Referring now to FIG. 1, there is disclosed a block diagram showing an emulator of this invention generally designated by reference numeral 10 for an RC network or circuit 12. The emulator 10 receives signal input from the RC 12 network and in turn supplies a clock or square wave signal for a second emulation chip 14. The microcontroller 14 may be independent of the emulator 10 or may be included on the same board as the emulator for convenient packaging. In the past, CMOS level emulation chips have not been compatible with such an RC network 12. In particular a CMOS level microcontroller cannot fully support an RC network since they are not able to form a usable clock signal from an RC network by a CMOS emulator. This is especially a problem when different RC circuits and CMOS circuits are used. 
     As shown in FIG. 2, the RC network 12 comprises a resistor RU connected to a power supply V cc , and a capacitor CU connected to ground, with the resistor RU being connected to the capacitor CU through a conductive lead 16. The RC network 12 is representative of a manufacturer&#39;s RC network and is typically provided on a user&#39;s circuit board. The emulator 10 of this invention for the microcontroller 14 is suitable for use in combination with any number of different RC networks 12 and is simply plugged in to the manufacturer&#39;s board in place of the user&#39;s microcontroller chip. 
     The emulator 10 comprises a first emulation chip 22 and an emulation circuit 18. The emulation chip 22 includes a pin for clock input (CKI) for connection to the RC network 12 at point (A) by lead 20. In the preferred best mode of the invention, the first emulation chip 22 is a microcontroller chip which includes support for RC mask option. The first emulation chip 22 is connected to point (A) of the RC network 12 at its clock input pin and is used for monitoring the signal input generated by the RC network 12. This results in the accurate production of a sawtooth wave form where the RC network 12 is connected to the emulation chip 22. An example emulation chip having RC mask option is the COP822C available through National Semiconductor Corp., Santa Clara, California. The emulation circuit 18 is also connected to both the first emulation chip 22 and the RC Network 12 by means of lead 24. The emulation chip 22 includes known internal circuit means for generating a sawtooth wave form signal having a frequency responsive to the value of the RC components selected. 
     In operation, as the capacitor CU charges through the resistor RU from the power supply V cc , an RC signal is formed on line 20 to the emulation chip 22 which becomes forward biased when the voltage on line 20 increases a sufficient amount (V p ), thus causing the resistance at the RC mask option clock input of the first emulation chip 22 to decrease sharply. When the voltage on line or lead 20 decreases well below the voltage V p , the emulation chip 22 becomes reversed biased again, and cuts off the flow of current, thus causing the capacitor CU to charge again. In this manner, a sawtooth wave form signal is generated at (A) along line 20 connecting the emulation chip 22 to the junction of the resistor RU and the capacitor RU. The sawtooth waveform (A) is shown graphically as a plot of magnitude v. time along the upper time abscissa in the timing diagram of FIG. 3. 
     As shown in FIG. 2, the sawtooth signal (A) generated by the emulation chip 22 is also connected to a resistor R 1  over line or lead 24. In turn, the resistor R 1  is connected by line 30 to the (+) input on pin 3 of a high speed differential comparator 26. R 1 , R 2  and pin 3 of the comparator 26 form a high input impedance circuit. The emulator 10 also includes a pair of resistors R 3  and R 4  for providing a reference signal (B) over the line 28 to the (-) input on pin 2 of the comparator 26. The non-inverting output from pin 7 of the comparator 26 is connected over a lead 32 to a resistor R 2  which in turn is connected to the resistor R 1  in order to provide feedback for the resistor R 1 . Of the remaining pins of comparator 26, pin 5 connects to ground, pin 4 connects to a power source (-5V) and pin 1 is left unconnected. Thus, when the voltage from the resistor R 1  on the (+ ) non-inverting input of the comparator 26 exceeds the reference voltage (B) on the (-) inverting input of the comparator 26, a high signal is formed on pin 7 of the comparator 26. When the voltage of the (+) input of the comparator 26 is less than the reference voltage (B) at the (-) input of the comparator 26, a low signal is formed on the output at pin 7 of the comparator 26. The inverting output at pin 6 is connected to pin 1 of inverter 38 by line 34. When the two signals at the (+) input and (-) input are equal the output at pin 6 of the comparator is zero. In this manner, the sawtooth wave signal (A) supplied to the resistor R 1  is transformed by the comparator 26 to a square wave or clock signal on pin 7 of the comparator 26 supplied to the resistor R 2 . 
     With further reference to FIG. 2, the square wave output signal formed by the comparator 26 is inverted and supplied in inverted form on pin 6 of the comparator 26. The inverted signal is supplied to an inverter 38 via line 34 which inverts the signal to form a square wave or clock signal (C) on line 36 which is supplied to the second emulation chip 14, previously discussed in connection with FIG. 1. The second emulation chip 14 is preferably a microcontroller chip having a CMOS clock input mask option and is included on the emulator board in its own physical packaging. The second emulation chip 14 has full I/0 capability and performs all the function of the user&#39;s RC type microcontroller chip but unlike the user&#39;s chip, the second emulation chip 14 supports CMOS level clock input. In order to boost the clock signal to a desired level, the emulator circuit 18 may also include a resistor R 5  which is connected between the power supply V cc  and the line 36. Typical values for the resistors R 1 , R 2 , R 3 , R 4 , and R 5  are set forth in the drawing. 
     A timing diagram of the sawtooth signal (A) and the resulting square wave signal (C) is shown in FIG. 3. As shown, the sawtooth wave (A) rises smoothly from the time t 0  to the time t 3  where it vanishes rapidly, with the pattern being repeated periodically during a suitable period of time, such as 600 nanoseconds (nsecs). In turn, the clock signal rises sharply at the times t 1  and t 4  which times are slightly later than the respective times t 0  and t 3  associated with the sawtooth signal (A), and then sharply drops at the respective times t 2  and t 5 , which pattern is repeated in order to form a pulse train for the clock signal (C). A typical time period between the times t 1  and t 4  may be approximately 600 nanoseconds (nsecs) for the repetition of the pulses. A typical time period for each pulse between the times t 1  and t 2  and between the times t 4  and t 5  ma be approximately 300 nanoseconds (nsecs.), and a typical time period t 2  to t 4  between pulses may be approximately 300 nanoseoonds (nsecs.) 
     In this manner, the CMOS emulator of the present invention forms a square wave signal from an RC network, where the emulator and RC circuits were not previously compatible to achieve this result. The duty cycle of the square wave signal may be modified by appropriately tuning the resistors R 3  and R 4 . In this manner, the square wave signal may be modified, if desired. 
     The foregoing detailed description has been given for clearness of understanding only, and it should be understood that various modifications within the scope of this invention can be made by one of ordinary skill in the art without departing from the spirit thereof. I therefore wish my invention to be defined by the scope of the appended claims in view of the specification as broadly as the prior art will permit.