Hi Sir,
I am new to msp430 programming & using TI's MSP Launchpad,having msp430g2231 controller.
I want to send the character A-Z to hyperterminal,i google out one code which i mention below ,& build in ccsV-4 as compiler,the resistor i am mentioning was not found in header file of msp430g2231,what is exact code for msp430g2231 that sends out character strings without using button interrupt.
but it giving few bugs which i have mention below-
CODE:-
#include <msp430g2231.h>
void delay(unsigned int ms)
{
unsigned int i, j;
for (i = 0; i <= ms; i++)
{
for (j = 0; j<=255; j++);
}
}
void main(void)
{
unsigned int i;
WDTCTL = WDTPW + WDTHOLD; // Stop WDT
P3SEL |= 0x06; // P3.4,5 = USART0 TXD/RXD
ME1 |= UTXE0 + URXE0; // Enable USART0 TXD/RXD
UCTL0 |= CHAR; // 8-bit character
UTCTL0 |= SSEL0; // UCLK = ACLK
UBR00 = 0x03; // 32k/9600 - 3.41
UBR10 = 0x00; //
UMCTL0 = 0x4A; // Modulation
UCTL0 &= ~SWRST; // Initialize USART state machine
while (1)
{
for (i = 0x41; i <= 0x5A ; i++)
{
while (!(IFG1 & UTXIFG0));
TXBUF0 = i;
delay(100);
}
}
_BIS_SR(LPM3_bits + GIE); // Enter LPM3 w/ interrupt
}
**** Build of configuration Debug for project serial ****
C:\Program Files\Texas Instruments\ccsv4\utils\gmake\gmake -k all
'Building file: ../main.c'
'Invoking: Compiler'
"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/msp430/bin/cl430" -vmsp -g --define=__MSP430G2231__ --include_path="C:/Program Files/Texas Instruments/ccsv4/msp430/include" --include_path="C:/Program Files/Texas Instruments/ccsv4/tools/compiler/msp430/include" --diag_warning=225 --printf_support=minimal --preproc_with_compile --preproc_dependency="main.pp" "../main.c"
"../main.c", line 40: error: identifier "P3SEL" is undefined
>> Compilation failure
"../main.c", line 42: error: identifier "ME1" is undefined
"../main.c", line 42: error: identifier "UTXE0" is undefined
"../main.c", line 42: error: identifier "URXE0" is undefined
"../main.c", line 44: error: identifier "UCTL0" is undefined
"../main.c", line 44: error: identifier "CHAR" is undefined
"../main.c", line 46: error: identifier "UTCTL0" is undefined
"../main.c", line 46: error: identifier "SSEL0" is undefined
"../main.c", line 47: error: identifier "UBR00" is undefined
"../main.c", line 48: error: identifier "UBR10" is undefined
"../main.c", line 49: error: identifier "UMCTL0" is undefined
"../main.c", line 50: error: identifier "SWRST" is undefined
"../main.c", line 58: error: identifier "UTXIFG0" is undefined
"../main.c", line 60: error: identifier "TXBUF0" is undefined
"../main.c", line 66: warning: statement is unreachable
14 errors detected in the compilation of "../main.c".
gmake: *** [main.obj] Error 1
gmake: Target `all' not remade because of errors.
Build complete for project serial
How to remove such bugs.
If it not for msp430g2231,what is exact code for it.
Please reply Please......