Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Implementing a shared channel on an embedded system

Rank

Total Posts: 1

Joined 2011-02-22

PM

Hello,

I am trying to implement a shared channel as described in Section 8.2 of "ANT Message Protocol and Usage" on the relay device described in Reference Design Demo 2. In other words, to create a hub device using a shared channel on the receiving side of the relay.

I am using the code for Demo 2 as a guide; and I am aware that I will need to adjust the RF Frequency, Device Number, Device Type, Transmission Type, Message Period as required, and to change the type of channel 1 to CHANNEL_TYPE_SHARED_MASTER.

I am wondering if this is sufficient to redefine the channel, and also where and how in the code to implement the loop shown in Fig. 8-5 of "ANT Message Protocol and Usage" where the channel master broadcasts sequentially to each slave.

Thanks for any help.

JM      
Avatar
RankRankRankRank

Total Posts: 213

Joined 2011-05-02

PM

Hello,

Please take a look at the Auto-shared channel application note, available here:

http://www.thisisant.com/pages/developer-zone/ant-application-notes

There is some accompanying source code on the implementation of an auto shared channel master. An Auto shared channel differs from a shared channel in that a master doesn't know how many slaves are present when it opens the channel, and must dynamically add slaves to the channel, whereas in a simple shared channel, the master knows how many slaves it will be communicating to. Although these two scenarios differ slightly, the source code should provide you a reference to get started with, as the channel assignment of an auto-shared and shared master are the same. It will also provide you an example of how to poll the slaves sequentially.

I hope that this helps you,

Best Regards,

Kassandra