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.
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.
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.
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
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.
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.
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.
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
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
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
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]