Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Help with MCU communication

Rank

Total Posts: 1

Joined 2012-04-26

PM

Hello,

My name is Jorge Sousa and I'm developing a solution based in ANT + for my master thesis.

I'm using a pic 18f4680 and the ant11ts33m51b connected with the battery board to the pic like it's in AT3 RF Transceiver Module Datasheet.

What i've done is:

The Vcc and Gnd are common in both pic and module;

The SUSPEND signal is a I/O pin controlled by pic and it's always tied to Vcc.

The Sleep signal is a I/O pin controlled by pic and it's always tied to Gnd.

The Reset pin is also a I/O pin controlled by pic, that i assert (tie to low), wait a little bit and then de-assert (tie to high) to make the reset in ant module. I do this before I do anything else.

The RTS it's a I/O pin configured as Input for pic.


Then I use the USART as asynch mode, 8 bit, non-inverted, 1 start and stop bit and lsb send first at 9600 baud rate.

In the dipswitch present in the battery board I've the following configuration:
1- Vcc
2- Gnd
3- Vcc
4- Gnd
5- Vcc

What happens is that when I do the reset in first place the rts line goes up, then i try to send one configuration command and the rts line just stay still, what should i do to make it response?

The vector that i send is, for example: [0xA4,0x03,0x42,0x00,0x10,0x00, checksum ] - the checksum it's calculated by doing the xor of all previous fields.

A copy of my program it's attached in this email for you can see better what i've done.

Please help me.

Best Regards

Jorge Sousa [file name=thesis.txt size=5722]http://www.thisisant.com/images/fbfiles/files/thesis.txt[/file]      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

After the power-up/reset, you should expect the RTS pin goes to low, then you are able to send the command out. It seems you did not put any delay after power-up and have only 20ms delay after reset.

There are a couple of suggestions:
1) After power up/start up, wait for approximately 500 ms before reseting the module.
2) After reset, wait for more than 500 ms then start sending messages to the module
3) After power-up/reset, you should send SystemReset command to the module first.