Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Communication between 2 microcontroller

Status
Not open for further replies.

sysysy

Member level 3
Joined
Nov 11, 2010
Messages
56
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Activity points
1,801
Hi,

i have some doubts here want to ask,

May i know there is a need to use rs232 or max232 circuit for communication between 2 microcontroller?

As i know, RS232 logic is just use in PC. So, if both microcontrollers also using TTL logic, why we still need to use max232 for rs232 conversion?

i am little bit confusing about this.

Thanks.

regards,

sysysy
 

it depends on what interface technology you wish to use....

if its serial communication using rs232 cable or zigbee you need max232..
if you want to do it using RF then it is not required
 

Hi,

Thanks for the reply.

Actually i am going to do a project, communication between microcontroller and PC through the RF module.( I attached together with the simple block diagram)



so, since PC only can understand the RS232 logic, so they must do the RS 232 conversion.

But anyway, how about in the MCU1 side... is there also need the max232 for the conversion?

can you give me some idea and explanation if i wanna implement this.

If anything wrong about my block diagram, just rectify me.

Thanks.

Regards,

sysysy
 

you need 1 max232 as the theme of your project is to send data from PC to controller through hyperterminal and transmit the same data through RF...
so controller will give the data to encoder HT12E andfrom there to RF transmitter....

on the receiving end you are getting the data and mostly displaying on LCD.. so no MAX232 is required... if you want to display it in PC then again you would have needed a MAX IC
 

Hi,

i have some doubts here want to ask,

May i know there is a need to use rs232 or max232 circuit for communication between 2 microcontroller?

As i know, RS232 logic is just use in PC. So, if both microcontrollers also using TTL logic, why we still need to use max232 for rs232 conversion?

i am little bit confusing about this.

Thanks.

regards,

sysysy
This is very interesting conversation. But why don’t think directly communicate between two microcontrollers by their own ports.
 

Thanks for the reply again.

May i know why you use encoder? is it optional or better to use?

Another question is, when there is a logic conversion happen, i though the data will be inverse (mean all the '1' become '0' and vice versa)

So, it will already give the wrong data...so, should we invert back the data? i not sure what i have mentioned i true or not.

but hope to get more clearer understanding from you.

thanks.
 

for transmitter encoder are mandatory and for receiver decoders are mandoatory....

without that you cannot encode data for transmission or understand what data you received...

read some basics of encoder and decoder .. if you dont understand then ask me about it
 

For communication between two microcontrollers (without PC) you dont need Max232. You can simply use Tx and Rx pins of the two microcontrollers
 

For communication between two microcontrollers (without PC) you dont need Max232. You can simply use Tx and Rx pins of the two microcontrollers


you should explain what you mean to say.... if tx and rx is required then how come without MAX232.... what method are you talking?

if you dont want tx rx pin then you can use any other port pin... bit banging???? then check it properly
 

you should explain what you mean to say.... if tx and rx is required then how come without MAX232.... what method are you talking?

if you dont want tx rx pin then you can use any other port pin... bit banging???? then check it properly

I mean to say we can connect Tx of one Uc to the Rx pin of the other uC and vice versa. I have done it in case of 89c51 it works fine.
 

Hi,

from the reply of ckshivaram,

if tx and rx is required then how come without MAX232

1 thing that i don't understand.
Since 2 microncontrollers understand TTL logic.
So what is the purpose to use the max 232 in the communication btw 2 MCU?

I think i am not firm with the concept yet although i already read some tutorials from online.
 

the cable which you use is rs 232 which is basically used for serial communication..

this has different voltage levels to represent a data... The UART is designed to accept these ttl voltage and convert it to rs232 protocol standard.. if you use UART in the communication then MAX IC is mandatory... because to connect to devices we are using the serial cable...

if you have other sources to send data between 2 controllers, by not using UART then you dont need MAX IC....

there are other communication standards that do not use UART to transfer data between devices also....
 

Suppose there are two uC A and B. If i want uC A and uC B to communicate with each other then i dont need serial cable. It indicates that i dont need max 232.
 

Thanks for a quick reply.

OK.

From what i trying to understand is,

in TTL logic,

Code:
 logic '1' - 5V
 logic '0' - 0V

in RS232 logic,
Code:
 logic '1' - -12V
 logic '0' - +12V

So, if we wanna use the USART channel for the transmission,
1) In MCU1 ,logic TTL logic will convert to RS232 logic for a serial transmission through the max232.
2) when the data reach receiver side, logic RS232 will convert back to TTL logic through the max232 and hence into USART channel of the MCU.

in the conclusion, max232 will be use in both MCU?

Am i right?

Thanks.

Regards,

sysysy
 

Dear sysysy
If you want your MCU to communicate with PC then you need max 232 between them. But if you want only MCUs to communicate with each other(and not with PC) then you dont require max 232
 

Dear sysysy
If you want your MCU to communicate with PC then you need max 232 between them. But if you want only MCUs to communicate with each other(and not with PC) then you dont require max 232

not only pc, it can be any devices which have / requires UART needs MAX 232...
 

ok....that mean now direct communication btw 2 MCU then juz simply connect the RF module then write the coding for it.

that all?...*notes ->(i use the USART channel of the PIC for the RF Transmision and my MCU is operating with TTL Logic)
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top