EmbeddedRelated.com
Forums

Msp430F2274: How to use UART without interrupt?

Started by xiang_yi_zhang October 1, 2009
I know that for MSP430fg439, there is a way that u can transmit or receive data without using interrupt enable. ME can replace IE.

I try to find the same way in MSP430F2274, but i cant.

Is there any method to be in the UART mode in MSP430F2274 without interrupt? Where can i find this kind of sample code?

TKs in advance!

Beginning Microcontrollers with the MSP430

The real problem is, you relied on "sample code" without understanding how anythin works. Thus after you get "sample code" to make fg439 work, you ask for "sample code" for f2274 to do the same thing. After this, you will still ask for all kinds of other "sample code" for whatever you try to do. Only an IMPS (http://www.faqs.org/rfcs/rfc2795.html) can satisfy your needs for all the "sample code" you are going to need.
--- In m..., "xiang_yi_zhang" wrote:
>
> I know that for MSP430fg439, there is a way that u can transmit or receive data without using interrupt enable. ME can replace IE.
>
> I try to find the same way in MSP430F2274, but i cant.
>
> Is there any method to be in the UART mode in MSP430F2274 without interrupt? Where can i find this kind of sample code?
>
> TKs in advance!
>

Emmm...u sound like my supervisor!!!!!!!!!!!!!!!!!! R u my supervisor???????????
Im new to this...Im trying to understand the user guide.
Tkank you.

--- In m..., "old_cow_yellow" wrote:
>
> The real problem is, you relied on "sample code" without understanding how anythin works. Thus after you get "sample code" to make fg439 work, you ask for "sample code" for f2274 to do the same thing. After this, you will still ask for all kinds of other "sample code" for whatever you try to do. Only an IMPS (http://www.faqs.org/rfcs/rfc2795.html) can satisfy your needs for all the "sample code" you are going to need.
> --- In m..., "xiang_yi_zhang" wrote:
> >
> > I know that for MSP430fg439, there is a way that u can transmit or receive data without using interrupt enable. ME can replace IE.
> >
> > I try to find the same way in MSP430F2274, but i cant.
> >
> > Is there any method to be in the UART mode in MSP430F2274 without interrupt? Where can i find this kind of sample code?
> >
> > TKs in advance!
>

How about monkey see monkey do?

--- In m..., "xiang_yi_zhang" wrote:
>
> Emmm...u sound like my supervisor!!!!!!!!!!!!!!!!!! R u my supervisor???????????
> Im new to this...Im trying to understand the user guide.
> Tkank you.
>
> --- In m..., "old_cow_yellow" wrote:
> >
> > The real problem is, you relied on "sample code" without understanding how anythin works. Thus after you get "sample code" to make fg439 work, you ask for "sample code" for f2274 to do the same thing. After this, you will still ask for all kinds of other "sample code" for whatever you try to do. Only an IMPS (http://www.faqs.org/rfcs/rfc2795.html) can satisfy your needs for all the "sample code" you are going to need.
> >
> >
> > --- In m..., "xiang_yi_zhang" wrote:
> > >
> > > I know that for MSP430fg439, there is a way that u can transmit or receive data without using interrupt enable. ME can replace IE.
> > >
> > > I try to find the same way in MSP430F2274, but i cant.
> > >
> > > Is there any method to be in the UART mode in MSP430F2274 without interrupt? Where can i find this kind of sample code?
> > >
> > > TKs in advance!
> > >
>

||-_- well...u can say that...
I read but cant fully understand.So I turn to sample code and hope it can help me understand.

--- In m..., "old_cow_yellow" wrote:
>
> How about monkey see monkey do?
>
> --- In m..., "xiang_yi_zhang" wrote:
> >
> > Emmm...u sound like my supervisor!!!!!!!!!!!!!!!!!! R u my supervisor???????????
> > Im new to this...Im trying to understand the user guide.
> > Tkank you.
> >
> > --- In m..., "old_cow_yellow" wrote:
> > >
> > > The real problem is, you relied on "sample code" without understanding how anythin works. Thus after you get "sample code" to make fg439 work, you ask for "sample code" for f2274 to do the same thing. After this, you will still ask for all kinds of other "sample code" for whatever you try to do. Only an IMPS (http://www.faqs.org/rfcs/rfc2795.html) can satisfy your needs for all the "sample code" you are going to need.
> > >
> > >
> > > --- In m..., "xiang_yi_zhang" wrote:
> > > >
> > > > I know that for MSP430fg439, there is a way that u can transmit or receive data without using interrupt enable. ME can replace IE.
> > > >
> > > > I try to find the same way in MSP430F2274, but i cant.
> > > >
> > > > Is there any method to be in the UART mode in MSP430F2274 without interrupt? Where can i find this kind of sample code?
> > > >
> > > > TKs in advance!
> > > >
> > >
>

Roughly speaking, this is how the UART receiver works.

First, you set it up to receive. Then you wait for the external incoming signal to arrive. When that happens, the UART hardware will set a flag. After that flag is set, you can pick up the received data from the UART input buffer. One way to wait for the flag is to enable the interrupt and the CPU can do something else while waiting for the interrupt at the same time. Another way to wait for the flag is use CPU to check the flag directly until it is set by the hardware.

The UART transmitter works in a similar way.

First you set it up to transmit. When its output buffer is ready, it will set a flag. When that flag is set, the CPU can put data in that buffer and the UART will send it out. Thus before you put data into the output buffer, you have to wait for the flag. Again, one way to wait for the flag is to use interrupt. And another way is to use the CPU to check if the flag is set.

Most, if not all other peripherals work the in a similar way. They use various flags to indicate the state of that hardware. You can use interrupt to wait for the flag so that the CPU can do other things. You can also use the CPU to check the flag directly.
--- In m..., "xiang_yi_zhang" wrote:
>
> ||-_- well...u can say that...
> I read but cant fully understand.So I turn to sample code and hope it can help me understand.
>
> --- In m..., "old_cow_yellow" wrote:
> >
> > How about monkey see monkey do?
> >
> > --- In m..., "xiang_yi_zhang" wrote:
> > >
> > > Emmm...u sound like my supervisor!!!!!!!!!!!!!!!!!! R u my supervisor???????????
> > > Im new to this...Im trying to understand the user guide.
> > > Tkank you.
> > >
> > > --- In m..., "old_cow_yellow" wrote:
> > > >
> > > > The real problem is, you relied on "sample code" without understanding how anythin works. Thus after you get "sample code" to make fg439 work, you ask for "sample code" for f2274 to do the same thing. After this, you will still ask for all kinds of other "sample code" for whatever you try to do. Only an IMPS (http://www.faqs.org/rfcs/rfc2795.html) can satisfy your needs for all the "sample code" you are going to need.
> > > >
> > > >
> > > > --- In m..., "xiang_yi_zhang" wrote:
> > > > >
> > > > > I know that for MSP430fg439, there is a way that u can transmit or receive data without using interrupt enable. ME can replace IE.
> > > > >
> > > > > I try to find the same way in MSP430F2274, but i cant.
> > > > >
> > > > > Is there any method to be in the UART mode in MSP430F2274 without interrupt? Where can i find this kind of sample code?
> > > > >
> > > > > TKs in advance!
> > > > >
> > > >
> > >
>