Sign in

username:

password:



Not a member?

Search msp430



Search tips

Subscribe to msp430



Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | MSP430 | Uart Software using Timer_A Library from TI

The purpose of this group is to foster exchange of information on the Texas Instruments MSP430 family of microcontrollers and related tools. Everyone welcome, all levels of familiarity/expertise.

Uart Software using Timer_A Library from TI - ferdinando_terada - Aug 31 22:18:44 2009

hey guys, i'm with a problem using the TI's library to create a UART by software (http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=slaa307a).
I'll put my code for you to see:

---------------------------------------------------------------------
#include "msp430x22x4.h"
#include "ta_uart.h"

int callBack( unsigned char c );

void main (void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer

TI_initTimer(callBack, _1MHz_SMCLK_09600_Bitime, TASSEL_1);
_EINT();

TI_TX_Byte( 0x7E );
TI_TX_Byte( 0 );
TI_TX_Byte( 5 );
TI_TX_Byte( 0x08 );
TI_TX_Byte( 0x01 );
TI_TX_Byte( 0x43 );
TI_TX_Byte( 0x45 );
TI_TX_Byte( 0x01 );
TI_TX_Byte( 0x6D );

LPM3;

}

int callBack( unsigned char c )
{
TI_TA_UART_StatusFlags &= ~TI_TA_RX_RECEIVED; // allows for RX during TX (will not effect TXed byte)
TI_TX_Byte( c ); // echo byte
return TA_UART_STAY_LPM; // return to LPM3
}
---------------------------------------------------------------------
I'm using the msp430f2274... so all i change in the .h file is the device and the ports to use the timer A (in msp430f2274 P2.3 and P2.4 correspond to Timer A). But i can't receive anything. i don't know where is the problem (i'm using a Xbee to test the interface... so when i send those bytes to Xbee i had to receive something by uart but none is coming back, help me please)
see yah!

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of msp430 -- send a blank email to msp430-subscribe@yahoogroups.com )