- Beranda
- Komunitas
- Tech
- Programmer Forum
Mikrokontroller atmega8535 input infrared sederhana
TS
choq69
Mikrokontroller atmega8535 input infrared sederhana
Dear Agan2,
bisa bantu dikit permasalahan ane ga ya tentang Mikrokontroller dan infrared (PortD). Kok kagak mau jalan ya ni syntax. Mohon panduannya untuk syntax ini :
$regfile = "m8535.dat"
$crystal = 11059200
$baud = 4800
Config Adc = Single , Prescaler = Auto , Reference = Internal
Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.1 , Rs = Portb.0
Config Lcd = 16 * 2
Config Pind.7 = Input
Inser Alias Pind.7
Dim Masuk As Word
Dim Jumlah As Word
Dim Keluar As Word
Masuk = 0
Declare Sub Inser
Cls
Do
Locate 1 , 1
Lcd "Jumlah Masuk =" ; Masuk
If Jumlah = 0 Then
Masuk = 0
Else
If Inser = 1 Then
Masuk = Masuk + 1
End If
End If
Lowerline
Lcd "Sisa Parkir =" ; Jumlah
Jumlah = 20 - Masuk
Wait 1
Cls
Loop
End
Makasih gan
bisa bantu dikit permasalahan ane ga ya tentang Mikrokontroller dan infrared (PortD). Kok kagak mau jalan ya ni syntax. Mohon panduannya untuk syntax ini :
$regfile = "m8535.dat"
$crystal = 11059200
$baud = 4800
Config Adc = Single , Prescaler = Auto , Reference = Internal
Config Lcdpin = Pin , Db4 = Portb.2 , Db5 = Portb.3 , Db6 = Portb.4 , Db7 = Portb.5 , E = Portb.1 , Rs = Portb.0
Config Lcd = 16 * 2
Config Pind.7 = Input
Inser Alias Pind.7
Dim Masuk As Word
Dim Jumlah As Word
Dim Keluar As Word
Masuk = 0
Declare Sub Inser
Cls
Do
Locate 1 , 1
Lcd "Jumlah Masuk =" ; Masuk
If Jumlah = 0 Then
Masuk = 0
Else
If Inser = 1 Then
Masuk = Masuk + 1
End If
End If
Lowerline
Lcd "Sisa Parkir =" ; Jumlah
Jumlah = 20 - Masuk
Wait 1
Cls
Loop
End
Makasih gan
0
720
0
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan