Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Two MicroControllers

Status
Not open for further replies.

Eng.Remon

New Member
Hi, I need to make 2 microcontrollers talk to each others, which means that M1 will send a byte for M2 so that M2 will make action. When Action done M2 send to M1 and so on, Any ideas!!!!

I ll be so grateful
THnks
 
Please do not make duplicate posts or threads, they do not increase your chance of a helpful response but only reduce it, as people get confused and can't always see what others have suggested in the other thread(s).

If you have made this post or thread in error then please do not be offended. We get lots of people making duplicate threads under the misapprehension that it will increase their chance of a helpful response when in practice the reverse is true.
 
So you want to use one MICRO as a switch for the other?

Is that what your asking?

You could have the micro which is going to be doing the action constantly waiting for the other micro to send a LOW bit.. when this happens the action micro will go and do the action..

Please explain more..

Im sure others will help you soon.
 
Have you picked the uC or uP (microcontroler or microprocessor to help the search engine here)

Why not use serial? And send a command to M2 and wait for a response to come back with a status.

So give a hint. What are you wanting to do and why do you need to micros?
 
Do you mean a logical state? If M1 make an output pin HIGH the M2 detects that and make active(will do some other work).
or
Did you ask from google about I2C? Also Nigels tutorials you can find some good Examples.
 
How many possible commands/responses you want to support ?
If just a few you can connect some pins directly and send/receive data in parallel.

For larger number of commands, you got to send/receive data in serial.
For that you can use either I2C or RS232 ....
 
You could use a bi-directional FIFO. This would be blisteringly fast.
 
ok i need to make a protocol between them but i dont wana make it depend on the time between each :S coz every one make a lot of things already meaning that m1 is connected to a keybad and lcd, and m2 is connected to some sensors which getting reading from them and send a byte contains action code that sends to m1 to tell i , so m1 gonna send another byte to a nother uc to let it make a phone call through a DTMF IC ,
Any IDEas.,
Sorry about FIFO i dont understand can u declare it more plz
 
btw for the dupilcation i didnt mean it i was just editing the post as i want to put the mc type which is atmel 80c51 :S
Sorry if that make a mess
 
A FIFO is a memory decive that stores bytes of data. They come in several depths, and the access method is that the first byte which goes in the device is the first byte that comes out. They are often used in systems that run at different speeds and need to exchange data asyncronously. FIFO is an acronym that stands for First In First Out
 
oh ok but can u give an ic no#? but could be interfaced easily with the uc, coz usually i search for something and lastly i find it is in somehow wont work :(
thnx
 
Eng.Remon said:
oh ok but can u give an ic no#? but could be interfaced easily with the uc, coz usually i search for something and lastly i find it is in somehow wont work :(
thnx

I don't see any reason for an FIFO?, all you need is to connect a single pin (plus ground of course) from one uC to the other - transfer the data as standard RS232 type serial. If you want bi-directional use two pins, although it can be done with one if required.
 
I have no idea what you're suggesting with a FIFO. It has nothing to do with his problem that I can see.

Serial comm works great (many PICs have a hardware serial module built in). I2C and SPI are other ways to interconnect 2 controllers or interface a controller with a peripheral designed to use that sort of communication. Serial will even allow you to connect to a PC. We do this all the time.

For communication between 2 controllers, usually serial. You don't need to use an RS232 transceiver in most cases, just connect the TX of one controller to the RX of the other (one wire) and configure the hardware serial module.
 
Oznog said:
I have no idea what you're suggesting with a FIFO. It has nothing to do with his problem that I can see.

Serial comm works great (many PICs have a hardware serial module built in). I2C and SPI are other ways to interconnect 2 controllers or interface a controller with a peripheral designed to use that sort of communication. Serial will even allow you to connect to a PC. We do this all the time.

For communication between 2 controllers, usually serial. You don't need to use an RS232 transceiver in most cases, just connect the TX of one controller to the RX of the other (one wire) and configure the hardware serial module.
The external FIFO memory does two things. It is blisteringly fast in a way that serial methods cannot be, and it takes very nearly zero processor resources on either side. I agree that it's not required for most applications, but if you require raw speed it's tough to beat.
 
the idea is that they are asynchronous so all what i m afraid from is that one gets out data and for his fast he retype another data on it , so i need something like abuffer to hold the data untill reading it from the other uc. So any suggestion other than FIFO
plus there is about 9 possible actions or more i didnt count exactly in fact
 
Last edited:
yea exactly, but for my side there is uc with the main uc but also there is a side of the DTMF uc , so to calculating times with interrupts and such things would be hard in fact. so i guess Something in between that holds data untill reading it would be better ,isnt it?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top