PROGRAM BASCOM AVR. ' inisialisasi '

Size: px
Start display at page:

Download "PROGRAM BASCOM AVR. ' inisialisasi '"

Transcription

1 PROGRAM BASCOM AVR ' inisialisasi ' $prog &HFF, &HC4, &HD9, &H00 ' generated. Take care that the chip supports all fuse bytes. $regfile = "m8def.dat" $crystal = $hwstack = 40 $swstack = 16 $framesize = 32 '$baud = 9600 $baud = $lib "ds1307clock.lib" '$serialinput2lcd ' Dim Weekday As Byte Dim Tm As Word Dim Sen_w1 As Word Dim Sen_w2 As Word Dim Sw1 As Word, Vir_sw1 As Word Dim Sw2 As Word, Vir_sw2 As Word Dim S As String * 30 Dim Z As String * 30 Dim A As Byte Dim V1 As Word, V2 As Word, V3 As Word Dim V4 As Word, V5 As Word, V6 As Word ' konfigurasi Config Lcd = 20 * 4

2 Config Lcdpin = Pin, Db4 = Portb.2, Db5 = Portb.3, Db6 = Portb.4, Db7 = Portb.5, E = Portb.1, Rs = Portb.0 Config Adc = Single, Prescaler = Auto Config Portd = Output Config Sda = Portc.4 Config Scl = Portc.5 Const Ds1307w = &HD0 Const Ds1307r = &HD1 Config Clock = User Config Adc = Single, Prescaler = Auto Pompa1 Alias Portd.2 Pompa2 Alias Portd.3 'Config Portd.4 = Input Enable Interrupts Cursor Off Cls 'Print "DS1307" Waitms 10 Start Adc ' seting waktu 'Time$ = "14:27:00" 'Gosub Getdatetime ' mulai Mulai: Do ' gerbang input sensor Sen_w1 = Getadc(0) Sen_w2 = Getadc(1)

3 Sw1 = Getadc(2) Sw2 = Getadc(3) ' input data ' pengirinan data ke APC Incr Tm If Tm >= 1 Then : Tm = 0 Print "#$" ; Sen_w1 ; "?$" ; Sen_w2 ; "?$" ; Sw1 ; "?$" ; V1 ; "?$" ; V2 ; "?$" ; V3 ; "?$" ; V4 ; "?$" ; V5 ; "?&@ +[ENTER]" ' tampilan lcd 'Print "W:" ; Time$ Locate 2, 1 : Lcd "TX:" ; Tm ; " " Locate 1, 1 : Lcd "S1:" ; Sen_w1 ; " " Locate 1, 10 : Lcd "S2:" ; Sen_w2 ; " " Locate 2, 8 : Lcd "W" ; Time$ ; " " 'Locate 3, 1 : Lcd "RX" ; A ; " " Waitms 1 '========================================================== ===================== ' waktu pemberian pakan ' ''========================================================== ==================== ' Pagi If _sec >= 00 And _sec <= 2 And _min = 12 And _hour = 6 Then : Vir_sw1 = 1 : Goto Pakan : ' siang If _sec = 00 And _sec <= 2 And _min = 12 And _hour = 12 Then : Vir_sw1 = 1 : Goto Pakan :

4 ' sore If _sec = 00 And _sec <= 2 And _min = 45 And _hour = 16 Then : Vir_sw1 = 1 : Goto Pakan : ' If Sw1 >= 200 And Vir_sw1 = 0 Then : Portd.6 = 1 : Goto Pakan : '========================================================== ===================== ' control dari wereless ' '========================================================== ===================== ' Pompa 1 ON If Z = "1" Then Locate 3, 1 : Lcd "Pomp 1:ON " Pompa1 = 1 ' Pompa 1 OFF If Z = "2" Then Locate 3, 1 : Lcd "Pomp 1:OFF " Pompa1 = 0 ' ' Pompa 2 ON If Z = "3" Then Locate 3, 10 : Lcd "Pomp 2:ON " Pompa2 = 1 ' Pompa 2 OFF If Z = "4" Then

5 Locate 3, 10 : Lcd "Pomp 2:OFF " Pompa2 = 0 ' Pemberian Pakan If Z >= "9" Then : Portd.6 = 1 : Wait 4 : Goto Pakan : ' '========================================================== ===================== ' aktif pompa If Pind.4 = 1 Then Pompa1 = 1 ' If Pind.4 = 0 Then Pompa1 = 0 ' Loop 'Until A = 27 ' 'Loop End ' Return

6 '=========================================== Pengambilan data RTC DS1307 ====== Getdatetime: I2cstart I2cwbyte Ds1307w I2cwbyte 0 I2cstart I2cwbyte Ds1307r I2crbyte _sec, Ack I2crbyte _min, Ack I2crbyte _hour, Ack I2crbyte Weekday, Ack I2crbyte _day, Ack I2crbyte _month, Ack I2crbyte _year, Nack I2cstop _sec = Makedec(_sec) : _min = Makedec(_min) : _hour = Makedec(_hour) _day = Makedec(_day) : _month = Makedec(_month) : _year = Makedec(_year) Return ' Setdate: _day = Makebcd(_day) : _month = Makebcd(_month) : _year = Makebcd(_year) I2cstart I2cwbyte Ds1307w I2cwbyte 4 I2cwbyte _day I2cwbyte _month I2cwbyte _year I2cstop Return

7 ' Settime: _sec = Makebcd(_sec) : _min = Makebcd(_min) : _hour = Makebcd(_hour) I2cstart I2cwbyte Ds1307w I2cwbyte 0 I2cwbyte _sec I2cwbyte _min I2cwbyte _hour I2cstop Return Pakan: Cls ' Locate 1, 1 : Lcd " Memberi Pakan " Portd.6 = 1 Wait 1 Portd.6 = 0 Wait 4 ' Locate 2, 1 : Lcd " Memberi Pakan " Portd.6 = 1 Wait 1 Portd.6 = 0 Wait 4 '

8 Locate 3, 1 : Lcd " Memberi Pakan " Portd.6 = 1 Wait 3 Portd.6 = 0 Locate 4, 1 : Lcd " Memberi Pakan " Wait 4 Vir_sw1 = 0 Cls Return

9 Program Visual Basic Private Sub Command1_Click() Unload Me Private Sub Command2_Click() Timer4.Enabled = False mnstart.caption = "S&" + "tart" Text2.BackColor = &H0& Text2.ForeColor = &H0& 'pompa1_v = 0 Private Sub Command3_Click() Timer4.Interval = GetSetting(App.Title, "SettingValue", "Waktu", 1) Timer4.Enabled = True mnstart.caption = "S&" + "top" Text2.BackColor = &HFF& Text2.ForeColor = &HFF& 'pompa1_v = 1 Private Sub Command4_Click() Text1.BackColor = &HFF& Text1.ForeColor = &HFF& Serial.Output = "3" Private Sub Command5_Click() Text1.BackColor = &H0& Text1.ForeColor = &H0&

10 Serial.Output = "4" Private Sub Command6_Click() Text3.BackColor = &HFF& Text3.ForeColor = &HFF& Serial.Output = "1" Private Sub Command7_Click() Text3.BackColor = &H0& Text3.ForeColor = &H0& Serial.Output = "2" Private Sub Command8_Click() Serial.Output = "5" Private Sub Form_Load() 'membuat garis bantu picgrafik.refresh picgrafik.cls picgrafik.drawstyle = 0 picgrafik.drawwidth = 1 SerialCon LoadDataAwal SetVariabel '---Log----

11 With mslog.rows = 1.ColWidth(0) = 600.TextMatrix(0, 0) = "Time".ColWidth(1) = Lebar.TextMatrix(0, 1) = "ADC1".ColWidth(2) = Lebar.TextMatrix(0, 2) = "ADC2".ColWidth(3) = Lebar.TextMatrix(0, 3) = "ADC3".ColWidth(4) = Lebar.TextMatrix(0, 4) = "ADC4".ColWidth(5) = Lebar.TextMatrix(0, 5) = "ADC5".ColWidth(6) = Lebar.TextMatrix(0, 6) = "ADC6".ColWidth(7) = Lebar.TextMatrix(0, 7) = "ADC7".ColWidth(8) = Lebar.TextMatrix(0, 8) = "ADC8" End With Sub SetVariabel() Lebar = 900 StepBatas = 1000 TitikNolY = 5000 TitikNolX = 500 X1a = TitikNolX X1b = X1a

12 Y1a = TitikNolY Y1b = Y1a X2a = X1a X2b = X1b Y2a = Y1a Y2b = Y1b X3a = X1a X3b = X1b Y3a = Y1a Y3b = Y1b X4a = X1a X4b = X1b Y4a = Y1a Y4b = Y1b X5a = X1a X5b = X1b Y5a = Y1a Y5b = Y1b X6a = X1a X6b = X1b Y6a = Y1a Y6b = Y1b X7a = X1a

13 X7b = X1b Y7a = Y1a Y7b = Y1b X8a = X1a X8b = X1b Y8a = Y1a Y8b = Y1b StepGrap = 5 Sub LoadDataAwal() SetAtas1 = GetSetting(App.Title, "SettingValue", "Atas1", 0) SetBawah1 = GetSetting(App.Title, "SettingValue", "Bawah1", 0) If SetAtas1 < SetBawah1 Then SetAtas1 = SetBawah1 + 1 lblsetatas1.caption = SetAtas1 lblsetbawah1 = SetBawah1 SetAtas2 = GetSetting(App.Title, "SettingValue", "Atas2", 0) SetBawah2 = GetSetting(App.Title, "SettingValue", "Bawah2", 0) If SetAtas2 < SetBawah2 Then SetAtas2 = SetBawah2 + 1 lblsetatas2.caption = SetAtas2 lblsetbawah2 = SetBawah2 SetAtas3 = GetSetting(App.Title, "SettingValue", "Atas3", 0) SetBawah3 = GetSetting(App.Title, "SettingValue", "Bawah3", 0)

14 If SetAtas3 < SetBawah3 Then SetAtas3 = SetBawah3 + 1 lblsetatas3.caption = SetAtas3 lblsetbawah3 = SetBawah3 SetAtas4 = GetSetting(App.Title, "SettingValue", "Atas4", 0) SetBawah4 = GetSetting(App.Title, "SettingValue", "Bawah4", 0) If SetAtas4 < SetBawah4 Then SetAtas4 = SetBawah4 + 1 lblsetatas4.caption = SetAtas4 lblsetbawah4 = SetBawah4 SetAtas5 = GetSetting(App.Title, "SettingValue", "Atas5", 0) SetBawah5 = GetSetting(App.Title, "SettingValue", "Bawah5", 0) If SetAtas5 < SetBawah5 Then SetAtas5 = SetBawah5 + 1 lblsetatas5.caption = SetAtas5 lblsetbawah5 = SetBawah5 SetAtas6 = GetSetting(App.Title, "SettingValue", "Atas6", 0) SetBawah6 = GetSetting(App.Title, "SettingValue", "Bawah6", 0) If SetAtas6 < SetBawah6 Then SetAtas6 = SetBawah6 + 1 lblsetatas6.caption = SetAtas6 lblsetbawah6 = SetBawah6

15 SetAtas7 = GetSetting(App.Title, "SettingValue", "Atas7", 0) SetBawah7 = GetSetting(App.Title, "SettingValue", "Bawah7", 0) If SetAtas7 < SetBawah7 Then SetAtas7 = SetBawah7 + 1 lblsetatas7.caption = SetAtas7 lblsetbawah7 = SetBawah7 SetAtas8 = GetSetting(App.Title, "SettingValue", "Atas8", 0) SetBawah8 = GetSetting(App.Title, "SettingValue", "Bawah8", 0) If SetAtas8 < SetBawah8 Then SetAtas8 = SetBawah8 + 1 lblsetatas8.caption = SetAtas8 lblsetbawah8 = SetBawah8 Sub Awal() Dim i As Integer With picgrafik.fontname = "verdana".forecolor = RGB(80, 80, 80).FontSize = 8 End With picgrafik.drawwidth = 2 'sumbu x picgrafik.line (500, 5000)-(picGrafik.Width, 5000), RGB(100, 100, 100) picgrafik.drawstyle = 2 picgrafik.drawwidth = 1

16 For i = 1 To 9 picgrafik.line (500, i * 500)-(picGrafik.Width, i * 500), RGB(100, 100, 100) picgrafik.currenty = i * 500 picgrafik.currentx = 1 picgrafik.print (i * 100) Next i picgrafik.currenty = 5000 picgrafik.currentx = 300 picgrafik.print 0 picgrafik.currenty = 10 picgrafik.currentx = 1 picgrafik.print 1000 picgrafik.drawstyle = 0 picgrafik.drawwidth = 2 'sumbu y picgrafik.line (500, 0)-(500, 5000), RGB(100, 100, 100) picgrafik.drawstyle = 1 picgrafik.drawwidth = 1 For i = 1 To 14 picgrafik.line (500 + i * 1000, 0)-(500 + i * 1000, 5000), RGB(100, 100, 100) Next i picgrafik.drawstyle = 2 picgrafik.drawwidth = 1 For i = 1 To 14 picgrafik.line (i * 1000, 0)-(i * 1000, 5000), RGB(100, 100, 100) Next i

17 'Tulisan sumbu Y picgrafik.drawstyle = 0 picgrafik.drawwidth = 4 picgrafik.line (1600, 5200)-(2000, 5200), RGB(125, 0, 0) picgrafik.line (3600, 5200)-(4000, 5200), RGB(125, 125, 0) picgrafik.line (5600, 5200)-(6000, 5200), RGB(125, 125, 125) picgrafik.line (7600, 5200)-(8000, 5200), RGB(255, 0, 0) picgrafik.line (9600, 5200)-(10000, 5200), RGB(255, 125, 0) picgrafik.line (11600, 5200)-(12000, 5200), RGB(255, 125, 125) picgrafik.line (13600, 5200)-(14000, 5200), RGB(255, 255, 0) picgrafik.line (15600, 5200)-(16000, 5200), RGB(255, 255, 255) picgrafik.currentx = 2100 picgrafik.currenty = 5100 picgrafik.print "ADC1" picgrafik.currentx = 4100 picgrafik.currenty = 5100 picgrafik.print "ADC2" picgrafik.currentx = 6100 picgrafik.currenty = 5100 picgrafik.print "ADC3" picgrafik.currentx = 8100 picgrafik.currenty = 5100 picgrafik.print "ADC4" picgrafik.currentx = picgrafik.currenty = 5100 picgrafik.print "ADC5" picgrafik.currentx = picgrafik.currenty = 5100 picgrafik.print "ADC6"

18 picgrafik.currentx = picgrafik.currenty = 3600 picgrafik.print "ADC7" picgrafik.currentx = picgrafik.currenty = 4100 picgrafik.print "ADC8" Private Sub Form_Unload(Cancel As Integer) If Serial.PortOpen = True Then Serial.PortOpen = False Private Sub mnexit_click() Unload Me Private Sub mnport_click() Dim kom As Integer kom = InputBox("Masukkan No COM yang digunakan (1,2,3 atau 4)", "koneksi") SaveSetting App.Title, "SettingValue", "Port", kom Private Sub mnsampling_click() Dim waktu As Integer waktu = InputBox("Masukkan waktu sampling yang digunakan (dalam ms)", "Waktu Sampling") SaveSetting App.Title, "SettingValue", "Waktu", waktu

19 Private Sub mnstart_click() If Timer4.Enabled = False Then Timer4.Interval = GetSetting(App.Title, "SettingValue", "Waktu", 1) Timer4.Enabled = True mnstart.caption = "S&" + "top" ElseIf Timer4.Enabled = True Then Timer4.Enabled = False mnstart.caption = "S&" + "tart" Private Sub Timer1_Timer() Awal Timer1.Enabled = False Private Sub Timer3_Timer() Serial.Output = "r" + Chr(10) Private Sub Timer4_Timer() Dim PaketPecah As String Dim Kres As Integer, At As Integer Dim Dollar As Integer, Tanya As Integer 'Serial.Output = "r" + Chr(10) DataSerial = Serial.Input 'Text1 = DataSerial If DataSerial <> "" Then PaketData = ""

20 PaketData = DataSerial Kres = InStr(PaketData, "#") At = InStr(PaketData, "@") If (Kres > 0) And (At > 0) Then If Left(PaketData, 1) = "#" Then 'ADC 1 PaketPecah = Mid$(PaketData, Kres + 1, At - 2) Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC1 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC1 > 5000 Then ADC1 = ADC1 / 10 If ADC1 > 5000 Then ADC1 = 5000 lbladc1 = ADC1 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) 'ADC 2 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC2 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC2 > 5000 Then ADC2 = ADC2 / 10 If ADC2 > 5000 Then ADC2 = 5000

21 lbladc2 = ADC2 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) 'ADC 3 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC3 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC3 > 5000 Then ADC3 = ADC3 / 10 If ADC3 > 5000 Then ADC3 = 5000 lbladc3 = ADC3 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) 'ADC 4 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC4 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC4 > 5000 Then ADC4 = ADC4 / 10 If ADC4 > 5000 Then ADC4 = 5000

22 lbladc4 = ADC4 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) 'ADC 5 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC5 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC5 > 5000 Then ADC5 = ADC5 / 10 If ADC5 > 5000 Then ADC5 = 5000 lbladc5 = ADC5 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) 'ADC 6 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC6 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC6 > 5000 Then ADC6 = ADC6 / 10 If ADC6 > 5000 Then ADC6 = 5000 lbladc6 = ADC6 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya)

23 'ADC 7 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC7 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC7 > 5000 Then ADC7 = ADC7 / 10 If ADC7 > 5000 Then ADC7 = 5000 lbladc7 = ADC7 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) 'ADC 8 Dollar = InStr(PaketPecah, "$") Tanya = InStr(PaketPecah, "?") ADC8 = Mid$(PaketPecah, Dollar + 1, Tanya - 2) If ADC8 > 5000 Then ADC8 = ADC8 / 10 If ADC8 > 5000 Then ADC8 = 5000 lbladc8 = ADC8 PaketPecah = Mid$(PaketPecah, Tanya + 1, Len(PaketPecah) - Tanya) Grafik CekBatas

24 Private Sub UDAtas1_DownClick() If SetAtas1 > 0 Then SetAtas1 = SetAtas1 - StepBatas lblsetatas1.caption = SetAtas1 SaveSetting App.Title, "SettingValue", "Atas1", SetAtas1 Private Sub UDAtas1_UpClick() If SetAtas1 < UDAtas1.Max Then SetAtas1 = SetAtas1 + StepBatas lblsetatas1.caption = SetAtas1 SaveSetting App.Title, "SettingValue", "Atas1", SetAtas1 Private Sub UDAtas2_DownClick() If SetAtas2 > 0 Then SetAtas2 = SetAtas2 - StepBatas lblsetatas2.caption = SetAtas2 SaveSetting App.Title, "SettingValue", "Atas2", SetAtas2 Private Sub UDAtas2_UpClick()

25 If SetAtas2 < UDAtas2.Max Then SetAtas2 = SetAtas2 + StepBatas lblsetatas2.caption = SetAtas2 SaveSetting App.Title, "SettingValue", "Atas2", SetAtas2 Private Sub UDAtas3_DownClick() If SetAtas3 > 0 Then SetAtas3 = SetAtas3 - StepBatas lblsetatas3.caption = SetAtas3 SaveSetting App.Title, "SettingValue", "Atas3", SetAtas3 Private Sub UDAtas3_UpClick() If SetAtas3 < UDAtas3.Max Then SetAtas3 = SetAtas3 + StepBatas lblsetatas3.caption = SetAtas3 SaveSetting App.Title, "SettingValue", "Atas3", SetAtas3 Private Sub UDAtas4_DownClick() If SetAtas4 > 0 Then SetAtas4 = SetAtas4 - StepBatas lblsetatas4.caption = SetAtas4 SaveSetting App.Title, "SettingValue", "Atas4", SetAtas4

26 Private Sub UDAtas4_UpClick() If SetAtas4 < UDAtas4.Max Then SetAtas4 = SetAtas4 + StepBatas lblsetatas4.caption = SetAtas4 SaveSetting App.Title, "SettingValue", "Atas4", SetAtas4 Private Sub UDAtas5_DownClick() If SetAtas5 > 0 Then SetAtas5 = SetAtas5 - StepBatas lblsetatas5.caption = SetAtas5 SaveSetting App.Title, "SettingValue", "Atas5", SetAtas5 Private Sub UDAtas5_UpClick() If SetAtas5 < UDAtas5.Max Then SetAtas5 = SetAtas5 + StepBatas lblsetatas5.caption = SetAtas5 SaveSetting App.Title, "SettingValue", "Atas5", SetAtas5 Private Sub UDAtas6_DownClick() If SetAtas6 > 0 Then SetAtas6 = SetAtas6 - StepBatas

27 lblsetatas6.caption = SetAtas6 SaveSetting App.Title, "SettingValue", "Atas6", SetAtas6 Private Sub UDAtas6_UpClick() If SetAtas6 < UDAtas6.Max Then SetAtas6 = SetAtas6 + StepBatas lblsetatas6.caption = SetAtas6 SaveSetting App.Title, "SettingValue", "Atas6", SetAtas6 Private Sub UDAtas7_DownClick() If SetAtas7 > 0 Then SetAtas7 = SetAtas7 - StepBatas lblsetatas7.caption = SetAtas7 SaveSetting App.Title, "SettingValue", "Atas7", SetAtas7 Private Sub UDAtas7_UpClick() If SetAtas7 < UDAtas7.Max Then SetAtas7 = SetAtas7 + StepBatas lblsetatas7.caption = SetAtas7 SaveSetting App.Title, "SettingValue", "Atas7", SetAtas7

28 Private Sub UDAtas8_DownClick() If SetAtas8 > 0 Then SetAtas8 = SetAtas8 - StepBatas lblsetatas8.caption = SetAtas8 SaveSetting App.Title, "SettingValue", "Atas8", SetAtas8 Private Sub UDAtas8_UpClick() If SetAtas8 < UDAtas8.Max Then SetAtas8 = SetAtas8 + StepBatas lblsetatas8.caption = SetAtas8 SaveSetting App.Title, "SettingValue", "Atas8", SetAtas8 Private Sub UDBawah1_DownClick() If SetBawah1 > 0 Then SetBawah1 = SetBawah1 - StepBatas lblsetbawah1 = SetBawah1 SaveSetting App.Title, "SettingValue", "Bawah1", SetBawah1 Private Sub UDBawah1_UpClick() If SetBawah1 < UDBawah1.Max Then SetBawah1 = SetBawah1 + StepBatas lblsetbawah1 = SetBawah1

29 SaveSetting App.Title, "SettingValue", "Bawah1", SetBawah1 Private Sub UDBawah2_DownClick() If SetBawah2 > 0 Then SetBawah2 = SetBawah2 - StepBatas lblsetbawah2 = SetBawah2 SaveSetting App.Title, "SettingValue", "Bawah2", SetBawah2 Private Sub UDBawah2_UpClick() If SetBawah2 < UDBawah2.Max Then SetBawah2 = SetBawah2 + StepBatas lblsetbawah2 = SetBawah2 SaveSetting App.Title, "SettingValue", "Bawah2", SetBawah2 Private Sub UDBawah3_DownClick() If SetBawah3 > 0 Then SetBawah3 = SetBawah3 - StepBatas lblsetbawah3 = SetBawah3 SaveSetting App.Title, "SettingValue", "Bawah3", SetBawah3 Private Sub UDBawah3_UpClick() If SetBawah3 < UDBawah3.Max Then

30 SetBawah3 = SetBawah3 + StepBatas lblsetbawah3 = SetBawah3 SaveSetting App.Title, "SettingValue", "Bawah3", SetBawah3 Private Sub UDBawah4_DownClick() If SetBawah4 > 0 Then SetBawah4 = SetBawah4 - StepBatas lblsetbawah4 = SetBawah4 SaveSetting App.Title, "SettingValue", "Bawah4", SetBawah4 Private Sub UDBawah4_UpClick() If SetBawah4 < UDBawah4.Max Then SetBawah4 = SetBawah4 + StepBatas lblsetbawah4 = SetBawah4 SaveSetting App.Title, "SettingValue", "Bawah4", SetBawah4 Private Sub UDBawah5_DownClick() If SetBawah5 > 0 Then SetBawah5 = SetBawah5 - StepBatas lblsetbawah5 = SetBawah5 SaveSetting App.Title, "SettingValue", "Bawah5", SetBawah5

31 Private Sub UDBawah5_UpClick() If SetBawah5 < UDBawah5.Max Then SetBawah5 = SetBawah5 + StepBatas lblsetbawah5 = SetBawah5 SaveSetting App.Title, "SettingValue", "Bawah5", SetBawah5 Private Sub UDBawah6_DownClick() If SetBawah6 > 0 Then SetBawah6 = SetBawah6 - StepBatas lblsetbawah6 = SetBawah6 SaveSetting App.Title, "SettingValue", "Bawah6", SetBawah6 Private Sub UDBawah6_UpClick() If SetBawah6 < UDBawah6.Max Then SetBawah6 = SetBawah6 + StepBatas lblsetbawah6 = SetBawah6 SaveSetting App.Title, "SettingValue", "Bawah6", SetBawah6 Private Sub UDBawah7_DownClick() If SetBawah7 > 0 Then SetBawah7 = SetBawah7 - StepBatas lblsetbawah7 = SetBawah7

32 SaveSetting App.Title, "SettingValue", "Bawah7", SetBawah7 Private Sub UDBawah7_UpClick() If SetBawah7 < UDBawah7.Max Then SetBawah7 = SetBawah7 + StepBatas lblsetbawah7 = SetBawah7 SaveSetting App.Title, "SettingValue", "Bawah7", SetBawah7 Private Sub UDBawah8_DownClick() If SetBawah8 > 0 Then SetBawah8 = SetBawah8 - StepBatas lblsetbawah8 = SetBawah8 SaveSetting App.Title, "SettingValue", "Bawah8", SetBawah8 Private Sub UDBawah8_UpClick() If SetBawah8 < UDBawah8.Max Then SetBawah8 = SetBawah8 + StepBatas lblsetbawah8 = SetBawah8 SaveSetting App.Title, "SettingValue", "Bawah8", SetBawah8 Sub Grafik() Dim Jumlah As Integer, Nilai1 As Integer

33 Jumlah = mslog.rows ADC1 = ADC1 * 5 ADC2 = ADC2 * 5 ADC3 = ADC3 * 5 ADC4 = ADC4 * 5 ADC5 = ADC5 * 5 ADC6 = ADC6 * 5 ADC7 = ADC7 * 5 ADC8 = ADC8 * 5 Y1b = TitikNolY - ADC1 Y2b = TitikNolY - ADC2 Y3b = TitikNolY - ADC3 Y4b = TitikNolY - ADC4 Y5b = TitikNolY - ADC5 Y6b = TitikNolY - ADC6 Y7b = TitikNolY - ADC7 Y8b = TitikNolY - ADC8 Frame7 = X1a If X1a < Then X1b = X1b + StepGrap X2b = X2b + StepGrap X3b = X3b + StepGrap X4b = X4b + StepGrap X5b = X5b + StepGrap X6b = X6b + StepGrap X7b = X7b + StepGrap X8b = X8b + StepGrap

34 ElseIf X1a >= Then X1a = TitikNolX X2a = TitikNolX X3a = TitikNolX X4a = TitikNolX X5a = TitikNolX X6a = TitikNolX X7a = TitikNolX X8a = TitikNolX X1b = TitikNolX X2b = TitikNolX X3b = TitikNolX X4b = TitikNolX X5b = TitikNolX X6b = TitikNolX X7b = TitikNolX X8b = TitikNolX picgrafik.cls Awal picgrafik.line (X1a, Y1a)-(X1b, Y1b), RGB(125, 0, 0) picgrafik.line (X2a, Y2a)-(X2b, Y2b), RGB(125, 125, 0) picgrafik.line (X3a, Y3a)-(X3b, Y3b), RGB(125, 125, 125) picgrafik.line (X4a, Y4a)-(X4b, Y4b), RGB(255, 0, 0) picgrafik.line (X5a, Y5a)-(X5b, Y5b), RGB(255, 125, 0) picgrafik.line (X6a, Y6a)-(X6b, Y6b), RGB(255, 125, 125) picgrafik.line (X7a, Y7a)-(X7b, Y7b), RGB(255, 255, 0) picgrafik.line (X8a, Y8a)-(X8b, Y8b), RGB(255, 255, 255) With mslog

35 .Rows = Jumlah + 1.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 1) = ADC1.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 2) = ADC2.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 3) = ADC3.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 4) = ADC4.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 5) = ADC5.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 6) = ADC6.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 7) = ADC7.TextMatrix(Jumlah, 0) = Val(Jumlah).TextMatrix(Jumlah, 8) = ADC8 End With Label15.Caption = "T(" & Jumlah & ")- DATA1:" & ADC1 & "- DATA2:" & ADC2 & "- DATA3:" & ADC3 & "- DATA4:" & ADC4 & "- DATA5:" & ADC5 & "- ADC6:" & ADC6 ' & "- ADC7:" & ADC7 & "- ADC8:" & ADC8 X1a = X1b Y1a = Y1b X2a = X2b Y2a = Y2b X3a = X3b Y3a = Y3b

36 X4a = X4b Y4a = Y4b X5a = X5b Y5a = Y5b X6a = X6b Y6a = Y6b X7a = X7b Y7a = Y7b X8a = X8b Y8a = Y8b Sub CekBatas() If Val(ADC1) >= SetAtas1 Then Shape1.FillColor = &HFF& ElseIf Val(ADC1) < SetAtas1 Then Shape1.FillColor = &HC000& If Val(ADC2) >= SetAtas2 Then Shape2.FillColor = &HFF& ElseIf Val(ADC2) < SetAtas2 Then Shape2.FillColor = &HC000&

37 If Val(ADC3) >= SetAtas3 Then Shape3.FillColor = &HFF& ElseIf Val(ADC3) < SetAtas3 Then Shape3.FillColor = &HC000& If Val(ADC4) >= SetAtas4 Then Shape4.FillColor = &HFF& ElseIf Val(ADC4) < SetAtas4 Then Shape4.FillColor = &HC000& If Val(ADC5) >= SetAtas5 Then Shape5.FillColor = &HFF& ElseIf Val(ADC5) < SetAtas5 Then Shape5.FillColor = &HC000& If Val(ADC6) >= SetAtas6 Then Shape6.FillColor = &HFF& ElseIf Val(ADC6) < SetAtas6 Then Shape6.FillColor = &HC000& If Val(ADC7) >= SetAtas7 Then Shape7.FillColor = &HFF& ElseIf Val(ADC7) < SetAtas7 Then Shape7.FillColor = &HC000&

38 If Val(ADC8) >= SetAtas8 Then Shape8.FillColor = &HFF& ElseIf Val(ADC8) < SetAtas8 Then Shape8.FillColor = &HC000&

39 Program Serial Visual Basic Dim DataSerial As String, PaketData As String Public ADC1 As String, ADC2 As String, ADC3 As String, ADC4 As String Public ADC5 As String, ADC6 As String, ADC7 As String, ADC8 As String Public SetAtas1 As Integer, SetAtas2 As Integer, SetAtas3 As Integer, SetAtas4 As Integer Public SetAtas5 As Integer, SetAtas6 As Integer, SetAtas7 As Integer, SetAtas8 As Integer Public SetBawah1 As Integer, SetBawah2 As Integer, SetBawah3 As Integer, SetBawah4 As Integer Public SetBawah5 As Integer, SetBawah6 As Integer, SetBawah7 As Integer, SetBawah8 As Integer Public X1a As Long, X1b As Long, Y1a As Integer, Y1b As Integer Public X2a As Long, X2b As Long, Y2a As Long, Y2b As Long Public X3a As Long, X3b As Long, Y3a As Long, Y3b As Long Public X4a As Long, X4b As Long, Y4a As Long, Y4b As Long Public X5a As Long, X5b As Long, Y5a As Long, Y5b As Long Public X6a As Long, X6b As Long, Y6a As Long, Y6b As Long Public X7a As Long, X7b As Long, Y7a As Long, Y7b As Long Public X8a As Long, X8b As Long, Y8a As Long, Y8b As Long Dim pompa1 As Long, pompa1_v As Long Dim pompa2 As Long, pompa2_v As Long Dim pakan As Long, pakan_v As Long Public TitikNolY As Integer, TitikNolX As Integer, StepGrap As Integer, StepBatas As Integer, Lebar As Integer

40 Sub SerialCon() Brate = "57600" 'Comm Port Data INI File not located - Load defaults. Parity = "N" NBytes = "8" StopBits = "1" PrtNumb = GetSetting(App.Title, "SettingValue", "Port", 5) CONF = Brate & "," & Parity & "," & NBytes & "," & StopBits Text1 = CONF Form1.Serial.Settings = CONF Form1.Serial.InBufferSize = Form1.Serial.OutBufferSize = Form1.Serial.CommPort = PrtNumb If Form1.Serial.PortOpen = False Then Form1.Serial.PortOpen = True

41 Lampiran Data Hasil Pengujian TP1 TP2 TP3

42 TP4 TP5 TP6 (saat tidak memberi pakan)

43 TP6 (saat memberi pakan) TP7 (saat non aktif) TP7 (saat aktif)

44 TP8 (saat non aktif) TP8 (saat aktif) TP9 (saat non atif)

45 TP9 (saat aktif) TP10 (saat non aktif) TP10 (saat aktif)

46

Firmware Master (Betreuer)

Firmware Master (Betreuer) 1 Firmware Master (Betreuer) 'MMR Projet Master JCF 'Mess-Intervall in Sekunden (Zeit zwischen 2 Aufzeichnungen) Dim Minterval As Word Dim Ee_minterval As Eram Word $regfile = "8535def.dat" $crystal =

More information

AW51V2, 8051 Development Board

AW51V2, 8051 Development Board AW51V2, 8051 Development Board All Amateur World s development boards represents irreplaceable tools for programming and developing micro-controller based devices. Carefully chosen components and best

More information

'Pressure_32 () calculates the air pressure with 32bit, it results in a resolution of 0.01hPa. 'This is quite sufficient for a weather station.

'Pressure_32 () calculates the air pressure with 32bit, it results in a resolution of 0.01hPa. 'This is quite sufficient for a weather station. '****************************************** 'BME280 sample code '(C) 2015 by Michael Lehmann 'Mlehmann (a) mgkulm.ch 'Translated from German to Engish by Google Translate '******************************************

More information

Application note, Nordic nrf24l01 with Bascom-Avr

Application note, Nordic nrf24l01 with Bascom-Avr Application note, Nordic nrf24l01 with Bascom-Avr Getting a Nordic nrf24l01 single chip 2.4GHZ radio transceiver up and running with Bascom-Avr. Written by Evert Dekker 2007. What s an nrf24l01 The nrf24l01

More information

I2C BUS SERIAL EEPROM

I2C BUS SERIAL EEPROM Course on BASCOM 8051 - (30) Theoretic/Practical course on BASCOM 8051 Programming. Author: DAMINO Salvatore. I2C BUS SERIAL EEPROM In Embedded applications, among the most frequently used devices, there

More information

DT-SENSE. UltraSonic and InfraRed Ranger (USIRR)

DT-SENSE. UltraSonic and InfraRed Ranger (USIRR) DT-SENSE UltraSonic and InfraRed Ranger (USIRR) Trademarks & Copyright AT, IBM, and PC are trademarks of International Business Machines Corp. Windows is a registered trademark of Microsoft Corporation.

More information

ICN12. I2C to UART Bridge, ADC,DAC and I/O

ICN12. I2C to UART Bridge, ADC,DAC and I/O Firmware version 1.4 Introduction ICN12 I2C to UART Bridge, ADC,DAC and I/O This is an I2C to UART bridge, designed to give an extra UART to a microcontroller when only I2C is available. It is an I2C device

More information

Project : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments:

Project : Version : Date : 11/04/2016 Author : Freeware, for evaluation and non-commercial use only Company : Comments: Lampiran 1 Listing program dari seluruh sistem. /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program Generator Copyright

More information

Visual Basic 6 Lecture 7. The List Box:

Visual Basic 6 Lecture 7. The List Box: The List Box: The function of the List Box is to present a list of items where the user can click and select the items from the list or we can use the List Box control as a simple memory to save data.

More information

BASCOM LT. Language Reference V 1.26

BASCOM LT. Language Reference V 1.26 BASCOM LT Language Reference V 1.26 Copyright MCS Electronics Page 1 MCS Electronics may update this documentation without notice. Products specification and usage may change accordingly. MCS Electronics

More information

Brief Preface. INTRODUCTION

Brief Preface. INTRODUCTION Course on BASCOM 8051 - ( 1 ) Theoretic/Practical Course on BASCOM 8051 Programming. Author: DAMINO Salvatore. Brief Preface. The purpose of this course is the description of the essential information

More information

Easy-TCP/IP 1.6. I²C / TWI interface. Making Things Easy MCS ELECTRONICS. Version. Easy-TCP/IP I²C / TWI interface

Easy-TCP/IP 1.6. I²C / TWI interface. Making Things Easy MCS ELECTRONICS. Version. Easy-TCP/IP I²C / TWI interface Version 1.6 MCS ELECTRONICS Making Things Easy Easy-TCP/IP I²C / TWI interface Reduces the use of I/O pins (Only 4 pins needed for TCP/IP) Cost saving, by reducing components I²C / TWI enables low cost

More information

RTC Interface 89C51 DS M. Krishna Kumar MAM/M7/LU17/V1/ Vcc VCC 5 SDA P1.0 6 SCL P KHz 3 BAT 3.

RTC Interface 89C51 DS M. Krishna Kumar MAM/M7/LU17/V1/ Vcc VCC 5 SDA P1.0 6 SCL P KHz 3 BAT 3. RTC Interface 89C51 Vcc P1.0 10k 10k 5 SDA DS 1307 8 VCC P1.1 6 SCL X1 1 + 3 BAT X2 2 32.768KHz - 3.6V 4 GND INTB\SQW 7 M. Krishna Kumar MAM/M7/LU17/V1/2004 1 RTC Interface contd. DS 1307 is a real time

More information

LAMPIRAN A. Universitas Sumatera Utara

LAMPIRAN A. Universitas Sumatera Utara 63 LAMPIRAN A Rangkaian Lengkap Perangkat Keras Rangkaian ini terdiri dari Rangkaian Power Supply (PSA), Mikrokontroller atmega8535, RFID Reader ID 12, Rangkaian Infra Merah Fotodioda, driver max232 dan

More information

ELCT 912: Advanced Embedded Systems

ELCT 912: Advanced Embedded Systems ELCT 912: Advanced Embedded Systems Lecture 10: Applications for Programming PIC18 in C Dr. Mohamed Abd El Ghany, Department of Electronics and Electrical Engineering Programming the PIC18 to transfer

More information

Lampiran I. Rangkaian Lengkap Alat. Universitas Sumatera Utara

Lampiran I. Rangkaian Lengkap Alat. Universitas Sumatera Utara Lampiran I Rangkaian Lengkap Alat Lampiran II Program Pada Alat /***************************************************** This program was produced by the CodeWizardAVR V2.04.9 Evaluation Automatic Program

More information

Page 1 of 7. Samtron/Samsung 20S204DA2

Page 1 of 7. Samtron/Samsung 20S204DA2 Page 1 of 7 Samtron/Samsung 20S204DA2 Disclaimer This documentation based on try & error and should never be treated as official documentation. There is no guarantee that information listed in this document

More information

NIDEK AUTO REFRACTOMETER ARK-710A INTERFACE MANUAL

NIDEK AUTO REFRACTOMETER ARK-710A INTERFACE MANUAL NIDEK AUTO REFRACTOMETER ARK-710A INTERFACE MANUAL MRK4D*RTZ001B/E TOTAL PAGE: 32 2005. 2. 8 NIDEK CO., LTD. : 34-14, Maehama, Hiroishi-cho, Gamagori, Aichi 443-0038, Japan (Manufacturer) Telephone: (0533)

More information

Tutorial, Source code, Request Program Visual Basic

Tutorial, Source code, Request Program Visual Basic Tutorial, Source code, Request Program Visual Basic Oleh : Moh. A Azis Membuat Form Data Barang Program Persediaan Barang Form Data Barang digunakan untuk menyimpan data barang dan memberikan info mengenai

More information

LAMPIRAN A PROGRAM FLOWSTONE

LAMPIRAN A PROGRAM FLOWSTONE LAMPIRAN A PROGRAM FLOWSTONE A-1 Tampilan GUI pada FlowStone A-2 Program Tambahan yang Dibuat Untuk Membaca Frekuensi A-3 Program Tambahan yang Dibuat Untuk Menyimpan Data A-4 LAMPIRAN B PROGRAM VISUAL

More information

SOFTWARE UART MANAGEMENT

SOFTWARE UART MANAGEMENT Course on BASCOM AVR - (31) Theoretic/Practical course on BASCOM AVR Programming. Author: DAMINO Salvatore. SOFTWARE UART MANAGEMENT Sometimes it happens that an application requires more serial lines

More information

Dual Interface LCD Display Controller

Dual Interface LCD Display Controller Dual Interface LCD Display & Keypad Controller Product specification Nov 2013 V0.a ByVac Page 1 of 11 Contents 1. Introduction... 3 2. Features... 3 3. BV4618, Comparison... 3 3.1.1. BV4618... 3 3.1.2....

More information

Robosoft Systems in association with JNCE presents. Swarm Robotics

Robosoft Systems in association with JNCE presents. Swarm Robotics Robosoft Systems in association with JNCE presents Swarm Robotics What is a Robot Wall-E Asimo ABB Superior Moti ABB FlexPicker What is Swarm Robotics RoboCup ~ 07 Lets Prepare for the Robotics Age The

More information

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016 McMaster University Embedded Systems Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016 Serial Peripherals I2C Inter-IC Bus X/Y Coord. RGB data LCD config controller LCD data controller

More information

How2Use DT-51 AT89C51XXX BMS. By: IE Team. Picture1 The layout of DT-51 AT89C51XXX BMS

How2Use DT-51 AT89C51XXX BMS. By: IE Team. Picture1 The layout of DT-51 AT89C51XXX BMS DT-51 AT89C51XXX BMS Application Note By: IE Team This Application Note (AN) serves as a tutorial of how to use the DT-51 AT89C51XXX Bootloader Micro System along with its supplementary software. The layout

More information

LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya

LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya LAMPIRAN A FOTO Radio Control Helikopter dan Pengendalinya Tampak Atas A-1 Tampak Depan A-2 Tampak Samping A-3 Tampak Belakang A-4 Pengendali A-5 LAMPIRAN B PROGRAM PADA MICROSOFT VISUAL BASIC 6 DAN PENGONTROL

More information

BASCOM-8051 user manual

BASCOM-8051 user manual MCS Electronics, 1995-2007 BASCOM-8051 user manual Introduction by MCS Electronics Dear reader. Thank you for your interest in BASCOM. BASCOM was "invented" in 1995. It was intended for personal usage

More information

I/O232-A User s Guide

I/O232-A User s Guide rmv electronics I/O232-A User s Guide DISCLAIMER: RMV ELECTRONICS INC. does not assume any liability arising from the application and/or use of the product/s described herein, nor does it convey any license.

More information

Supplement for module D041 incl. ATMega8 Prozessor

Supplement for module D041 incl. ATMega8 Prozessor Supplement for module D041 incl. ATMega8 Prozessor V 1.4 16. March 2006 2006 by Peter Küsters This document is in copyright protected. It is not permitted to change any part of it. It is not permitted

More information

Dallas Semiconductor DS1307 Real Time Clock. The DS 1307 is a real-time clock with 56 bytes of NV (nonvolatile)

Dallas Semiconductor DS1307 Real Time Clock. The DS 1307 is a real-time clock with 56 bytes of NV (nonvolatile) Using the MC9S12 IIC Bus with DS 1307 Real Time Clock DS1307 Data Sheet Asynchronous Serial Communications The MC9S12 Serial Communications Interface (SCI) Dallas Semiconductor DS1307 Real Time Clock The

More information

E-Module: GLCD+RTC Combo Datasheet

E-Module: GLCD+RTC Combo Datasheet E-Module: GLCD+RTC Combo Datasheet v1.1 Copyright 2008 AIS Cube. All rights reserved. The FlamingICE(FI) and FIDE are either registered trademarks or trademarks of AIS Cube in Singapore and/or other countries.

More information

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6

C:\MasterPageWeb\HAPR\docu\HAPR_VB6_version15sept06.rtf 19/10/08. HARP_VB projet en VB6 HARP_VB projet en VB6 Option Explicit Dim Value As Integer Dim i As Integer Dim il As Long Dim LL, L1S, L250µS, L500µS, L1mS, L2mS, L5mS, L10mS As Single Dim offsetdepart As Long Dim police(256, 8) As

More information

LISTING PROGRAM. Form Splash

LISTING PROGRAM. Form Splash LISTING PROGRAM Form Splash Private Sub Form_Load() lblversion.caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision lblproductname.caption = App.Title lblcopyright.caption = App.LegalCopyright

More information

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A : LISTING PROGRAM LAMPIRAN A : LISTING PROGRAM 1. frmmenu.frm Dim CN As Connection Dim rshapus As Recordset Private Sub DfaHasil_Click() Call frmlap.cetak Private Sub Form_Load() Set CN = New ADODB.Connection CN.ConnectionString

More information

Serial:UART/I2C/SPI Text LCD Display Control Module. LCDSP_TG V1.60 user manual

Serial:UART/I2C/SPI Text LCD Display Control Module. LCDSP_TG V1.60 user manual Serial:UART/I2C/SPI Text LCD Display Control Module Product picture: In order to use a Text LCD display, you need connect at least 4 data pins and 2 control pins from your circuit to display, and you also

More information

BASCOM51. Quick Start Guide

BASCOM51. Quick Start Guide BASCOM51 Quick Start Guide Date: 23 December, 2010 Document Revision: 1.01 BiPOM Electronics Telephone : 1-713-283-9970 E-mail : info@bipom.com Web : www.bipom.com 2010 by BiPOM Electronics. All rights

More information

Supplement for module D061 incl. ATMega128 Prozessor

Supplement for module D061 incl. ATMega128 Prozessor Supplement for module D061 incl. ATMega128 Prozessor V 1.3 16. March 2006 2006 by Peter Küsters This document is in copyright protected. It is not permitted to change any part of it. It is not permitted

More information

19.1. Unit 19. Serial Communications

19.1. Unit 19. Serial Communications 9. Unit 9 Serial Communications 9.2 Serial Interfaces Embedded systems often use a serial interface to communicate with other devices. Serial implies that it sends or receives one bit at a time. µc Device

More information

µpad: Microprocessor for Academic Development

µpad: Microprocessor for Academic Development µpad: Microprocessor for Academic Development Last Updated May 13, 2015 Figure 1: µpad Top Figure 2:µPAD Bottom Table of Contents WARNING: READ BEFORE PROCEDING!... 4 Overview... Error! Bookmark not defined.

More information

LPTCOM. Bruce Misner Lakehead University h d3 RD2 pin 21. RD3 pin h d4. RD4 pin 27 RD5 pin h d5. RD6 pin 29 RD7 pin H d6

LPTCOM. Bruce Misner Lakehead University h d3 RD2 pin 21. RD3 pin h d4. RD4 pin 27 RD5 pin h d5. RD6 pin 29 RD7 pin H d6 LPTCOM By Bruce Misner Lakehead University LPTCOM is a demonstration of a robust bi-directional communcation between the PIC microcontroller and the printer port of your PC. Incorporating more handshaking

More information

PROGRAM 1: SIMPLE CALCULATOR

PROGRAM 1: SIMPLE CALCULATOR PROGRAM 1: SIMPLE CALCULATOR Option Explicit Dim operand1 As Double, operand2 As Double Dim op1 As Double, op2 As Double Dim operator As String Dim cleardisplay As Boolean Private Sub Cmdclear_Click()

More information

GM 500A Mifare Read/Write Module V1.0 GM 500A Mifare 13.56MHz Read/Write Protocols Interface (I2C/UART) User s Manual

GM 500A Mifare Read/Write Module V1.0 GM 500A Mifare 13.56MHz Read/Write Protocols Interface (I2C/UART) User s Manual GM 500A Mifare 13.56MHz Read/Write Protocols Interface (I2C/UART) User s Manual CHAPTER 1. INTRODUCTION TO THE DMLPC2148A.Net DEVELOPMENT BOARD INTRODUCTION GM 500A Contactless card Read/Write module was

More information

PIC Simulator IDE BASIC Compiler Reference Manual

PIC Simulator IDE BASIC Compiler Reference Manual PIC Simulator IDE BASIC Compiler Reference Manual Table Of Contents: General info Show Warnings, Do Not Compile Unused Code, Initialize Variables On Declaration, About variables Dim, As, Bit, Byte, Word,

More information

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580

LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F4580 LABORATORY MANUAL Interfacing LCD 16x2, Keypad 4x4 and 7Segment Display to PIC18F458 1. OBJECTIVES: 1.1 To learn how to interface LCD 16x2, Keypad 4x4 and 7Segment Display to the microcontroller. 1.2 To

More information

BV4531U. I2C or Serial 6 Way Relay

BV4531U. I2C or Serial 6 Way Relay BV4533 Date February 2018 11 Feb. 2018 Firmware Revision 1.0.4 Preliminary 1.1.0 Serial Updated I2C or Serial 6 Way Relay 3 Sep. 2018 1.1.0 I2C corrections, trigger is not used Introduction This is an

More information

Timer0..Timer3. Interrupt Description Input Conditions Enable Flag

Timer0..Timer3. Interrupt Description Input Conditions Enable Flag Timer0..Timer3 Timers are pretty useful: likewise, Microchip provides four different timers for you to use. Like all interrupts, you have to Enable the interrupt, Set the conditions of the interrupt, and

More information

General. Copyright 2013 EXSEN Company. All Rights Reserved. Rev /5/2013 Page 1 of 6

General. Copyright 2013 EXSEN Company. All Rights Reserved. Rev /5/2013 Page 1 of 6 General World smallest and economic solid state electrochemical CO 2 sensor has been developed for the production. It holds many patents in the structure and the materials of the sensor as well as the

More information

NHD C12864MZ NSW BTW. COG (Chip On Glass) Liquid Crystal Display Module

NHD C12864MZ NSW BTW. COG (Chip On Glass) Liquid Crystal Display Module NHD C12864MZ NSW BTW COG (Chip On Glass) Liquid Crystal Display Module NHD Newhaven Display C12864 128 x 64 pixels MZ Model N Transmissive SW Side White LED backlight B STN Blue ( ) T 12:00 view W Wide

More information

M32 Development Board

M32 Development Board M32 Development Board User Guide Document Control Information This Document Release Date: 12th March 2006 This Document Version: 1.0 Document History Author Release Date Reference Release Notes JSL 23rd

More information

L A M P I R A N. Universitas Sumatera Utara

L A M P I R A N. Universitas Sumatera Utara L A M P I R A N Form 1 '====================================================== 'SUHU FLUIDA : ' Suhu 10 C Const a1 = 0.9998 Const B1 = 1.307 Const C1 = 0.01251 ' Suhu 20 C Const a2 = 0.9983 Const B2 =

More information

QSFP Breakout. Data Sheet. Datasheet QSFP Breakout. 1 Overview. Table of Contents. 2 Features

QSFP Breakout. Data Sheet. Datasheet QSFP Breakout. 1 Overview. Table of Contents. 2 Features 1 Overview The is an interface board designed to connect the high speed lines of a QSFP module to SMA connectors for test and evaluation. In addition to high speed breakout, the unit can be controlled

More information

2 in 1. EasyAVR4 User s Manual AVR. MikroElektronika. Software and Hardware solutions for Embedded World

2 in 1. EasyAVR4 User s Manual AVR. MikroElektronika. Software and Hardware solutions for Embedded World SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD - Books - Compilers User s Manual 2 in 1 2.0 IN-CIRCUIT PROGRAMMER ATMEL AVR DEVELOPMENT BOARD With useful implemented peripherals, plentiful practical

More information

Ready-Set-Go (RSG) Controller: Getting Starter

Ready-Set-Go (RSG) Controller: Getting Starter Ready-Set-Go (RSG) Controller: Getting Starter 1. SETTING UP HYPERTERMINAL FOR THE RSG CONTROLLER 2 1.1 Hardware Setup 2 1.2 Software Setup: Configuring Hyperterminal 2 1.3 Troubleshooting the Installation

More information

LCD Micro Serial/I 2 C Interface Module for R.G.B backlights. Technical Data

LCD Micro Serial/I 2 C Interface Module for R.G.B backlights. Technical Data LCD Micro Serial/I 2 C Interface Module for R.G.B backlights Technical Data DS-LCDD5 Features Supports new LCD panels with RGB backlights*. Micro size (53 x 29mm) to piggy-back on the LCD module and form

More information

CONNECTION TO A HOST COMPUTER

CONNECTION TO A HOST COMPUTER CONNECTION TO A HOST COMPUTER Foreword: Hardware data The Communication between the CUBE30TOUCH and an external PC may be done in two possible ways: 1- Using a USB connection: Connect a standard A-B USB

More information

Communication interfaces

Communication interfaces Communication interfaces Emphasis on serial interfaces Parallel link Unit 2 Unit Serial link Unit 2 Unit Skew in parallel link Risk of missreading 2 Unbalanced link One signal line Ground Balanced link

More information

Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD

Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD Application Note Interfacing Z8 Encore! XP MCUs with an I 2 C-Based Character LCD AN014902-1207 Abstract This Application Note describes APIs for interfacing one or more I 2 C-based character LCDs with

More information

XS S ERIES TM PMB US TM O PTION C ARD

XS S ERIES TM PMB US TM O PTION C ARD XS Series PMBus Option Card XS S ERIES TM PMB US TM O PTION C ARD Document: 40110r01 1 Contents 1 Introduction 4 2 Option Card Connectors 4 2.1 PMBus Address..............................................

More information

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this? Introduction the Serial Communications Huang Sections 9.2, 10.2, 11.2 SCI Block User Guide SPI Block User Guide IIC Block User Guide o Parallel vs Serial Communication o Synchronous and Asynchronous Serial

More information

Serial Communications

Serial Communications Serial Communications p. 1/2 Serial Communications Prof. Stephen A. Edwards sedwards@cs.columbia.edu Columbia University Spring 2007 Early Serial Communication Serial Communications p. 2/2 Data Terminal

More information

SC168MBM 16x8 Characters MODBUS MASTER LCD

SC168MBM 16x8 Characters MODBUS MASTER LCD Product Description SC168MBM is a programmable LCD that serve as MASTER RTU MODBUS device. It reads and display registers values from MODBUS Slave devices through its RS485 port. The LCD can be configured

More information

The ActiveX Interface of Facon Communication Server

The ActiveX Interface of Facon Communication Server The ActiveX Interface of Facon Communication Server (Doc.V1.0 05/13/2003) Methods OpenProject SaveProject Connect Disconnect AddGroup EditGroup DeleteGroup AddItem DeleteItem GetItem SetItem Description

More information

Win-I2CNTDLL. I²C and SMBus Control DLL User s Manual. Version 4

Win-I2CNTDLL. I²C and SMBus Control DLL User s Manual. Version 4 I²C and SMBus Control DLL User s Manual Version 4 Date: February 16, 2004 Information provided in this document is solely for use with Win-I2CNTDLL. SB Solutions reserves the right to make changes or improvements

More information

LCD Module with I2C / Serial Interface and Keypad Control «LCD I2C/Serial» User s Guide. Copyright 2008 IMS

LCD Module with I2C / Serial Interface and Keypad Control «LCD I2C/Serial» User s Guide. Copyright 2008 IMS LCD Module with I2C / Serial Interface and Keypad Control «LCD I2C/Serial» User s Guide Copyright 2008 IMS CONTENTS 1 INTRODUCTION... 3 2 MODULE CONNECTION... 3 2.1 I2C/Serial interface connector...4 2.2

More information

// Voltage Reference: AREF pin #define ADC_VREF_TYPE ((0<<REFS1) (0<<REFS0) (0<<ADLAR))

// Voltage Reference: AREF pin #define ADC_VREF_TYPE ((0<<REFS1) (0<<REFS0) (0<<ADLAR)) 44 Lampiran 1 Listing program dari seluruh sistem. /****************************************************** * This program was created by the CodeWizardAVR V3.12 Advanced Automatic Program Generator Copyright

More information

LCD2041 Technical Manual. Revision: 2.1

LCD2041 Technical Manual. Revision: 2.1 LCD2041 Technical Manual Revision: 2.1 Contents Contents ii 1 Getting Started 1 1.1 Display Options Available................................... 1 1.2 Accessories...........................................

More information

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 CONTENTS dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 Switches and Jumpers 7 MCU Sockets 8 Power Supply 10 On-Board USB 2.0 Programmer 11 MikroICD 12 RS-232 Communication Circuit 13

More information

HuddleCamHD RS-232 Joystick Controller Model Number: HC-JOY

HuddleCamHD RS-232 Joystick Controller Model Number: HC-JOY HuddleCamHD RS-232 Joystick Controller Model Number: HC-JOY JOYSTICK KEYBOARD INSTALLATION & OPERATION MANUAL Rev 1.0 6/15 Easy pan, tilt & zoom controls for any RS-232 VISCA protocol camera! Controls

More information

LAMPIRAN A. I. Gambar alat percobaan I.1. Power supply. 1. Rangkaian sekunder 2. Dioda. 3. Heatsink 4. Power supply (keseluruhan)

LAMPIRAN A. I. Gambar alat percobaan I.1. Power supply. 1. Rangkaian sekunder 2. Dioda. 3. Heatsink 4. Power supply (keseluruhan) 100 I. Gambar alat percobaan I.1. Power supply LAMPIRAN A 1. Rangkaian sekunder 2. Dioda 3. Heatsink 4. Power supply (keseluruhan) 101 I.2 Gambar bagian bagian alat pemanas induksi 1. Kumparan Solenoide

More information

DIGITAL HUMIDITY SENSOR HYT-131

DIGITAL HUMIDITY SENSOR HYT-131 Rights reserved for change in technical data! B+B Thermo-Technik GmbH Postfach 1748 D-78158 Donaueschingen Phone: +49 771 8316-622 Fax: +49 771 8316-629 DIGITAL HUMIDITY SENSOR 1. Features - On-Chip humidity

More information

AVR 40 Pin Rapid Robot controller board

AVR 40 Pin Rapid Robot controller board AVR 40 Pin Rapid Robot controller board User Manual Robokits India http://www.robokits.org info@robokits.org - 1 - Thank you for purchasing the AVR 40 Pin Rapid Robot controller board. This unit has been

More information

Quick Reference Guide

Quick Reference Guide SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD mikroelektronika Development tools - Books - Compilers Quick Reference Quick Reference Guide with EXAMPLES for Basic language This reference guide

More information

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara 61 LAMPIRAN 61 Listing Program Form 1 ( Barang ) Dim CnSuzuya As ADODB.Connection Dim CommBar As ADODB.Command Dim rsbar As ADODB.Recordset Dim StrSql As String Dim psn As Byte Private Sub Form_Load()

More information

LAMPIRAN. Universitas Sumatera Utara

LAMPIRAN. Universitas Sumatera Utara LAMPIRAN 35 Features 2. High-performance, Low-power AVR 8-bit Microcontroller 3. Advanced RISC Architecture 131 Powerful Instructions Most Single-clock Cycle Execution 32 x 8 General Purpose Working Registers

More information

Rev Carbon Dioxide (CO2) Gas Sensor. TG100 User Manual

Rev Carbon Dioxide (CO2) Gas Sensor. TG100 User Manual Rev. 2.5 TG100 User Manual The TG100 measuring carbon dioxide (chemical formula CO2) is a NDIR (Non-Dispersive Infrared) gas sensor. As it is contactless, it has high accuracy and longer life than sensors

More information

CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 CONTENTS BIGAVR2 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6 Switches 7 Jumpers 8 MCU Sockets 9 Power Supply 11 On-board USB 2.0 Programmer 12 Oscillator 14 LEDs 15 Reset Circuit 17 Push-buttons

More information

BV4626 General Purpose I/O. Product specification. Mar 2010 V0.a. ByVac Page 1 of 13

BV4626 General Purpose I/O. Product specification. Mar 2010 V0.a. ByVac Page 1 of 13 General Purpose I/O Product specification Mar 2010 V0.a ByVac Page 1 of 13 Contents 1. Introduction... 3 2. Features... 3 3. Physical Specification... 3 3.1. JP7... 3 3.2. Control Interface... 4 3.3. Serial

More information

ECE 511 Project Group 11: MP3 Boombox 12/03/2013. Carlos R Araujo Divya Chinthalapuri Leegia S Jacob Brian D Jarvis Shawn Wilkinson

ECE 511 Project Group 11: MP3 Boombox 12/03/2013. Carlos R Araujo Divya Chinthalapuri Leegia S Jacob Brian D Jarvis Shawn Wilkinson ECE 511 Project Group 11: MP3 Boombox 12/03/2013 Carlos R Araujo Divya Chinthalapuri Leegia S Jacob Brian D Jarvis Shawn Wilkinson Motivation A toy in the entertainment genre: With the use of a single

More information

Logosol Joystick Node LS-731

Logosol Joystick Node LS-731 Features 2 and 3 axis models Travel ±20 deg Non contact hall effect joystick Mechanical MTBF 15,000,000 cycles 3 pushbuttons Up to 2 stick pushbuttons 8 LEDs Member of Logosol s distributed motion control

More information

2 in 1. BigAVR User s Manual AVR. MikroElektronika. Software and Hardware solutions for Embedded World

2 in 1. BigAVR User s Manual AVR. MikroElektronika. Software and Hardware solutions for Embedded World SOFTWARE AND HARDWARE SOLUTIONS FOR THE EMBEDDED WORLD - Books - Compilers User s Manual 2 in 1 USB 2.0 IN-CIRCUIT PROGRAMMER ATMEL AVR DEVELOPMENT BOARD With useful implemented peripherals, plentiful

More information

SC2004MBS 20x4 Characters MODBUS RTU Slave LCD

SC2004MBS 20x4 Characters MODBUS RTU Slave LCD SC004MBS 0x4 Characters MODBUS RTU Slave SC004MBS is a MODBUS slave device that receives data from a Master MODBUS device and display them on the panel. The is 0 x 4 characters in size and each character

More information

Serial Communications

Serial Communications 1 Serial Interfaces 2 Embedded systems often use a serial interface to communicate with other devices. Serial Communications Serial implies that it sends or receives one bit at a time. Serial Interfaces

More information

i³ Display, Control, Connect

i³ Display, Control, Connect Display, Control, Connect User Guide i 3 User Guide Introduction to i 3 2 Guide to Part Numbers 2 Installing i 3 Configurator Software 3 Powering up and Connecting to an i 3 6 Tour of the i 3 Configurator

More information

ambient XC RS232 Control Command Specification

ambient XC RS232 Control Command Specification ambient XC RS232 Control Command Specification Table of Contents ambient XC RS232 Control Command Specification...1 Goal...2 COM port properties...2 Initialisation of RS232 communication...2 Determine

More information

Embedded Systems and Software. LCD Displays

Embedded Systems and Software. LCD Displays Embedded Systems and Software LCD Displays Slide 1 Some Hardware Considerations Assume we want to drive an LED from a port. The AVRs can either source or sink current. Below is a configuration for sourcing.

More information

Enviro Series. Printer Addendum. Printers available from Fairbanks Scales A Tape Printer. Enviro DB25...

Enviro Series. Printer Addendum. Printers available from Fairbanks Scales A Tape Printer. Enviro DB25... Enviro Series Printer Addendum 0596-0317-01 A Hardy s Enviro Series checkweighing instruments can be connected to a variety of serial printers and remote displays via the serial communications port. Recommended

More information

Citect for Windows Driver Specification Extract

Citect for Windows Driver Specification Extract Citect for Windows Driver Specification Extract Trio Driver Author: Philip Wong Date: 16/6/95 Modified: David Rossini Date: 17/02/98 Contents 1. TARGET DEVICE...4 1.1 INTRODUCTION...4 1.2 DEVICE MANUFACTURER...4

More information

NITGEN FIM5360. Datasheet FIM5360. Version Supported Firmware Version: 1.11 or above

NITGEN FIM5360. Datasheet FIM5360. Version Supported Firmware Version: 1.11 or above NITGEN FIM5360 Stand-Alone Fingerprint Identification Device with Built-in CPU Datasheet Supported Firmware Version: 1.11 or above Version 1.04 NITGEN Page: 1 Copyright 2011 NITGEN Co., Ltd. ALL RIGHTS

More information

User's Guide. Programmable DC Power Supply 200 Watt (40 Volts / 5 Amps) Model Introduction

User's Guide. Programmable DC Power Supply 200 Watt (40 Volts / 5 Amps) Model Introduction User's Guide Programmable DC Power Supply 200 Watt (40 Volts / 5 Amps) Model 382280 382280 Introduction Congratulations on your purchase of the Extech 382280 Programmable DC Power Supply. This 200 watt

More information

ALCD (Advance LCD) SERIES

ALCD (Advance LCD) SERIES ALCD (Advance LCD) SERIES INTRODUCTION ALCD is Serial LCD module controlled through Serial communication. Most of existing LCD adopts Parallel communication, which needs lots of control lines and complicated

More information

NHD-0216K3Z-NS(RGB)-FBW-V3

NHD-0216K3Z-NS(RGB)-FBW-V3 NHD-0216K3Z-NS(RGB)-FBW-V3 Serial Liquid Crystal Display Module NHD- Newhaven Display 0216-2 Lines x 16 Characters K3Z- Model N- Transmissive S(RGB)- Side LED Backlights (Red-Green-Blue) F- FSTN(-) B-

More information

MCP2120/MCP2150 DEVELOPER S KIT USER S GUIDE

MCP2120/MCP2150 DEVELOPER S KIT USER S GUIDE MCP2120/MCP2150 DEVELOPER S KIT USER S GUIDE Information contained in this publication regarding device applications and the like is intended by way of suggestion only. No representation or warranty is

More information

Explorer V1.20. Features

Explorer V1.20. Features V1.20 Multi-function USB I/O Expander and Controller Features Dual h-bridge 1.3A motor drive with PWM speed control 4.6V to 10.8V input range USB communication 4x digital inputs 2x analogue inputs 7x 100mA

More information

Real Time Clock with Temperature Sensor and RS485/Modbus Comunications

Real Time Clock with Temperature Sensor and RS485/Modbus Comunications Real Time Clock with Temperature Sensor and RS485/Modbus Comunications April 29, 2014 Power 8 20 VDC @ less than 100 MA. Battery connect jumper RS485 Bus Load Jumpers Model: RTC-TI2C Page 1 of 6 Features:

More information

Module 2: Introduction to AVR ATmega 32 Architecture

Module 2: Introduction to AVR ATmega 32 Architecture Module 2: Introduction to AVR ATmega 32 Architecture Definition of computer architecture processor operation CISC vs RISC von Neumann vs Harvard architecture AVR introduction AVR architecture Architecture

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Microcontroller Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor

More information

J-CC Data Cable. Operating Instructions

J-CC Data Cable. Operating Instructions J-CC Data Cable Operating Instructions User's manual for OPTO-RS cable connections General The OPTO-RS cable enables a direct connection with most of the Käfer measuring instruments to a personal computer,

More information

Serial Communications

Serial Communications Serial Communications p. 1/2 Serial Communications CSEE W4840 Prof. Stephen A. Edwards Columbia University Early Serial Communication Serial Communications p. 2/2 Data Terminal Equipment Serial Communications

More information

Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN

Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN-2010-96 Data Acquisition over Ethernet using Serial Device Server - NPort 5210 PRL-TN-2010-96 Introduction 1 Serial Device

More information

Rev Carbon Dioxide (CO2) Gas Sensor. TG100 User Manual

Rev Carbon Dioxide (CO2) Gas Sensor. TG100 User Manual Rev. 2.93 TG100 User Manual The TG100 measuring carbon dioxide (chemical formula CO2) is a NDIR (Non-Dispersive Infrared) gas sensor. As it is contactless, it has high accuracy and longer life than sensors

More information