+ Reply to Thread
Results 1 to 9 of 9

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

  1. #1
    shankbond Okay
    Join Date
    Nov 2007
    Location
    India
    Posts
    49

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

    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.
    Attached Images
    There is only one thing that I have observed about this world!

    It is not the inventer who was important ,but the person who implemented it, became famous.
    There were Greek trebuchets, Chinese gun powder ,but no one knows who were the people who discovered them ?
    but everyone sure knows ,which country invented it.......


  2. #2
    Diver300 Excellent Diver300 Excellent Diver300 Excellent Diver300 Excellent
    Join Date
    Oct 2007
    Location
    England
    Posts
    1,095

    Default

    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.

  3. #3
    shankbond Okay
    Join Date
    Nov 2007
    Location
    India
    Posts
    49

    Default

    can you please explain about rs-485 and rs-232, and the advantage of using rs-485,i m a newbie regarding this stuff?
    There is only one thing that I have observed about this world!

    It is not the inventer who was important ,but the person who implemented it, became famous.
    There were Greek trebuchets, Chinese gun powder ,but no one knows who were the people who discovered them ?
    but everyone sure knows ,which country invented it.......

  4. #4
    Diver300 Excellent Diver300 Excellent Diver300 Excellent Diver300 Excellent
    Join Date
    Oct 2007
    Location
    England
    Posts
    1,095

    Default

    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

  5. #5
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,759

    Default

    Or you can simply 'daisy chain' the modules together using RS232, Don McKenzie designed just such a system a VERY long time ago.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

  6. #6
    Mikebits Excellent Mikebits Excellent Mikebits Excellent Mikebits Excellent Mikebits Excellent Mikebits Excellent Mikebits Excellent
    Join Date
    May 2008
    Location
    San Diego, Ca
    Posts
    3,912
    Blog Entries
    2

    Default

    Quote Originally Posted by Nigel Goodwin View Post
    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 by Mikebits; 16th May 2009 at 09:31 AM.
    Pay it forward.
    www.geoepicenter.com

  7. #7
    shankbond Okay
    Join Date
    Nov 2007
    Location
    India
    Posts
    49

    Default

    Quote Originally Posted by Mikebits View Post
    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 by shankbond; 18th May 2009 at 09:54 AM. Reason: forgot a word!!!
    There is only one thing that I have observed about this world!

    It is not the inventer who was important ,but the person who implemented it, became famous.
    There were Greek trebuchets, Chinese gun powder ,but no one knows who were the people who discovered them ?
    but everyone sure knows ,which country invented it.......

  8. #8
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,696
    Blog Entries
    5

    Default

    RS485 hardware, with collision detection in software.
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  9. #9
    shankbond Okay
    Join Date
    Nov 2007
    Location
    India
    Posts
    49

    Default

    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)
    There is only one thing that I have observed about this world!

    It is not the inventer who was important ,but the person who implemented it, became famous.
    There were Greek trebuchets, Chinese gun powder ,but no one knows who were the people who discovered them ?
    but everyone sure knows ,which country invented it.......

+ Reply to Thread

Similar Threads

  1. interfacing two ATmega16 microcontrollers
    By garodriguez in forum Micro Controllers
    Replies: 4
    Latest: 8th December 2007, 04:37 PM
  2. Smart House - Computer Interfacing
    By ugorji in forum Electronic Projects Design/Ideas/Reviews
    Replies: 1
    Latest: 11th April 2007, 03:39 PM
  3. Interfacing with computer
    By anubhav_1986 in forum Micro Controllers
    Replies: 4
    Latest: 3rd April 2007, 10:20 PM
  4. Computer Interfacing Project(Help!)
    By goblin_techies in forum Electronic Projects Design/Ideas/Reviews
    Replies: 27
    Latest: 8th January 2007, 08:35 AM
  5. Interfacing the PIC to a computer
    By YAN-1 in forum Micro Controllers
    Replies: 34
    Latest: 24th June 2005, 03:48 PM

Tags for this Thread