link 2 2560's since I ran out of pins?
Moderators: adafruit_support_bill, adafruit

link 2 2560's since I ran out of pins?

by petespaco on Sun Jun 09, 2013 10:31 pm

I have built this really neat datalogger
http://www.youtube.com/watch?v=RwoIPodGIQI

on an ATMEGA2560 over the last year and I use it a lot. I have expanded it a few times and now I am running out of pins, or will pretty soon.
I need to add 4 more thermocouple amplifiers, (2 Max6675's that I already have, and two Max31855's) read an O2 sensor and then add some servo drivers.
My question:
Can I add all that additional stuff on another 2560 and then link that one to my current "main" 2560? I'd write appropriate code for both microprocessors, but, using one as a master, it would ask the other one for data from time to time. Is this a practical approach?

Pete Stanaitis
-----------------
petespaco
 
Posts: 37
Joined: Thu Apr 19, 2012 6:53 pm
Location: west central wisconsin

Re: link 2 2560's since I ran out of pins?

by adafruit_support_bill on Mon Jun 10, 2013 5:10 am

You could link two as master & slave with a bit of software. But there are simpler ways to expand pins:

The Max31855s can share DO and CLK. They just need separate CS pins.
Additional GPIO pins can be added with a port expander like the MCP23017: http://www.adafruit.com/products/732
You can control hundreds of servos with just 2 pins using some of these: http://www.adafruit.com/products/815
User avatar
adafruit_support_bill
 
Posts: 29144
Joined: Sat Feb 07, 2009 9:11 am

Re: link 2 2560's since I ran out of pins?

by petespaco on Mon Jun 10, 2013 10:54 pm

Thank you.
You have given me several useful options.
I always wondered about sharing DO and CLK, but, since I had plenty of pins (until now), I just didn't deal with it.

Pete Stanaitis
-----------------
petespaco
 
Posts: 37
Joined: Thu Apr 19, 2012 6:53 pm
Location: west central wisconsin