English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm curious as to why certain devices require a clock signal for communication (ie. microcontroller interfacing with a smartcard reader) whereas other devices just require a data and ground connection (RS232). I notice that RS232 specifies a baud/data/stop bit parameter whwereas the smartcard/clock driven devices do not. What is the relationship between the two and how do they work? Thanks!

2007-03-02 17:24:45 · 3 answers · asked by mdigitale 7 in Science & Mathematics Engineering

3 answers

RS232, although sometime loosely called an asynchronized bus, is actually a byte-synchronized serial bus. In contrast, a clock-driven serial bus is bit-synchronized. The former uses more time (extra signaling and flow control bits), the latter more space (extra clock line hardware).

On a byte-synchronized bus, the receiver watches the bus for a specific voltage waveform, called the Start Bit, which signals the beginning of a byte. It then uses the predefined baud/data/stop/parity setting info to know the slot timing and meaning of the next bits of the byte. The baud timing info, relative to the voltage edge of the Start Bit, for example, lets the receiver know exactly when to sample the voltage on the bus to read the next bits of the arriving byte. After reading all the bits of a byte, as defined by the data/stop/parity bit length settings, the receiver waits for the next valid Start Bit waveform to begin reading the next byte. On this bus, the bytes need neither to arrive back-to-back nor to conform to any synchronized timing requirement, only the bits of each byte do.

For the most common base-band serial bus versions, RS232 (single-ended, for PCs), RS422 (differential, for Macintoshes), and RS485 (a multi-drop RS422), the industry uses a protocol and a standard chip called UART (universal asynchronous receiver transmitter) which does the above described plus more advanced things such as a non-return-to-zero (NRZ) signaling: the integration over time of any stream of bit voltages is zero (so that only the signals and no net energy crosses the link to allow the signals to pass transformer’s nodes); or a majority vote: at the middle of the slot time of each bit the receiver reads three, rather than one, voltage samples and when the three reads do not all agree, the receiver makes a two-over-three majority vote to determine the logic value of the arriving bit (and flag an error condition to the higher level control). Advanced UARTs also use other clever signaling features and some scheme of hardware or software flow-control feedback to let the receiver prepare buffer space and decide the arrival timing of the bytes…

On a bit-synchronized bus, on the other hand, the master device doles out a clock stream which tells everyone on the bus the timing of each signal bit. This scheme takes less synchronize-coding overhead but requires more hardware wiring.

2007-03-02 19:18:03 · answer #1 · answered by sciquest 4 · 0 0

rs232 doesnt need a clock because the width of the pulse (the data bit) is known in advance. for example, both devices are set for 9600 baud. they also monitor the receive line, looking for a start bit. when the start bit is received, they know that 8 bits of data follow, then a stop bit.

other types of communication need clock pulses because the pulse width, and amount of data could be variable. this type of communication is much easier to implement in hardware than rs232 because all you need is a latch to do it (very basically).

2007-03-03 01:33:43 · answer #2 · answered by justme 7 · 0 0

The easiest answer to what you are looking for is that smart cards are a form of memory, where an RS-232 device would be a modem. The memory can basically be read as fast as the bus it is connected to, where as the modem would have to be configured for another modem to talk to.

If you need more information on clocks as related to data though shoot me an email with specific questions, ie. Asynch, Synch, Isosynch.

2007-03-02 17:46:50 · answer #3 · answered by jerod_gavel 3 · 0 0

fedest.com, questions and answers