Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help!ez430rf2500-seh solar energy tool-can not use UART mode

Status
Not open for further replies.

bettyxyz1028

Newbie level 6
Joined
Sep 25, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,398
I hav the ez430-rf2500-seh solar energy harvesting tool. I decided to make some modification based on the Demo code.

I wanna choose P3.5 (UART) as a receive pin.

I follow the sample codes to write a simple interrupt.

I disable the previous P3.5 function (connect to solar panel inner battery ) in the demo code.

I hav alrdy reserve a location in the msg. And the preset number can be transmitted out successfully.

I also use an echo (UCA0TXBUF=UCA0RXBUF) to test whether the ED receive the data from another board successfully.



Here comes the problem:

If i wanna the transmission btwn ED and AP, I cannt use P3SEL=0x20.

If i wanna the interrupt to happen, I hav to write in P3SEL=0x20.



I change the P3SEL=0x2F according to datasheet. But it can not work!



The cc2500 and MSP430f2274 communicate via SPI mode rite? Does that mean i can not use UART mode?

What exactly should i do to juz transfer an integer from another board to ez430-rf2500 target board????



Anybody can help me with this issue????? It looks like an easy task......

Thanks so much in advance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 

Re: Help!ez430rf2500-seh solar energy tool-can not use UART

Here is my code:

linkTo()
{
...

P3SEL = 0x3f; // If i put this one here, transmission will fail
BCSCTL1 = CALBC1_1MHZ; // Set DCO = 1MHz
DCOCTL = CALDCO_1MHZ;
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 0x68; // 1MHz 9600
UCA0BR1 = 0; // 1MHz 9600
UCA0MCTL = UCBRF_0 + UCBRS_1 ; // Modulation UCBRSx = 1
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
__enable_interrupt();

...
}

#pragma vector=USCIAB0RX_VECTOR
__interrupt void USCI0RX_ISR(void)
{
aNumber = UCA0RXBUF; // TX -> RXed character
IE2&=~UCA0RXIE;
}

Added after 53 seconds:

Another way:

BCSCTL1 = CALBC1_1MHZ; // Set DCO = 1MHz
DCOCTL = CALDCO_1MHZ;
UCA0CTL1 |= UCSSEL_2; // SMCLK
UCA0BR0 = 0x68; // 1MHz 9600
UCA0BR1 = 0; // 1MHz 9600
UCA0MCTL = UCBRF_0 + UCBRS_1 ; // Modulation UCBRSx = 1
UCA0CTL1 |= UCSWRST; //set the USCWRST
P3SEL |= 0x3f;//configure ports
UCA0CTL1 &= ~UCSWRST;//clear uscwrst
if(IFG2 & UCA0RXIFG)
{
aNumber = UCA0RXBUF;
}
else
{
aNumber=11;
}



Both can not work... Anyone can help??? tks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top