Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Asynchronous data between host and ANT

Rank

Total Posts: 2

Joined 0

PM

Hi,

I have an ANT USB stick, using ANTware II, and an ANT module (AT3) controlled by a PIC16F887. My aim to is have a bidirectional master channel on the PIC end, and a slave device on the PC end. (Note: Im using async mode with UART)..

I have got communication transmitting from the PIC to the ANT module, and can therefore send messages that I can see in ANTware.
However, I'm now implementing the receiving of messages from ANT->PIC, and can not get my head around what is going on.

At the moment, it seems that the only data I am seeing on the ANT device is the SYNC byte, A4. I then expect to see the message length, id, and then data. However, the ANT chip appears to be constantly sending me the SYNC byte, and no other bytes.

Has this been seen before? I don't have to respond to this SYNC byte do I? I'm hoping that there's a section of the datasheet that I must have missed. All examples seem to be with synchronous communication so I can't refer to them!

Thanks      
Rank

Total Posts: 26

Joined 2012-11-15

PM

The ANT will send response message to the host for each valid message received. The response message starts with SYNC byte, in asynchronous serial communication, the SYNC byte will always be 0xA4. For example if the host send [A4][01][4B][05][EB] (Open channel 5)message to ANT, ANT will response with [A4][03][40][05][4B][00].
If the host cannot get complete response from ANT, it could be couple reasons:
1. The host sent incorrect message, especially the check sum is wrong.
2. The host should monitor the RTS (flow control), and only send commands after a RTS toggle has been observed, otherwise the ANT may receive incomplete message and lead unknown message response.


     
Rank

Total Posts: 2

Joined 0

PM

Many thanks for your reply.

I'm pretty sure the data that the host is sending ANT is correct, because I can send all the messages that I intend to, and can see them coming through on the receiving side.

I can't seem to get any data (apart from the sync byte 0xA4) back from ANT. I don't really know how else I can debug this. Any ideas what could be causing this?

     
Rank

Total Posts: 26

Joined 2012-11-15

PM

You can use oscilloscope or logical analyzer to capture the TXD line of ANT to see what you get.