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.
As far as the VB side, I user Visual Studio's VBTERM. The complete project is available and ready to do any thing you need.
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. AND 4. a 232 interface chip such as the MAX232 to interface with the PC Erik
"AND 4. a 232 interface chip such as the MAX232 to interface with the PC" Strictly, that is irrelevant to the 8051 UART - the UART just transmits a bitstream out of its Tx pin, and receives a bitstream on its Rx pin. Whether those bitstreams are on a direct connection to another chip, via an RS232 transceiver, via an RF link or whatever is entirely irrelevant to the operation of the UART. Of course, if you were foolish enough to connect RS232 signal levels (+/-12V) direct to an 8051 pin, you'd probably damage it...!