drawing was a magnified view of a single pin; the bottom-left drawing was a side view of the entire MCU; and the bottom-right drawing was a side view rotated 90o. Figure 49: MSP430AFE253 dimensions Permission requested from www.ti.com Available with this microcontroller was a software suite with a built-in library of functions to more easily and quickly manipulate data for a variety of purposes. This library contains a large amount of code support to perform many of the basic calculations related to and required for energy metering. These values include those found in figure 50, shown below. Base Specific Voltage RMS Peak Current RMS Peak Energy Reactive Active Apparent Power Factor Temperature Frequency Tamper detection Figure 50: Quantities, MSP430 Information from Another library available from TI was the Capacitive Touch Library, which would help in enabling the capacitive touch capabilities for our MSP430. In the case that our group chooses to use a touch screen LCD hooked up directly to an MSP430, this library of code would be very helpful in helping us to learn the environment as well as write the necessary code for our project. Several references and guide manuals were also on TI’s website for free download which help guide first-time users through coding a touch screen interface with the MSP430. The code for the MSP430 could be written and developed within the free environment of a program called Code Composer Studio. This program was free for students, and provides all the support and features needed to code, test, debug, and run our project using the MSP430. Another important aspect of the microcontroller was its limitations and recommended operating conditions. Our group would need to be aware of these values especially from the PCB implementation stage and through the final testing, but also when initially designing the circuit diagrams and board layout. First, the range of temperatures allowed for the device was hardly restrictive, and should not be a cause for concern for our group; once programmed, the device
multiplying two numbers, or a number of other small operations which could be referenced. The coding process involves using many of the functions provided with the software to manipulate the data flowing into the MSP430. The following functions, shown in Figure 59 below, would likely be used in one way or another; this list would be used as a quick reference over the next several months while our group edits and debugs our code. Function name Action Bits of answer? Use in project dc_filter Filters the DC content from an AC mains waveform signal. Same as input Filters out DC content of Voltage and Current for Power calculations, leaving only AC. debounce Used to debounce a push button switch, i.e. eliminates errors associated with pushing a button to activate a clock edge. N/A Used for testing and debugging the circuit (i.e. a manual clock edge). div_sh48 Shifts a 48 bit integer upwards by a specified amount, and then divides a 16 bit integer into the 48 bit integer. 32 Combines two operations into one to increase efficiency and decrease time spent. Useful for dot product calculations. div48 Divides a 16 bit integer into a 48 bit integer. 32 For dot product calculations. imul16 Completes a 16x16 2’s complement multiplication. 32 2’s Multiplication of Current and Voltage. isqrt32 Computes the square root of a 32 bit number, where the last 16 bits were after the decimal point. NOTE: be careful not to have a negative number as input. 16 mul48 Computes a 32x16 multiplication function. 32 q1_15_mul Computes a 16x16 multiplication function. 32 Figure 59: Table of functions for MSP430 programming