- Beranda
- Komunitas
- Tech
- Programmer Forum
Mikrokontroller atmega8535 input infrared sederhana
TS
choq69
Mikrokontroller atmega8535 input infrared sederhana
Dear Agan,
Bisa bantu ga syntax ane yg ini. kok Inputan dari infrared nya kok ga bisa baca ya ? Apa syntax ane yg dibawah ini salah ? mohon bantuan revisi dari agan2 sekalian.
$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
Bisa bantu ga syntax ane yg ini. kok Inputan dari infrared nya kok ga bisa baca ya ? Apa syntax ane yg dibawah ini salah ? mohon bantuan revisi dari agan2 sekalian.
$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
0
517
0
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Guest
Tulis komentar menarik atau mention replykgpt untuk ngobrol seru
Komunitas Pilihan