Re: [Tinyos-help] Help IRIS uart0 bard rate

2011-05-26 Thread Li, Haixia
Hello Janos,

 I use  Uart0RxControl.start(). Is it ok? Do I need to use other interface? 
Thanks.

Haixia Li

From: sallai.ja...@gmail.com [sallai.ja...@gmail.com] on behalf of Janos Sallai 
[sal...@isis.vanderbilt.edu]
Sent: Sunday, May 22, 2011 5:46 PM
To: Li, Haixia
Subject: RE: [Tinyos-help] Help IRIS uart0 bard rate


Did you start uart0?

Janos
On May 22, 2011 4:27 PM, Li, Haixia 
hai...@ostatemail.okstate.edumailto:hai...@ostatemail.okstate.edu wrote:

 Hello Janos,

   I haved modified the files as you said. But, I still cannot read data 
 from uart0.

  I'm using IRIS. I want to read a sensor through Uart0. Some code I write 
 are :

   components HplAtm128UartC;
   App.Uart0RxControl - HplAtm128UartC.Uart0RxControl;
  App.HplUart0 - HplAtm128UartC.HplUart0;

 In the App file, use intefaces:
  interface StdControl as Uart0RxControl;
 interface HplAtm128Uart as HplUart0;


in the booted function:
  call Uart0RxControl.start();
 call HplUart0.enableRxIntr();

 I thought  async event void HplUart0.rxDone(uint8_t data) will be signaled 
 when the data are avaible. However, the program never runs into the function.

Can you tell me what I can do to deal with this probem?

 Thanks .

 Haixia Li


 
 From: sallai.ja...@gmail.commailto:sallai.ja...@gmail.com 
 [sallai.ja...@gmail.commailto:sallai.ja...@gmail.com] on behalf of Janos 
 Sallai [sal...@isis.vanderbilt.edumailto:sal...@isis.vanderbilt.edu]
 Sent: Thursday, May 19, 2011 9:04 AM
 To: Li, Haixia
 Cc: 
 tinyos-help@millennium.berkeley.edumailto:tinyos-help@millennium.berkeley.edu
 Subject: Re: [Tinyos-help] Help IRIS uart0 bard rate

 Modify (or create a shadow copy) of chips/atm1281/HplAtm128UartC.nc in
 which you change the line

 ubrr0 = call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE);

 to

 ubrr0 = call Atm128Calibrate.baudrateRegister(1200);

 The value returned by Atm128Calibrate.baudrateRegister(1200) should be
 around 383.

 Janos

 On Wed, May 18, 2011 at 5:24 PM, Li, Haixia
 hai...@ostatemail.okstate.edumailto:hai...@ostatemail.okstate.edu wrote:
  Hello everyone,
 
   I'm using IRIS, mib510 with Tinyos2.x. I want to using UART0 to read a
  sensor. I try to use component HplAtm128UartC. How can I change the baud
  rate on UART0?
   If I cannot use the component, do I need to use interface UartStream?
  In this interface, can I change the m_byte_time=3200 to set the baud rate to
  1200?
 
  Any help will be appreciated.
 
  Haixia Li
 
  ___
  Tinyos-help mailing list
  Tinyos-help@millennium.berkeley.edumailto:Tinyos-help@millennium.berkeley.edu
  https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Re: [Tinyos-help] Help IRIS uart0 bard rate

2011-05-23 Thread Li, Haixia
Hello Janos,

   I haved modified the files as you said. But, I still cannot read data 
from uart0. 

  I'm using IRIS. I want to read a sensor through Uart0. Some code I write 
are :

   components HplAtm128UartC;
   App.Uart0RxControl - HplAtm128UartC.Uart0RxControl;
  App.HplUart0 - HplAtm128UartC.HplUart0;

In the App file, use intefaces:
  interface StdControl as Uart0RxControl;
 interface HplAtm128Uart as HplUart0;


in the booted function:
  call Uart0RxControl.start();
 call HplUart0.enableRxIntr();

I thought  async event void HplUart0.rxDone(uint8_t data) will be signaled when 
the data are avaible. However, the program never runs into the function. 

Can you tell me what I can do to deal with this probem?  

 Thanks .

Haixia Li
 


From: sallai.ja...@gmail.com [sallai.ja...@gmail.com] on behalf of Janos Sallai 
[sal...@isis.vanderbilt.edu]
Sent: Thursday, May 19, 2011 9:04 AM
To: Li, Haixia
Cc: tinyos-help@millennium.berkeley.edu
Subject: Re: [Tinyos-help] Help IRIS uart0 bard rate

Modify (or create a shadow copy) of chips/atm1281/HplAtm128UartC.nc in
which you change the line

ubrr0 = call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE);

to

ubrr0 = call Atm128Calibrate.baudrateRegister(1200);

The value returned by Atm128Calibrate.baudrateRegister(1200) should be
around 383.

Janos

On Wed, May 18, 2011 at 5:24 PM, Li, Haixia
hai...@ostatemail.okstate.edu wrote:
 Hello everyone,

  I'm using IRIS, mib510 with Tinyos2.x. I want to using UART0 to read a
 sensor. I try to use component HplAtm128UartC. How can I change the baud
 rate on UART0?
  If I cannot use the component, do I need to use interface UartStream?
 In this interface, can I change the m_byte_time=3200 to set the baud rate to
 1200?

 Any help will be appreciated.

 Haixia Li

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


Re: [Tinyos-help] Help IRIS uart0 bard rate

2011-05-19 Thread Janos Sallai
Modify (or create a shadow copy) of chips/atm1281/HplAtm128UartC.nc in
which you change the line

ubrr0 = call Atm128Calibrate.baudrateRegister(PLATFORM_BAUDRATE);

to

ubrr0 = call Atm128Calibrate.baudrateRegister(1200);

The value returned by Atm128Calibrate.baudrateRegister(1200) should be
around 383.

Janos

On Wed, May 18, 2011 at 5:24 PM, Li, Haixia
hai...@ostatemail.okstate.edu wrote:
 Hello everyone,

  I'm using IRIS, mib510 with Tinyos2.x. I want to using UART0 to read a
 sensor. I try to use component HplAtm128UartC. How can I change the baud
 rate on UART0?
  If I cannot use the component, do I need to use interface UartStream?
 In this interface, can I change the m_byte_time=3200 to set the baud rate to
 1200?

     Any help will be appreciated.

 Haixia Li

 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[Tinyos-help] Help IRIS uart0 bard rate

2011-05-18 Thread Li, Haixia
Hello everyone,

 I'm using IRIS, mib510 with Tinyos2.x. I want to using UART0 to read a 
sensor. I try to use component HplAtm128UartC. How can I change the baud rate 
on UART0?
 If I cannot use the component, do I need to use interface UartStream? In 
this interface, can I change the m_byte_time=3200 to set the baud rate to 1200?

Any help will be appreciated.

Haixia Li
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help