Devices which use serial cables for their communication are split into two categories. These are
DCE (Data Communications Equipment) and DTE (Data Terminal Equipment.) Data Communications
Equipment are devices such as your modem, TA adapter, plotter etc while Data Terminal Equipment is
your Computer or Terminal.
The electrical specifications of the serial port is contained in the EIA (Electronics Industry
Association) RS232C standard. It states many parameters such as -
1. A "Space" (logic 0) will be between +3 and +25 Volts.
2. A "Mark" (Logic 1) will be between -3 and -25 Volts.
3. The region between +3 and -3 volts is undefined.
4. An open circuit voltage should never exceed 25 volts. (In Reference to
GND)
5. A short circuit current should not exceed 500mA. The driver should be
able to handle this without damage. (Take note of this one!)
Serial Ports come in two "sizes", There are the D-Type 25 pin connector and the D-Type 9 pin connector both of which are male on the back of the PC, thus you will require a female connector on
your device.
In 8051 the serial communication is based on RS - 232. It includes following:
1. The protocol to be used for data transmission.
2. The voltages to be used on the signal lines.
3. The connectors to be used to link equipment together.
Overall, the standard is comprehensive and widely used, at data transfer rates of
up to around 115 or 330 kbits / second (115 / 330 k baud). Data transfer can be
over distances of 15 metres or more.
Note that RS-232 is a peer-to-peer communication standard. Unlike – for example
– the RS-485 standard, RS-232 is intended to link only two devices together.
RS-232 is a byte-oriented protocol. That is, it is intended to be used to send single
8-bit blocks of data. To transmit a byte of data over an RS-232 link, we generally
encode the information as follows:
We send a ‘Start’ bit.
We send the data (8 bits).
We send a ‘Stop’ bit (or bits).
If anything more you want to know you can google on serial communication or can again write if you have any doubt.