This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

interfacing microcontroller 8051 with a pc

dear sir,
My project is to interface a 8051 with a pc..
i have to send datas through pc and this will rotate a motor. the results from microcntroller are displayed in the pc.. but in the pc the data s are getting lost and they are not displayed. please help me

Parents
  • You have given too little information to allow anyone to help with your school project.

    When something doesn't work, you must debug your program(s). How do you know your data is lost in the PC? How do you know the microntroller sends any data? How do you know the microcontrollers sends the data in a format the PC can receive? How do you know the PC and microcontroller are corerctly connected?

Reply
  • You have given too little information to allow anyone to help with your school project.

    When something doesn't work, you must debug your program(s). How do you know your data is lost in the PC? How do you know the microntroller sends any data? How do you know the microcontrollers sends the data in a format the PC can receive? How do you know the PC and microcontroller are corerctly connected?

Children
  • It doesn't matter what steps the hyperterminal takes to display received characters.

    Why?

    If you use the Hyperterminal, then you don't need to know.

    If you use your own PC program instead of the Hyperterminal, then it doesn't matter what steps the Hyperterminal does. What matters is what steps your own program should take. But you don't hve to care about more steps than: Receive + Display. How to receive serial data on the PC is well documented. How to display depends on what output device you have, and what language and framework you have selected. But it doesn't matter if the data comes from the serial port or not. You display received characters in the same way you would display any other text created during run-time.

    But you have still ignored my questions. What makes you think that the 8051 sends characters to the PC, and that the data is lost in the PC? Ignoring problems is not a good strategy for getting them solved!

  • See: www.8052.com/.../120313

    Note that http://www.8052.com/faqs also contains a whole section on serial comms...

    A basic test for an RS232 port: www.8052.com/.../165776

  • Sir,
    my copartner has done the half part of the project.. that is to send the characters from 8051 to pc. she said that the datas r not properly displaying, and on the next startup the datas r getting lost. so i asked that question why it is happening ?

    i want to know about the architecture of the pc.. what it does for the dats for displaying. what protocols are used for the comport. what are the steps? that is my project the second half.
    so i asked you.. please reply and tell me all thethings.

  • We can't tell you why characters are not displayed.

    Why?

    We do not have any source code to look at.
    We do not have any oscilloscope images to tell that there are data sent to the PC.
    We do not know if the PC is configured to use the same baudrate etc as the 8051 is intended to send with.
    ...

    You - or your copartner - must figure out this. But assume that the Hyperterterminal program works. Then you have to figure out if the 8051 is actually sending something. And if the connection between 8051 and PC is electrically correct (signals to the correct pins and with the correct levels). And that both sides have the same baudrate and number of data bits etc.

    It isn't the architecture of the PC that makes characters to display. It is the programs that runs on the PC.

    The serial port does not have any protocols. It is just raw characters being sent and received. It is up to the applications you run on the PC to treat these characters as part of a protocol.

    Are you saying that your teacher hasn't teached you the basics required to do your part of the project? In that case, you should talk with your teacher.

  • In that case, you are on the wrong site!

    There is a vast array of books and websites that detail the architecture of the PC - this is not one of them!

    But remember that this has absolutely nothing whatsoever to do with your 8051 project!

    The PC neither knows nor cares what is connected to its COM port - all it knows is that characters arrive at the port, and it sends characters to the port.

    Where those characters come from & go to, and what they mean, is entirely irrelevant to the PC - it makes absolutely no difference whatsoever to the PC whether the COM port is connect to another PC, or a terminal, or a modem, or an 8051, or anything else!

  • "my copartner has done the half part of the project.. that is to send the characters from 8051 to PC"

    Again, The 8051 neither knows nor cares what is connected to its serial port - all it knows is that characters arrive at the port, and it sends characters to the port.

    Where those characters come from & go to, and what they mean, is entirely irrelevant to the 8051 - it makes absolutely no difference whatsoever to the 8051 whether the serial port is connect to another 8051, or a terminal, or a modem, or a PC, or anything else!

    So, the first question is: How did your partner test her part of the project?

    How does she know that it is transmitting correctly?

    Obviously, if her part of the project is not transmitting properly, then the PC part cannot possibly receive what was expected!

  • I have found some relvent information on following web pages, some of the post have code also, may be helpfull in the matter of interface of microcontroller with PC, you can look,
    microcontroller51.blogspot.com/.../parallel-port-of-pc.html
    and
    picinf.blogspot.com/.../pc-based-temperature-data-logging.html