|
|
View previous topic :: View next topic |
Author |
Message |
helmi03
Joined: 12 Apr 2011 Posts: 7
|
Help to choose protocol |
Posted: Wed Apr 13, 2011 5:34 pm |
|
|
hi I'm doing communication between 1 master (Pc) and 3 slave (PIC).
The master send data to all pic's and the one with the right address only can read the data and executed.
I'm new and I don't know what to choose. Should I choose CAN, RS485, MODBUS, SPI, I2C ? Please help me. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Wed Apr 13, 2011 5:51 pm |
|
|
Sounds like you're new, so right off a 'normal' PC doesn't have CAN,MODBUS,SPI,I2C or RS485. If, and that's a big IF, it has a real RS232 connector you can do either RS485 with an adapter or I2C(Realterm does it).
However I2C is limited to distance making RS232 or RS485 the better option.CAN and MODBUS are overly complicated protocols for rookies,SPI and I2C are usually for 'onboard' chip to chip use.
RS232 is the easiest to implement and a master- one slave is the place to start.Get that right, then convert the code and required adapters to RS485.
Once your sytem is working right, it's simple to add ONE more slave PIC,add code, get that working.Adding 3 or more slaves will be very easy.Depending on distance,speed and chips used ,you can get 255 slaves 'up and running' within a few hundred feet.
If you look in the examples folder, CCS kindly supplies examples of both, and a good place to start. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|