Let's Make Robots!

Use multple ATTINY85 as one ATMEGA328P Arduino UNO

Hello there,

I want to use couple of ATTINY85 instead of an entire Arduino UNO

I was wondering if that was possible? I have 5 ATTINY85's and was wondering if I could use them all together?

I need 10 pins,

5 ATTINY in total has 4 pins I can use so in total I have 20 pins to use.

But how can I attach the ATTINY's to work together?

For 10 pins I can use 3 ATTINY's = 12 pins.



I made this to show what I need.

Bigger image here: http://imageshack.us/photo/my-images/528/arduino.jpg/

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

(Very nice idea, Kyle!)

It looks like you're planning on using the Tinies to control an h-bridge and that you have push-buttons set up as an input. Without more information (like the code you're trying to convert to Tiny,) it's impossible to know what's going on here.  One thing I do notice is that each AT Tiny actually has 5 pins:

As you can see, 0 and 1 are your only PWM Pins and 2-4 have ADCs on them.  Using Bird's configuration would work.  

You could also set up a serial line with a Tiny on the H-bridge as a slave (Rx only) and one with four pushbuttons as "master" (Tx only) but that would get a little confusing when it comes to running two separate programs at once.  The resistor ladder solution is much more elegant.  In my experience however, you can't expect too much out of the Tiny's PWM and the timing isn't exactly what you expect if you're using the Arduino as ISP and the Arduino IDE to code.

Thank you both, I will have a look at the suggestions and see what I can do best.

Thank you :)

Mintvelt did something very similar but using Picaxe 08m's. I am sure there is information you can glean from these:


http://letsmakerobots.com/node/3548  <--this is probably the one you want

I missed that CTC thanks for bringing it back and thanks to Mintvelt of coarse.

you could limit the number of pins required to 5. 1 pin each for the ENABLEs on the h-bridge, 1 pin per motor to control forward/reverse, and 1 analog pin with your switches connected to resistors so each switch pulls a different resistance. If you selected your resistors properly, you could even detect multiple switches at once.

To use multiple 8 pin uCs you would require some form of communication between them, which would require at least a pair of pins for bi-directional communication.

To get the 1 pin per motor direction you would need to put an inverter/NOT gate on each single pin that you use to drive the motor direction. That way, when you put a high on motor 1's direction pin, you will get a HIGH and a LOW output that can be fed to each of the h-bridge inputs. With a single pin for the ENABLEs, you will be able to drive them with a single PWM pin each.