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.

how to connect two controllers to PC COM port?

Status
Not open for further replies.

rizi_85

Newbie level 4
Joined
Sep 12, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
connect 2 controllers to pc

Hi,

I want to connect two or more microcontrollers(8051) to PC's serial (COM) port. can any one tell me how to do this? what hardware will i need to achieve this.

thanks!

Rizwan Ul Ahmad Khan
 

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,853
rs422 sn75179

Asingle max232 is enough to do this

check out its datasheet, you will have two inputs and ouputs.

beware of the communication

Regards

Nandhu
 

xxtigerxx

Advanced Member level 1
Joined
Jun 5, 2001
Messages
444
Helped
38
Reputation
76
Reaction score
32
Trophy points
1,308
Location
Greece
Activity points
2,901
sn75179 rs485 rs232 full duplex

you must use a uart of the 8051 and a max232..

:p
 

H_D_R

Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
sn75176 max232

rizi_85 said:
Hi,

I want to connect two or more microcontrollers(8051) to PC's serial (COM) port. can any one tell me how to do this? what hardware will i need to achieve this.

thanks!

Rizwan Ul Ahmad Khan

ya...

you can do with MAX 232 only but you need to do more coding for serial communication..
 

lopex

Junior Member level 1
Joined
Jan 16, 2008
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,399
ds75176 converter rs232

hi,
But you want to connect everything to a port or want to connect the separate ports?
if you want to connect everything to a port, It is more complicated!
but you can use a multiplexer! or use a dspic, or a anothe pic with 2 ports (slave and master), for exemple 18f4580, and create a loop.

by
lopex
 

rizi_85

Newbie level 4
Joined
Sep 12, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
sn75179 rs485 converter

first of all i m thankful to all of you who replied.

i am using max232. and its working fine for a single controller. I have identified the problem and now need your suggestions to fix it. The problem is the COM port of PC cannot provide enough current to drive two max232s (i.e. if i connect two controllers each using seperate max232) so it does not work.

max232 either cannot drive two controllers from the same driver. max232 has two drivers but as i want to drive two microcontrollers from one COM port of PC i have to either connect both microcontrollers to one driver on TTL side of max232 or i have to connect one COM port to both drivers of max232 on EIA232 side. In first case one driver of max232 cannot provide enough cuurent to drive serial ports of two 8051s. In the second case PC's COM port cannot drive two drivers of max232.

I have found a work arround for the problem but i think it will not work when i will connect three or more controllers so i need a buffer or driver which can provide enough current. someone told me about SN75176 but i have never used it so if someone can help me it will be realy great

thanx!
 

H_D_R

Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
sn75179 with pic

yes..

it happens because the current coming out from your PC will split for number of MCU/ RS232 devices.

there are two options accoding to my knowledge.

1. you can try with the help of buffer IC having high current o/p. it should work otherwise

2. you must have to use transistor current amplifier. for this you have do some calculations and find out the required current and based on that you have to design amplifier.

I have not tried but just guessing experience in normal cases
that this could be help .
please confirm it first then only try because it may damage your circuit also.
 

blueroomelectronics

Advanced Member level 5
Joined
Sep 17, 2006
Messages
1,686
Helped
179
Reputation
356
Reaction score
77
Trophy points
1,328
Location
Toronto, Canada
Activity points
8,696
sn75179 nodes

Much easier to build an RS422 adapter. RS485 is an excellent and popular mulitdrop serial standard, massive range and up to 32 half duplex nodes with a standard SN75176. But if you only need less than 10 nodes an RS232 to RS422 can be built using a MAX232 and a SN75179. RS422 is full duplex.
 

H_D_R

Full Member level 6
Joined
Jan 31, 2008
Messages
329
Helped
26
Reputation
52
Reaction score
9
Trophy points
18
Location
India
Activity points
0
circuit sn75179, rs232, rs422 converter

blueroomelectronics said:
Much easier to build an RS422 adapter. RS485 is an excellent and popular mulitdrop serial standard, massive range and up to 32 half duplex nodes with a standard SN75176. But if you only need less than 10 nodes an RS232 to RS422 can be built using a MAX232 and a SN75179. RS422 is full duplex.

hi blueroomelectronics,

can you please tell me, how it is possible..??

But if you only need less than 10 nodes an RS232 to RS422 can be built using a MAX232 and a SN75179.

can you send me the link from where ican get more details about it..??
 

rizi_85

Newbie level 4
Joined
Sep 12, 2006
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,330
max232 cannot drive

yea i think i need a buffer which can provide higher currents.

i will look into it.

now i have one more question. how can i tranmit serial data through wireless channel? what is the easiest way to do it? I know some transmitter and receiver modules but they are not available in my area so if any one can please help me in this regard, i will be highly thankful

thanks!
 

mohannad100

Member level 3
Joined
Jan 16, 2008
Messages
63
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Location
iraq
Activity points
1,700
how to connect two max232

use master slave cofiguration
 

faiflay

Member level 1
Joined
Oct 29, 2006
Messages
41
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Activity points
1,492
pic sn75179

there are three ways:
1- use CTS as enable pin when high the 1st microcontroller activate communication
when low the 2nd activate communication
2- addressing ; bulding your owen frame as the first byte send from pc is address of microcontroller. the microcontrollers(1,2) recive it and compare with his owen address if match the microcontroller activate communication
3- switch : use analog switch as shown in attachment
 

amol_shah

Full Member level 3
Joined
Apr 21, 2008
Messages
153
Helped
31
Reputation
62
Reaction score
15
Trophy points
1,298
Location
Nasik
Activity points
2,034
com port is232

for connecting more than one controller to PC on the same com port you will need to use RS 485 protocol, RS 232 protocol is a point to point protocol i.e. duplex communication can be done between two units only, when you use rs 485 protocol you can attach more that 2 controllers on the same line's, for RS 485 protocol you will have to us DS75176 ic. But since the output of the PC's com port is 232 you will require a 232-485 converter near the PC & DS75176 IC for every controller.
https://www.dnatechindia.com/index.php/Tutorials/8051-Tutorial/Serial-Communication-Basic.html
 

sainathsamba

Newbie level 6
Joined
May 29, 2010
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
AP,INDIA
Activity points
1,342
Re: com port is232

@amol_shah


Hai amol, i have one dought if we want to connect 2 MC's to PC using one com port we can use rs 485. but if we want to use 10 to 20 MC's to interact with one PC through Single com port and each MC has to do separate tasks. then what i have to do can u plzzzzzz tell me about this as quick as possible...... quote][/quote]
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top