On Mon, 5 Jan 1998 07:17:01 -0800 Andre Abelian writes: >1. since asynchronies method first sends start bit, data , parity then >stop bit what if my data is four bit >long how does it work since stop bit is 10th bit how does receiver >figure out that data is less then 8 bit. The receiver always expects 8 data bits, so to send 4 bits just don't use the other 4. Sending a start bit, 4 data bits, and a stop bit will not work because the receiver would still be collecting data bits when the start bit for the next 4-bit group arrives. So there is a lot of wasted time sending 4 bits, unless you start packing two 4-bit data groups into each 8-bit transmission. Some UARTs can be set for fewer than 8 bits. The 16X50 chip in the PC can be set for 5, 6, 7, or 8 bits. Modes other than 7 or 8 bits are very rare. I don't know of anything that uses 6 bits. Five bits are used for the Baudot code of old Teletypes, but there is little to no PC software that supports it in this manner. > >2. since start bit always is logic 1 stop bit is logic 0 is there any >rule for this to be always 1 for >start bit 0 for stop bit . what if some one modifies it just to be >opposite. Then it won't work. Actually the start bit is a logic 0 and a stop bit is a logic 1. This is how the data comes out at TTL level from most UART chips. The signal is then inverted so than on the RS-232 line, a positive voltage is a start bit or logic 0, and a negative voltage is a stop bit or logic 1. There is a rule for this, it's what makes the RS-232 interface useful by making every device use the same format.