



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The implementation of a sender and receiver program for serial communication and discusses the advantages and disadvantages of serial communication, as well as the differences between synchronous and asynchronous serial communication. The document also covers the use of a universal asynchronous receiver transmitter (uart) and the rs-232c standard.
Typology: Study notes
1 / 7
This page cannot be seen from the preview
Don't miss anything!




int i= 0; char Buf[1024]; while (1) { ch = Buf [i]; if ((inport((lpt) + 1)& 0x80) == 0) { ch = Buf [i]; ch = ch & 0xEF; while((inport((lpt) + 1) &0x80) == 0); } else { ch = Buf [i]; ch = ch >> 4; ch = ch | 0x10; outport (lpt, ch); i++; while((inport((lpt) + 1) &0x80) == 80); } }**
temp = temp >> 3; temp = temp | 0x10; i++; outport (lpt, temp); Buf [i] = y; while((inport((lpt) + 1) &0x80) == 0); } }**
timing signal (requires another line).
within the original signal (requires
double the bandwidth).
Synchronous Communication
signal.
encapsulated in start and end bit.
Asynchronous Communication
Serial Communication using a UART
5 – 8 bit
Start bit 1, 1.5, 2 Stop bit
Start bit of next byte
Parity bit
Bit rate = 9600
A bit is sampled after = 1/
-- But start and end bits of a particular
Byte cannot be recognized.
-- So 1.5 stop bit (high) is used to
encapsulate a byte. A low start bit at
the start of Byte is used to identify the
start of a Byte.
Sampling Rate
Modem
RS – 232C Cable
Connected via serial port
RS – 232C Connectors and Signals DB25 (25 pin connector)
(^1) 25 pin connector on PC
2
9
7
8
4
5
6
10
11
12
13
3
25 24 23 22 21 20 19 18 17 16 15 14
RI CD DTR GND DSR CTS RTS RD T X D