Special Filter Instructions

N tap filters ideally require 2N multiply±accumulates. Four instructions are provided to compute this equation: FIR, FIRK, COR and CORK. All filter instructions require overflow modes to be reset since these instructions have built in overflow hardware. In addition, these instructions must be used with a RPT instruction.

FIR and FIRK instructions perform 16-x-16 bit multiplies and 32-bit accumulation in 2 clock cycles (per tap). The FIR/FIRK instruction takes 2N clock cycles (for N taps) to execute (once inside the RPT loop). FIRK is useful for fixed filters and requires the minimum amount of data memory. However, the DP register may need to be context saved and restored since the filter coefficients are in ROM. FIR is useful for adaptive filtering or applications where coefficients are provided from an external source. FIR does not require a context save and restore for the DP register since both the buffer and the coefficients are in RAM.

COR and CORK instructions perform 16-x-16 bit multiplies and 48-bit accumulation in 3 clock cycles (per tap). Once inside the RPT loop, the total number of clock cycles for an N tap filter is 3N. The COR and CORK instructions are identical in operation and arguments to FIR and FIRK. However, an additional 16 bit extended accumulate cycle is added to prevent the arithmetic overflow common in auto correlation filters.

FIR (COR) instructions: The execution of the filter instructions is shown in Figure 4±6. To use FIR (COR) instructions, some initial setup is required. ConsecutiveRxpair{Rxeven,Rxeven+1}shouldbechosenwithRxevenpointing

to the RAM sample buffer array and Rxeven+1 pointing to the RAM coefficient array. The MR register should be loaded with the first coefficient, h[0]. FIR

(COR) can now execute with a repeat instruction for N taps. The value of Rxeven is incremented during execution. After execution, the last value of

Rxeven points to the sample buffer location where the next sample can be stored.

FIRK (CORK) instructions: FIRK (CORK) instructions work exactly the same was as FIR(COR) instructions, however, the coefficient array is located in program memory (ROM). Instead of loading Rxeven+1 with the pointer to coefficient array in RAM, the data pointer, DP, is loaded with the value of the coefficient array.

Circular Buffering:The easiest way to understand circular buffering is by example. Suppose a filter, h[n], has 3 coefficients. Then, theoretically, to calculate one output sample of the filter, the buffer should contain the current sample plus the past 2 samples. Since the output, y[k], for a three tap filter is,

y[k] = h[0]• ⋅[k] + h[1]• ⋅[k±1] + h[2]• ⋅[k±2]

On the C614, the circular buffer must contain N+1 samples. In the above ex- ample, the buffer must contain 4 locations (which is one more location than

4-60

Page 152
Image 152
Texas Instruments MSP50C614 manual Special Filter Instructions

MSP50C614 specifications

The Texas Instruments MSP50C614 is a microcontroller that belongs to the MSP430 family, renowned for its low power consumption and versatile functionality. Primarily designed for embedded applications, this microcontroller is favored in various industries, including consumer electronics, industrial automation, and healthcare devices.

One of the standout features of the MSP50C614 is its ultra-low power technology, which enables it to operate in various power modes. This makes it ideal for battery-powered applications, where energy efficiency is crucial. The MSP430 architecture allows for a flexible power management system, ensuring that energy is conserved while providing robust performance.

The MSP50C614 is equipped with a 16-bit RISC CPU that delivers high performance while maintaining low power usage. With a maximum clock frequency of 16 MHz, it can execute most instructions in a single cycle, resulting in swift operation and responsive performance. This microcontroller also comes with a generous flash memory capacity, allowing developers to store large amounts of code and data conveniently.

In terms of peripherals, the MSP50C614 is highly versatile. It features a range of digital and analog input/output options, including multiple timers, GPIO ports, and various communication interfaces like UART, SPI, and I2C. This extensive set of peripherals allows for seamless integration with other components and simplifies the design of complex systems.

The integrated 12-bit Analog-to-Digital Converter (ADC) stands out as a valuable characteristic of the MSP50C614. This feature enables the microcontroller to convert physical analog signals into digital data, making it particularly useful for sensing applications and real-time monitoring.

Another noteworthy technology employed in the MSP50C614 is its support for low-voltage operations. With a broad supply voltage range, this microcontroller can function efficiently in diverse environments and is suitable for low-power applications, enhancing its practicality.

Moreover, Texas Instruments provides software support in the form of Code Composer Studio and various libraries that make it easier for developers to program and utilize the MSP50C614 effectively.

In summary, the Texas Instruments MSP50C614 microcontroller is a powerful, low-power solution equipped with the features and technologies necessary for efficient operation in a wide array of applications. Its blend of performance, flexibility, and energy efficiency makes it a popular choice among engineers and designers looking to create innovative, sustainable designs in the rapidly evolving tech landscape.