Go Down

Topic: Is it possible to perform a loopback test with the max485? (Read 2703 times) previous topic - next topic

Sathi

No, what I mean to do is develop the recieving code for all the slaves locally on the breadboard, and once that is complete I will upload that code to all the needed slave atmegas locally off the breadboard with the max232, and then I will put them into their final node circuit. I really just need for slaves to listen to the master say something like "Slave #6, turn on LEDs 4,7,12, and 14. Turn off 6", and perform that action. I believe that should be relatively little code for the slave. Once that is working I doubt I will need to update them much. I imagine most of my time will be spent on the master side programming the light sequencing it will direct the slaves to perform. I hope that makes sense and there is no major flaw in my plan :)

-Sathi

retrolefty


No, what I mean to do is develop the recieving code for all the slaves locally on the breadboard, and once that is complete I will upload that code to all the needed slave atmegas locally off the breadboard with the max232, and then I will put them into their final node circuit. I really just need for slaves to listen to the master say something like "Slave #6, turn on LEDs 4,7,12, and 14. Turn off 6", and perform that action. I believe that should be relatively little code for the slave. Once that is working I doubt I will need to update them much. I imagine most of my time will be spent on the master side programming the light sequencing it will direct the slaves to perform. I hope that makes sense and there is no major flaw in my plan :)

-Sathi


That sounds like a very workable plan. It gets a little more complex in master and slave code if you want the slave to send feedback information to the master as to if it got the message OK or perhaps you want the master to be able to ask a specific slave what outputs do you presently have on? Typically RS-485 links will implement a robust software protocol to use to communicate back and forth with the slaves and it might include error detection check sum or CRC bytes to every 'message'.

Good luck on your project.

Lefty


terryking228

Quote
Typically RS-485 links will implement a robust software protocol to use to communicate back and forth with the slaves and it might include error detection check sum or CRC bytes to every 'message'.


A good example of such a protocol from Nick Gammon: http://www.gammon.com.au/forum/?id=11428
Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Go Up