AVR to AVR (arduino) communication

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
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

Post by outlawstc »

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!
"If your having code problems I feel bad for you son... I got 99 problems but a glitch ain't one"

User avatar
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

Post by Jordy101091 »

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
the will to learn, should not be stopped by any price

User avatar
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

Post by outlawstc »

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"

MJU
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

Post by MJU »

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?

User avatar
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

Post by Jordy101091 »

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

User avatar
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

Post by outlawstc »

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...
"If your having code problems I feel bad for you son... I got 99 problems but a glitch ain't one"

User avatar
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

Post by Benj »

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.

Post Reply