electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

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


Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS -> Help!ez430rf2500-seh solar energy tool-can not use UART mode
Author Message
bettyxyz1028



Joined: 25 Sep 2009
Posts: 11


Post05 Oct 2009 10:22   

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


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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Back to top
Google
AdSense
Google Adsense




Post05 Oct 2009 10:22   

Ads




Back to top
bettyxyz1028



Joined: 25 Sep 2009
Posts: 11


Post08 Oct 2009 3:21   

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
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Embedded Systems and Real-Time OS -> Help!ez430rf2500-seh solar energy tool-can not use UART mode
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
help me solar-energy-man!! (1)
Can you help me to use Gerber tool ? (3)
solar energy, solar cells (3)
Need help! Why my solar panel will not charge my laptop batt (17)
How can i use software UART in Codevision(for AVR MCU)? (1)
help on Serial Communication using software not UART (5)
making solar and energy saving (1)
Homemade Solar Cells [Free Energy eBook] (18)
I can not use Library Manager in IC5033 (10)
Which tool can use for RC polyphase filter design? (1)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS