Lompat ke isi

UART: Perbedaan antara revisi

Dari Wikipedia bahasa Indonesia, ensiklopedia bebas
Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Tag: Suntingan perangkat seluler Suntingan peramban seluler
k clean up
Baris 4: Baris 4:
== Dasar ==
== Dasar ==


Bits have to be moved from one place to another using wires or some other medium. Over many miles, the expense of the wires becomes large. To reduce the expense of long communication links carrying several bits in parallel, data bits are sent sequentially, one after another, using a UART to convert the transmitted bits between sequential and parallel form at each end of the link. Each UART contains a [[shift register]] which is the fundamental method of conversion between serial and parallel forms.
Bits have to be moved from one place to another using wires or some other medium. Over many miles, the expense of the wires becomes large. To reduce the expense of long communication links carrying several bits in parallel, data bits are sent sequentially, one after another, using a UART to convert the transmitted bits between sequential and parallel form at each end of the link. Each UART contains a [[shift register]] which is the fundamental method of conversion between serial and parallel forms.


By convention, [[teletype]]-style UARTs send a "start" bit, five to eight data bits, least-significant-bit first, an optional "parity" bit, and then a "stop" bit. The start bit is the opposite polarity of the data-line's normal state. The stop-bit is the data-line's normal state, and provides a space before the next character can start. (This is called [[asynchronous start-stop]] transmission). In mechanical teletypes, the "stop" bit was often stretched to two bit times to give the mechanism more time to finish printing a character. A stretched "stop" bit also helps resynchronization. The parity bit can either make the number of bits odd, or even, or it can be omitted. Odd parity is more reliable because it assures that there will always be a data transition, and this permits many UARTs to resynchronize.
By convention, [[teletype]]-style UARTs send a "start" bit, five to eight data bits, least-significant-bit first, an optional "parity" bit, and then a "stop" bit. The start bit is the opposite polarity of the data-line's normal state. The stop-bit is the data-line's normal state, and provides a space before the next character can start. (This is called [[asynchronous start-stop]] transmission). In mechanical teletypes, the "stop" bit was often stretched to two bit times to give the mechanism more time to finish printing a character. A stretched "stop" bit also helps resynchronization. The parity bit can either make the number of bits odd, or even, or it can be omitted. Odd parity is more reliable because it assures that there will always be a data transition, and this permits many UARTs to resynchronize.
Baris 41: Baris 41:
== Synchronous ==
== Synchronous ==


The word "[[asynchronous]]" indicates that UARTs recover character timing information from the data stream, using designated "start" and "stop" bits to indicate the framing of each character. In ''synchronous'' transmission, the clock data is recovered separately from the data stream and no start/stop bits are used. This improves the efficiency of transmission on suitable channels; more of the bits sent are data. An asynchronous transmission sends nothing over the interconnection when the transmitting device has nothing to send; but a synchronous interface must send "pad" characters to maintain synchronism between the receiver and transmitter. The usual filler is the [[ASCII]] "SYN" character. This may be done automatically by the transmitting device.
The word "[[asynchronous]]" indicates that UARTs recover character timing information from the data stream, using designated "start" and "stop" bits to indicate the framing of each character. In ''synchronous'' transmission, the clock data is recovered separately from the data stream and no start/stop bits are used. This improves the efficiency of transmission on suitable channels; more of the bits sent are data. An asynchronous transmission sends nothing over the interconnection when the transmitting device has nothing to send; but a synchronous interface must send "pad" characters to maintain synchronism between the receiver and transmitter. The usual filler is the [[ASCII]] "SYN" character. This may be done automatically by the transmitting device.


Some chips have both synchronous and asynchronous modes. These are called '''USARTs''' (for "universal synchronous asynchronous receiver-transmitters").
Some chips have both synchronous and asynchronous modes. These are called '''USARTs''' (for "universal synchronous asynchronous receiver-transmitters").

Revisi per 5 Januari 2023 19.59

UART atau Universal Asynchronous Receiver-Transmitter adalah bagian perangkat keras komputer yang menerjemahkan antara bit-bit paralel data dan bit-bit serial. UART biasanya berupa sirkuit terintegrasi yang digunakan untuk komunikasi serial pada komputer atau port serial perangkat periperal. UART sekarang ini termasuk di dalam beberapa mikrokontroler (contohnya, PIC16F628).

Komponen keping UART tipikal

Keping UART biasanya terdiri dari:

  • Penyangga (buffer) Transmit/Receive
  • Pengendali (control) Transmit/Receive
  • Penyangga Bus Data
  • Logika Kendali Read/Write
  • Kendali Modem


Lihat pula