now I will do it with a new program if I can use the code you gave me for RS485

thanks

didier

Wed Dec 05, 2012 4:46 pm

mattallen37

Expert

Joined: Thu Sep 29, 2011 11:09 pmPosts: 184Location: Michigan USA

Re: AMX 13 bridge layer

Perfect!

That confirms that you now have a good connection for the master to send data to the slave. In this test, it's transferring 16 bytes, but it should support up to 64.

The data that is being transferred is as RAW as it gets, so you will now need to add any error detection you want, as well as data formatting.

If the master just needs to send motor speed values to the slave, put the motor speed values into the outgoing buffer of the master. On the slave, extract those values from the incoming buffer, and set the motor speeds accordingly.

The reason why they were offset the other day, and it didn't appear to work quite perfectly, is that the master program was started first (or at least it started sending before the slave started listening).

To speed things up, I changed the baud rate from 9600 to 921600, which is 96 times as fast. I also changed the delays, so that the master should now update the slave much more often so that it feels real-time to the user. The update rate should now be roughly 150 times per second.

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum