Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

AP2 works in asynchronous mode with MSP430

Rank

Total Posts: 16

Joined 0

PM

AP2 works in asynchronous mode with MSP430,Why the RTS is always High, should the AP2 be reset at the first time to start work? or other reasons? thank you!!
the picture is the data-sending code in asynchronous mode,is it right? thank you!!      

Signature

Student

Rank

Total Posts: 16

Joined 0

PM

[img size=595]http://www.thisisant.com/images/fbfiles/images/QQ______20121110203227.png[/img] [img size=595]http://www.thisisant.com/images/fbfiles/images/QQ______20121110203227.png[/img] [file name=C_code.txt size=538]http://www.thisisant.com/images/fbfiles/files/C_code.txt[/file] why the RTS is always high, shoud the AP2 be reset at the first time to work, in this way to make the RTS be low? or other reasons?
thank you!
attach with the communication code in asynchronous mode below! is it right?      

Signature

Student

Rank

Total Posts: 16

Joined 0

PM

why the RTS is always high, shoud the AP2 be reset at the first time to work, in this way to make the RTS be low? or other reasons?
thank you!
attach with the communication code in asynchronous mode below! is it right? [file name=C_code-d1193329d7de18c89ac9d9c00f24eb4f.txt size=538]http://www.thisisant.com/images/fbfiles/files/C_code-d1193329d7de18c89ac9d9c00f24eb4f.txt[/file]      

Signature

Student

Rank

Total Posts: 16

Joined 0

PM

why the RTS pin is always high,should it be reset at the first time to start to work, or other reasons,attach the communication code in AsyncSerial mode as below
BOOL ByteAsyncSerial_Transaction(UCHAR *pucTxMsgBuffer)
{
UCHAR ucMesgLen;
if(pucTxMsgBuffer!=0)//the data buffer is not empty
{
while(RTS&RTSHIGH;);//wait for ant ready?

ucMesgLen=pucTxMsgBuffer[1]+3;//the legth of the data
for(UCHAR i=0;i<ucMesgLen+1;i++)
{
TxdAByte(pucTxMsgBuffer);//sent the data in serial
}
for(UCHAR i=ucMesgLen+1;i<MESG_MAX_SIZE;i++)
pucTxMsgBuffer=0x00;//reset the rest data not used

Delay50us();
}
return 0;
}      

Signature

Student

RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

Have you seen the the RTS becomes low after the power-up reset of the AP2? If it is not, please check how the SLEEP pin is controlled.
If the SLEEP pin is not used, it should be tied to low.      
Rank

Total Posts: 16

Joined 0

PM

kebinw - 13 November 2012 05:39 PM
Have you seen the the RTS becomes low after the power-up reset of the AP2? If it is not, please check how the SLEEP pin is controlled.
If the SLEEP pin is not used, it should be tied to low.


thanks for your reply!
I have already solve this problem.not only reset the AP2 at the first time to use,but also give a delay after the reset,and then set the AP2, it start to work~~      

Signature

Student