IO EXPANDER PAKAI LATCH 74573


io expander pake latch 74573, kalo mikro sedikit portnya, maka dengan rangkaian ini bisa terbantu.

ieu rangkaianna

expander

contoh programna pakai bascom avr

$regfile = “m8def.dat”
$crystal = 8000000
$baud = 9600

Latch1 Alias Portc.0
Latch2 Alias Portc.1

Datalatch Alias Portb

Config Latch1 = Output
Config Latch2 = Output
Config Datalatch = Output

Declare Sub Killthemall
Declare Sub Aktifkansemua
‘================================
Inisialisasi:
Reset Latch1
Reset Latch2
‘================================
Utama:
Call Killthemall
Wait 1
Call Aktifkansemua
Wait 1
Goto Utama
‘================================
Sub Killthemall:
Set Latch1
Datalatch = 0
Reset Latch1
Set Latch2
Datalatch = 0
Reset Latch2
End Sub

‘===============================
Sub Aktifkansemua:
Set Latch1
Datalatch = 255
Reset Latch1
Set Latch2
Datalatch = 255
Reset Latch2
End Sub
‘===============================

1 thought on “IO EXPANDER PAKAI LATCH 74573”

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s