Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: tipipliou on March 29, 2010, 04:21:09 PM

Title: using 2 microcontrolers
Post by: tipipliou on March 29, 2010, 04:21:09 PM
hello
for my robot,i want to use more than one microcontroller
my question is : can I (for example) send a '1' directly  from one of them to start the other ?
or must i use the " I2C " thing (which i didn't learn yet)?? i really would avoid it  ;D !!
thanks

PS: sorry if my english is .....
Title: Re: using 2 microcontrolers
Post by: waltr on March 29, 2010, 05:13:54 PM
If both micro's are at the same voltage (say 5V) then you can connect an output from one micro directly to an input of the other micro.

Even if you were to use I2C the two micros would still have pins directly connected to each other. I2C is the specification of a 2-wire serial protocol.
Title: Re: using 2 microcontrolers
Post by: Soeren on March 29, 2010, 06:48:04 PM
Hi,

my question is : can I (for example) send a '1' directly  from one of them to start the other ?
or must i use the " I2C " thing (which i didn't learn yet)?? i really would avoid it  ;D !!
Either you can "Sleep" and wake up one processor on a change of an input (which will come from an output of the other controller of course), or you can let an putput pin from one control either a relay or a transistor powering the other.

Title: Re: using 2 microcontrolers
Post by: Webbot on March 29, 2010, 09:31:38 PM
Or if you want one controller to be in charge, talking to many 'servants', then think about SPI as its very 'quick'.
Title: Re: using 2 microcontrolers
Post by: SmAsH on March 29, 2010, 11:28:11 PM
Would uart not be suitable here? Or do you need that free?
Title: Re: using 2 microcontrolers
Post by: tipipliou on March 30, 2010, 02:37:41 AM
ok,thank you,that takes a great weight of my mind
i'm not gonna use uart ,i don't master it yet ,and my microcontrolers won't actually exchage "data"
thank you for your answers
ciao