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

serial communication 8051 from PC

How can I using C Compiler in order to communication between 8051 with PC via serial port using RS232. I want to have an Example for Keil C for 8051 and an example Visual basic for Receive/transmitter on PC.Thank You very much.

Parents
  • Your 8051 neither knows nor cares what is connected at the far end of the RS232 link - it could be a PC, a VT-100 terminal, another 8051, etc, etc, etc, ...
    The only things of concern to the 8051 are:
    1. configuring the UART as required (Baud rate, framing, etc);
    2. sending bytes to the UART for transmission as required;
    3. reading received bytes from the UART as required.

    There is 8051 example code to do all this on this site.

    Similarly, all the PC software needs to do is configure the COM port, read & write characters. For example VB code, you wil need to go to a VB site!

    Hint: Don't try to develop both ends of the link at the same time!
    Start by just using a dumb terminal or terminal emulator to get one end working first!

    Note that you can get the uVision simulator to send its serial simulation output to a COM port - so you don't even need to have your hardware working before you can get the code going!

Reply
  • Your 8051 neither knows nor cares what is connected at the far end of the RS232 link - it could be a PC, a VT-100 terminal, another 8051, etc, etc, etc, ...
    The only things of concern to the 8051 are:
    1. configuring the UART as required (Baud rate, framing, etc);
    2. sending bytes to the UART for transmission as required;
    3. reading received bytes from the UART as required.

    There is 8051 example code to do all this on this site.

    Similarly, all the PC software needs to do is configure the COM port, read & write characters. For example VB code, you wil need to go to a VB site!

    Hint: Don't try to develop both ends of the link at the same time!
    Start by just using a dumb terminal or terminal emulator to get one end working first!

    Note that you can get the uVision simulator to send its serial simulation output to a COM port - so you don't even need to have your hardware working before you can get the code going!

Children
No data