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

help in project,regarding interfacing of one computer, to several microcontrollers

Status
Not open for further replies.

shankbond

New Member
hi,
I need some help; I am telling you the scene:

1) presently there are 8 microcontrollers;such that they get there inputs from a sensor, these inputs after manipulation shown in decimal numbers on seven segment display,also they are sent to a personal computer; the personal computer can also send data to those microcontrollers(but can be once in a day)

2)I want the microcontrollers to be connected to a parallel port(suggest if other option available);also the paralle port also has to simultaneously output(to a seven segment display again, but this one is different) as well as (read)input from these microcontrollers.

3)these inputs will be saved in the personal computer in SQL Server,(suggest if other option is available).

4)the microcontrollers will be at different distances far(for example one can be 1 meter other can be a few inches the third one can be 10 meters far),will there be any delays?

5)in future, there can be more microcontrollers.

6)tell me some device which can amplify the microcontroller signals and microprocessor(level convertor ? )
the project will be deployed in an environment comprising of heavy machinery, so i am worried about electro magnetic radiations affecting the data.


friends any help regarding this project will be appreciated.
 

Attachments

Diver300

Well-Known Member
Most Helpful Member
Use RS485

The PC is likely to have an RS232 serial port and you can buy a RS232-RS485 converter.

If you use microcontrollers with USARTs, and connect an RS485 driver to the USART.

You can then connect all the RS485 connection together. There will be no problem with delays if you keep the baud rate down to 100 kHz or less.

The easiest system is where the PC is a "master" and initiates all communications. Each microcontroller has an address so it only replies when it has been addressed.
 

shankbond

New Member
can you please explain about rs-485 and rs-232, and the advantage of using rs-485,i m a newbie regarding this stuff?
 

Diver300

Well-Known Member
Most Helpful Member
RS232 has only got two states, 1 and 0, so it isn't possible to connect two transmit lines together as when one transmits a 0 and the other transmits a 1 there will be a clash.

RS485 has three states, 1, 0 and idle. So it is possible to connect a large number of transmit lines together. The software has to make sure that each transmitter is idle when it isn't sending information.

EIA-485 - Wikipedia, the free encyclopedia
 

Mikebits

Well-Known Member
Or you can simply 'daisy chain' the modules together using RS232, Don McKenzie designed just such a system a VERY long time ago.
Which sounds like a pain and is clunky. RS-485 is far simpler and easier to implement. Divers explanation left me perplexed, but I think I see what he means.

RS-485 is more of a hardware interface. What should be mentioned is protocol. Something like Modbus, in which several devices can be attached to same TX/RX line and only grab the line when addressed. So many devices share line yet, only one takes the line others are tri-stated.
 
Last edited:

shankbond

New Member
Which sounds like a pain and is clunky. RS-485 is far simpler and easier to implement. Divers explanation left me perplexed, but I think I see what he means.

RS-485 is more of a hardware interface. What should be mentioned is protocol. Something like Modbus, in which several devices can be attached to same TX/RX line and only grab the line when addressed. So many devices share line yet, only one takes the line others are tri-stated.
I dont want all the devices(uC) to be connected to same Tx /Rx, because there can be a scenario in which multiple devices can transmit simultaneously
 
Last edited:

shankbond

New Member
guys what do you think if I use RS-485,and probe all the UC after each second and the UC will be bound to store all the values till then(the system wont be real time then)(now I got your point! of RS -485)
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top