Most of my projects will involve arduino type microcontrollers starting off since they are readily available complete turn key type boards..
To start off I would like to know The best method as well as possible other methods for hardwired communication between 2 or more micro controllers.
The boards which peak my interest are the arduino nanos which are compact implantable boards for any design. It having the microcontroller essentials built in...
It also has a FTDI USB-to-TTL Serial chip which I would prefer to be my method of communication between Arduinos probably for most cases since the other communications such as spi, i2c, one wire all tend to be more commonly used for Peripherals
Thanks!
AVR to AVR (arduino) communication
Moderator: Benj
- outlawstc
- Posts: 32
- Joined: Tue Oct 15, 2013 6:14 pm
- Has thanked: 12 times
- Been thanked: 9 times
- Contact:
AVR to AVR (arduino) communication
"If your having code problems I feel bad for you son... I got 99 problems but a glitch ain't one"
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: AVR to AVR (arduino) communication
What I would use is RS232 or can bus.
I don't know what type of environment you want to use your arduino application.
I have done some work with CAN BUS that worked pretty well but you do need to know how the protocol works before you can use it. at least that was my experience with it.
Maybe you could tell me what you want to do with you arduino.
Regards Jordy
I don't know what type of environment you want to use your arduino application.
I have done some work with CAN BUS that worked pretty well but you do need to know how the protocol works before you can use it. at least that was my experience with it.
Maybe you could tell me what you want to do with you arduino.
Regards Jordy
the will to learn, should not be stopped by any price
- outlawstc
- Posts: 32
- Joined: Tue Oct 15, 2013 6:14 pm
- Has thanked: 12 times
- Been thanked: 9 times
- Contact:
Re: AVR to AVR (arduino) communication
I don't believe the Atmega328 has a CAN BUS protocol .
"If your having code problems I feel bad for you son... I got 99 problems but a glitch ain't one"
-
- Posts: 502
- Joined: Wed Nov 07, 2007 6:51 pm
- Location: Antwerp Belgium
- Has thanked: 121 times
- Been thanked: 108 times
- Contact:
Re: AVR to AVR (arduino) communication
My question too..
I have got the CAN-eblocks and I used them for PIC to PIC communication over several meters distance.
But I was wondering of I could connect two microcontrollers (next to each other) without the extra chips?
Now the MCP2515 and MCP2551 translate the signals for the controllers, what would happen if I would use a controller with build-in CAN and connect them without other chips?
Would they communicate?
I have got the CAN-eblocks and I used them for PIC to PIC communication over several meters distance.
But I was wondering of I could connect two microcontrollers (next to each other) without the extra chips?
Now the MCP2515 and MCP2551 translate the signals for the controllers, what would happen if I would use a controller with build-in CAN and connect them without other chips?
Would they communicate?
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: AVR to AVR (arduino) communication
Yes I think that would be possible, however can bus is not meant to be used as a communication bus over such a short distance, I'm not saying it won't work because it will just fine. But if you're looking for a comms bus that does not leave the pcb the. I would choose serial like rs232.
the will to learn, should not be stopped by any price
- outlawstc
- Posts: 32
- Joined: Tue Oct 15, 2013 6:14 pm
- Has thanked: 12 times
- Been thanked: 9 times
- Contact:
Re: AVR to AVR (arduino) communication
Jordy,
So this RS232 component I read through Ben's book about it...
Does it require a external peripheral device like the max3323 for it to function or will it work with pin to pin connection from RX to Tx and Tx to Rx between micro controllers?
These 2 or more micro controllers may not be on the same pcb.. they might be around 5 feet or less away from each other
I would like to avoid any extra external peripherals if possible...
So this RS232 component I read through Ben's book about it...
Does it require a external peripheral device like the max3323 for it to function or will it work with pin to pin connection from RX to Tx and Tx to Rx between micro controllers?
These 2 or more micro controllers may not be on the same pcb.. they might be around 5 feet or less away from each other
I would like to avoid any extra external peripherals if possible...
"If your having code problems I feel bad for you son... I got 99 problems but a glitch ain't one"
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: AVR to AVR (arduino) communication
Hello,
RS232 without the driver is basically an asynchronous serial bus.
For simple chip to chip comms on the same board you shouldn't need the driver IC.
If your going off board then having the driver chips might be a good idea depending on the length of your cables.
I have managed to get this working without driver ICs and with fairly lengthy cables (1-2 meters) but the baud will have to be fairly low (2400/4800) to try and help fight the transmission line issues that start to creep in.
I would give it a go first just to sanity check it will work and be reliable without the driver. Using shielded twisted pair cable could also go a long way to allowing this to work well.
RS232 without the driver is basically an asynchronous serial bus.
For simple chip to chip comms on the same board you shouldn't need the driver IC.
If your going off board then having the driver chips might be a good idea depending on the length of your cables.
I have managed to get this working without driver ICs and with fairly lengthy cables (1-2 meters) but the baud will have to be fairly low (2400/4800) to try and help fight the transmission line issues that start to creep in.
I would give it a go first just to sanity check it will work and be reliable without the driver. Using shielded twisted pair cable could also go a long way to allowing this to work well.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel