CIPs Overview

The solution is implemented using CIPs. Because the operations are done independently of the core, the software complexity and memory space used are reduced.

The CIPs used and their role in the system are presented in the following paragraphs:

  1. 1.Numerically Controlled Oscillator (NCO)

    In order to create each sequence of partial step, a signal with a frequency six times greater than the signal that drives a contact is needed. The NCO peripheral is used to generate this signal.

    The NCO is a counter that uses the overflow from the addition of an increment value to divide the input frequency. It generates a signal with a fixed 50% duty cycle. Because of this, the output from the NCO peripheral (NCO_out) is used as a starting point for generating the signals that drive the motor. Also, NCO_out is used as clock signal for the CLCs. The NCO is suitable for this application, because its output is stable and the output frequency resolution does not vary with the divider value.

  2. 2.Configurable Logic Cell (CLC)

    The CLC peripheral provides programmable logic cells that operates outside the software execution and allows the user to combine input signals using logic functions. It also offers a great flexibility because of the wide range of logic functions that can be implemented: AND, NAND, AND-OR, AND-OR-INVERT, OR-XOR, OR-XNOR, S-R Latch, Clocked D Latch with Set and Reset, Transparent D Latch with Set and Reset.

    The CLC takes over NCO_out and passes it through a series of operations (NOT, AND, OR, delay, multiplexing) in order to obtain the signals that will drive the motor.

  3. 3.Timer0

    Timer0 can be configured to run in both 8-bit and 16-bit modes with multiple prescaling and postscaling options. It is used to divide the NCO_out frequency, in order to generate a signal that will indicate the number of steps needed to be run by the motor.

  4. 4.Timer2

    Timer2 is an 8-bit timer used to divide the NCO_out frequency, in order to generate a signal that will represent the input for the CLC peripheral.

  5. 5.Peripheral Pin Select (PPS)

    The PPS module connects peripheral inputs and outputs to the device I/O pins. It is used to link the peripherals that cannot be connected directly.

  6. 6.Analog-to-Digital Convertor with Computation (ADCC)

    The ADCC makes the conversion of an analog input signal to a 12-bit digital representation. It has computation capabilities as averaging, low-pass filtering, threshold comparison, and selectable interrupts. All the computation is done by the hardware.

    It is used to convert the value provided by a potentiometer into a numerical representation that will adjust the number of beats per minute of the metronome.