Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
Detektor Logam

Detektor Logam

Ratings: (0)|Views: 293|Likes:
Published by MUHAMMAD SISWANTORO
bascom avr
bascom avr

More info:

Published by: MUHAMMAD SISWANTORO on Feb 04, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as TXT, PDF, TXT or read online from Scribd
See more
See less

12/28/2012

pdf

text

original

 
$regfile = m16def.dat$crystal = 4000000$hwstack = 40$swstack = 16$framesize = 32'$simDeflcdchar 0 , 32 , 32 , 31 , 31 , 31 , 31 , 32 , 32Deflcdchar 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1Deflcdchar 2 , 16 , 16 , 16 , 16 , 16 , 16 , 16 , 16Deflcdchar 3 , 16 , 16 , 31 , 31 , 31 , 31 , 16 , 16Deflcdchar 4 , 1 , 1 , 31 , 31 , 31 , 31 , 1 , 1Deflcdchar 5 , 32 , 32 , 28 , 28 , 28 , 28 , 32 , 32Deflcdchar 6 , 31 , 31 , 31 , 31 , 31 , 31 , 31 , 31ClsConfig Porta = InputConfig Portd = OutputConfig Portd.7 = OutputBuzzer Alias Portd.7Portd = 0Config Lcdpin = Pin , Db4 = Portb.3 , Db5 = Portb.2 , Db6 = Portb.1 , Db7 = Portb.0 , E = Portb.4 , Rs = Portb.5Config Lcd = 16 2Config Adc = Single , Prescaler = Auto , Reference = AvccDim W As Word , X As Word , Volt As Word , Volt_d As Word , I As Word , Cols AsWord , Cols_d As WordDim Volt_1 As ByteClsLocate 1 , 2Lcd AGUNG ZULFAHRILocate 2 , 4Lcd PALEMBANGWaitms 3ClsLocate 1 , 4Lcd DETEKTORLocate 2 , 7Lcd LOGAMWaitms 3ClsDoStart AdcFor W = 0 To 6Pulseout Portd , W , 600X = Getadc(1)NextVolt = X 1Volt_d = Volt Mod 1Volt = Volt - 250Locate 1 , 1Lcd vol ; Volt ;Volt_d = VoltCols = Volt_d 15Locate 2 , 1For I = 0 To ColsSelect Case ICase 0 Lcd Chr(6)Case 7 Lcd Chr(6)Case 14 Lcd Chr(6)Case Else Lcd Chr(0)End Select
 
Next ICols_d = Cols Mod 2If Cols_d 0 ThenLcd Chr(5)Cols = Cols + 2ElseCols = Cols + 1End IfFor I = Cols To 14Select Case ICase 0 Lcd Chr(6)Case 7 Lcd Chr(6)Case 14 Lcd Chr(6)Case Else Lcd Chr(32)End SelectNext IStop Adc'==============================================================================If Volt = 103 And Volt = 110 ThenBuzzer = 1Waitms 5Buzzer = 0End IfIf Volt = 111 And Volt = 120 ThenBuzzer = 1Waitms 5Buzzer = 0End IfIf Volt = 121 And Volt = 130 ThenBuzzer = 1Waitms 5Buzzer = 0End IfIf Volt = 131 ThenBuzzer = 1Waitms 5Buzzer = 0End If'==============================================================================If Volt = 97 And Volt = 80 ThenBuzzer = 1Waitms 5Buzzer = 0End IfIf Volt = 79 And Volt = 70 ThenBuzzer = 1Waitms 5Buzzer = 0End IfIf Volt = 69 And Volt = 60 ThenBuzzer = 1Waitms 5Buzzer = 0End IfIf Volt = 59 ThenBuzzer = 1Waitms 5Buzzer = 0End If

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->