EmbeddedRelated.com
Forums
Memfault Beyond the Launch

MSP430 UART

Started by "paddu.koti" July 24, 2008
Hi,

How can I use MSP430F2274 UART only in TX mode.I am finding it
difficult to modify the sample program
"msp430x22x4_uscia0_uart_06_9600.c" ,

how can I change this program to check UART TX function.
(bcos I am using only one MSP430)

I have to check whether the TXIFG flag resets after the data is
transmitted from TXBUF.

Thankyou...

Beginning Microcontrollers with the MSP430

Change the second to last line of main()
from: IE2 |= UCA0RXIE;
-to-: IE2 |= UCA0TXIE;
The program will send the string and idle for ever.

If you want it to repeat sending the same string,
change the last line of USCI0TX_ISR()
from: IE2 &= ~UCA0TXIE;
-to-: i = 0;

--- In m..., "paddu.koti" wrote:
>
> Hi,
>
> How can I use MSP430F2274 UART only in TX mode.I am finding it
> difficult to modify the sample program
> "msp430x22x4_uscia0_uart_06_9600.c" ,
>
> how can I change this program to check UART TX function.
> (bcos I am using only one MSP430)
>
> I have to check whether the TXIFG flag resets after the data is
> transmitted from TXBUF.
>
> Thankyou...
>

Thankyou,
Actually I have to check the TXIFG flag.Whether the flag resets after the data is transmitted completely.
our client says that the flag resets before the complete data is transmitted.
Best regards..

----- Original Message ----
From: old_cow_yellow
To: m...
Sent: Friday, July 25, 2008 1:34:36 PM
Subject: [msp430] Re: MSP430 UART
Change the second to last line of main()
from: IE2 |= UCA0RXIE;
-to-: IE2 |= UCA0TXIE;
The program will send the string and idle for ever.

If you want it to repeat sending the same string,
change the last line of USCI0TX_ISR( )
from: IE2 &= ~UCA0TXIE;
-to-: i = 0;

--- In msp430@yahoogroups. com, "paddu.koti" wrote:
>
> Hi,
>
> How can I use MSP430F2274 UART only in TX mode.I am finding it
> difficult to modify the sample program
> "msp430x22x4_ uscia0_uart_ 06_9600.c" ,
>
> how can I change this program to check UART TX function.
> (bcos I am using only one MSP430)
>
> I have to check whether the TXIFG flag resets after the data is
> transmitted from TXBUF.
>
> Thankyou...
>

__._,_..___
Messages in this topic (2) Reply (via web post) | Start a new topic
Messages | Files | Photos | Links | Database | Polls | Members | Calendar


Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Recent Activity
* 7
New MembersVisit Your Group
Yahoo! Finance
It's Now Personal
Guides, news,
advice & more.
Yahoo! Groups
Everyday Wellness Zone
Check out featured
healthy living groups.
Y! Groups blog
the best source
for the latest
scoop on Groups.
.




My understanding about the TXIFG is as follows.

(1) TXIFG means the TXBUF is ready for new data. Initially, it is set.
(2) If your software puts data in TXBUF, TXIFG will be cleared
automatically by the hardware because TXBUF now has data and is not
ready for new data now.
(3) But the hardware will also try to transfer the new data in TXBUF
into the a shift-register which shifts the data out one bit at time to
transmit. Your software has no access to that shift-register, but the
hardware knows what it is doing. When the shift-register is empty, the
data in TXBUF will automatically transfer to the shift-register. At
that time, TXIFG will be automatically set again because TXBUF is
ready for new data again. Previou data in the shift-register is in the
process of being transmitted.

As far as I know, examining TXIFG only tells you whether you can put
new data in TXBUF or not. It does not tell you whether the previous
data is already transmitted or not.

--- In m..., Paddu Koti wrote:
>
> Thankyou,
> Actually I have to check the TXIFG flag.Whether the flag resets
after the data is transmitted completely.
> our client says that the flag resets before the complete data is
transmitted.
> Best regards..
>
> ----- Original Message ----
> From: old_cow_yellow
> To: m...
> Sent: Friday, July 25, 2008 1:34:36 PM
> Subject: [msp430] Re: MSP430 UART
> Change the second to last line of main()
> from: IE2 |= UCA0RXIE;
> -to-: IE2 |= UCA0TXIE;
> The program will send the string and idle for ever.
>
> If you want it to repeat sending the same string,
> change the last line of USCI0TX_ISR( )
> from: IE2 &= ~UCA0TXIE;
> -to-: i = 0;
>
> --- In msp430@yahoogroups. com, "paddu.koti" wrote:
> >
> > Hi,
> >
> > How can I use MSP430F2274 UART only in TX mode.I am finding it
> > difficult to modify the sample program
> > "msp430x22x4_ uscia0_uart_ 06_9600.c" ,
> >
> > how can I change this program to check UART TX function.
> > (bcos I am using only one MSP430)
> >
> > I have to check whether the TXIFG flag resets after the data is
> > transmitted from TXBUF.
> >
> > Thankyou...
> > __._,_..___
> Messages in this topic (2) Reply (via web post) | Start a new topic
> Messages | Files | Photos | Links | Database | Polls | Members |
Calendar
>
>
> Change settings via the Web (Yahoo! ID required)
> Change settings via email: Switch delivery to Daily Digest | Switch
format to Traditional
> Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
> Recent Activity
> * 7
> New MembersVisit Your Group
> Yahoo! Finance
> It's Now Personal
> Guides, news,
> advice & more.
> Yahoo! Groups
> Everyday Wellness Zone
> Check out featured
> healthy living groups.
> Y! Groups blog
> the best source
> for the latest
> scoop on Groups.
> .
>
>
>
>
>

> As far as I know, examining TXIFG only tells you whether you can put
> new data in TXBUF or not. It does not tell you whether the previous
> data is already transmitted or not.
That is correct!

But you can test the UCBUSY-Flag in UCAxSTAT, that tells you if a
transmit or receive operation is in progress (=1) or not (=0)

Memfault Beyond the Launch