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 Action Bits of Use in project name answer? dc_filter Filters the DC content from Same as Filters out DC an AC mains waveform input content of Voltage signal. and Current for Power calculations, leaving only AC. debounce Used to debounce a push N/A Used for testing and button switch, i.e. eliminates debugging the errors associated with circuit (i.e. a manual pushing a button to activate a clock edge). clock edge. div_sh48 Shifts a 48 bit integer 32 Combines two upwards by a specified operations into one amount, and then divides a to increase 16 bit integer into the 48 bit efficiency and integer. decrease time spent. Useful for dot product calculations. div48 Divides a 16 bit integer into a 32 For dot product 48 bit integer. calculations. imul16 Completes a 32 Multiplication of 16x16 2’s 2’s complement multiplication. Current and Voltage. isqrt32 Computes the square root of 16 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. mul48 Computes a 32x16 32 multiplication function. q1_15_mul Computes a 16x16 32 multiplication function. Figure 59: Table of functions for MSP430 programming
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
Final%20Paper%20(Past%20Tense).docx