100 likes | 252 Views
KOMUNIKASI SERIAL PELATIHAN TELEMETRY 2005. KOMUNIKASI SERIAL. Sinkron Data dikirim bersama dengan sinyal clock I2C (Inter-Integrated Circuit) SPI (Serial Peripheral Interface) Keyboard, mouse Asinkron Data dikirim tanpa sinyal clock UART (RS-232) Modem. Serial Sinkron. I2C SPI.
E N D
KOMUNIKASI SERIAL PELATIHAN TELEMETRY 2005
KOMUNIKASI SERIAL • Sinkron Data dikirim bersama dengan sinyal clock • I2C (Inter-Integrated Circuit) • SPI (Serial Peripheral Interface) • Keyboard, mouse • Asinkron Data dikirim tanpa sinyal clock • UART (RS-232) • Modem
Serial Sinkron I2C SPI Atmel datasheet, ATmega16 AKM datasheet, AK4551
ELECTRICAL SPECIFICATIONS OF RS-232 STANDARD • A "Space" (logic 0) will be between +3 and +25 Volts. • A "Mark" (Logic 1) will be between -3 and -25 Volts. • The region between +3 and -3 volts is undefined. • An open circuit voltage should never exceed 25 volts. (In Reference to GND) • A short circuit current should not exceed 500mA. The driver should be able to handle this without damage. (Take note of this one!)
SERIAL ASINKRON • Diperlukan boudrate yang sama pada sisi pengirim dan penerima • Pada pengiriman data harus disertakan start bit dan stop bit sebagai penanda awal dan akhir data • Untuk menjaga integritas data, dapat disertakan bit parity.
TTL/CMOS Serial Logic Waveform RS-232 Logic Waveform www.beyondlogic.org
RS-232 • Kecepatan max. 115,200 BPS • Panjang media/kabel max 60 meter • Single-ended (terhadap ground) • Sinyal mudah mendapat gangguan • Voltage swing ±25V • Short circuit max 500mA www.quatech.com
Menghubungkan 2 DTE (sumber komunikasi, misal, PC) DTE = Data Terminal Equipment DCE = Data Communication Equipment (penyedia jalur komunikasi antar DTE, misal, modem) Null-modem www.beyondlogic.org
Serial dengan VisualBasic • Disediakan komponen MSComm MSComm1.CommPort = 1 MSComm1.Settings = "9600,N,8,1" MSComm1.InputLen = 0 MSComm1.PortOpen = True MSComm1.Output = "data" Baca = MSComm1.Input MSComm1.PortOpen = False
So………. 1. Buat program sederhana untuk mengirim dan menerima data secara serial lewat Com1…..