Abstract:
A microcontroller chip (10) controls an external system with which the device is installed and includes an on-chip peripheral universal timing function module (CCP1, CCP2) with a register (30) for storing a value selected to signify a distinctive event in a waveform. A timer (32) generates a series of values as a function of time as a measure of the value selected to signify the distinctive event. The register (30) and timer (32) are coupled to a pin (33) of the microcontroller chip (10) on which said waveform is to be applied. Equality between the values in the timer (32) and the register (30) signify the event as one of a capture and a compare of an event in the waveform, to generate an interrupt to a CPU. The register (30) is selectively split into separate master (30-L) and slave (30-H) registers for automatic synchronization of the transfer of a value entered into the master register (30-L) to the slave register (30-H) with a repetitive boundary of the waveform, to provide selective pulse width modulation of the waveform.
Abstract:
A microcontroller apparatus is provided with an instruction set for manipulating the behavior of the microcontroller. The apparatus and system is provided that enables a linearized address space that makes modular emulation possible. Direct or indirect addressing is possible through register files or data memory. Special function registers, including the Program Counter (PC) and Working Register (W), are mapped in the data memory. An orthogonal (symmetrical) instruction set makes possible any operation on any register using any addressing mode. Consequently, two file registers to be used in some two operand instructions. This allows data to be moved directly between two registers without going through the W register. Thus, increasing performance and decreasing program memory usage.