Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

You are here: Forum Home → ANT Developer’s Forums → ANTWareII → Thread

   

Simple SensRCore program

Rank

Total Posts: 2

Joined 2013-07-31

PM

I have a real simple AT3 to AT3 project that I want to complete. I want one AT3 to read the results of its digital inputs and transmit them to another AT3 whose digital outputs match the pattern of the sending AT3. In AntwareII I can see the receiving AT3 is seeing the digital pattern but the digital outputs do not change states. Basically I want to duplicate the program that comes with the kit where you press the button on one AT3 and the light turns on on the receiving AT3. Is the "demo" program burned into the AT3 modules available somewhere to see how the receiving AT3 enables the outputs? I need to have the receiving digital outputs match the sending outputs, not shifted as in the demo.      
RankRankRankRank

Total Posts: 156

Joined 2013-01-07

PM

Hi Steve,

You need to use the Set ANT Channel Input Mask configuration command (0x90) to enable the I/O pins as outputs on the receiver module. (Refer to Section 4.1.1 of the ANT SensRcore Messaging and Usage document).

Try adding this command to your script:

[90] - Set ANT Channel Input Mask configuration command
[00] - ANT Channel Number 0
[01] - Digital Input
[0F] - IO pin mask of enabled outputs (pins 0-3)
[00] - No crossover mode required
[00] - Default state of output pins are low.

You can also achieve this command in SensRcore using the set mask section.

Input Mask = Digital
Pin Mask = 15
Crossover = 0
Initial State = 0
Click Set Mask.

Crossover Mode is the "shift" observed in the button to lights demo. When crossover is enabled, incoming digital data messages have their nibbles reversed, so the data in the top nibble is applied to the pins represented in the bottom nibble and vice versa. This allows the buttons on the transmitting IO board to connect to the LEDs on the receiving IO board.