alexa-tracking

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/52ea8122108b46aa198b45a4/mikrokontroller-atmega8535-input-infrared-sederhana
Smile 
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
×