Contents
How to access individual pins in MSP430?
In the MSP430, accessing individual pins is commonly written using defines and bitwise operators: Be sure to include the proper header file for your specific chip that contains the port and pin ( BIT#) defines. The following code is a workaround for individual pin access using Code Composer (with a little tweak can be ported on any compiler).
What should the voltage be on a MSP430 GPIO?
The MSP430 like most devices has a limit on the amount of current that can be drawn from the pins, both individually and as a whole. The datasheet of the MSP430 specifies that with 6mA of current draw at a pin the following should hold: VOH – Output Voltage High Level VCC-0.3V VOL – Output Voltage Low Level VCC+0.3V
How does the MSP430 work in input mode?
The MSP430 also requires that applied voltages to pins in input mode be within specification. The MSP430 uses a Schmitt-Trigger at the input of each pin to determine whether the voltage represents a logic High (1) or Low (0). The datasheet specifies what to expect as far as logic thresholds.
What kind of compiler do I need for MSP430?
I am using Code Composer Studio v5.3 and the compiler that comes with that. In the MSP430, accessing individual pins is commonly written using defines and bitwise operators: Be sure to include the proper header file for your specific chip that contains the port and pin ( BIT#) defines.
Where to find address on MSP430 data sheet?
The address can be found on the data sheet for each device. The MSP430 can set or clear individual bits via the BIS or BIC (BIt Set) instructions. So I would certainly expect P2OUT.BIT1 = 1; to work in C (at least in mspgcc; the equivalent Ada code does)
Which is better MSP430 or io430.h?
IAR’s io430.h does have support for that, but the consensus is that msp430.h is the better header (as the msp430xxxx.h headers are written by TI employees, io430.h is written by IAR employees) PxOUT |= BITy style is the best way to set a single bit.