Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20577

BASCOM-AVR : [help] program is not working as it should : NEWTOPIC

$
0
0
initially created the program to turn the call and worked buzer well when tested: [quote:bad5cbd7a1]$regfile = "m8535.dat" $crystal = 12000000 Config Portb.0 = Output Portb.0 = 0 Dim A As Byte Do A = Inkey() If A > 0 Then Print "AT+CALM=a" ; A Portb.0 = 1 Wait 10 Portb.0 = 0 Wait 3600 End If Loop End[/quote:bad5cbd7a1] but after I combine their full program, turn the program through the call buzzer is directly readable without any prior call, please help roughly where does the fault, the following program: [quote:bad5cbd7a1]$regfile = "m8535.dat" $crystal = 12000000 $baud = 19200 Dim A As Byte Config Pina.0 = Input Config Pina.1 = Input Config Pina.2 = Input Config Portb.0 = Output Portb.0 = 0 Wait 20 Do '---------------------------------------- Porta.0 = 0 If Pina.0 = 1 Then Waitms 100 Portb.0 = 1 Gosub Kirim1 Wait 10 Else Portb.0 = 0 Waitms 500 End If '---------------------------------------- Porta.1 = 0 If Pina.1 = 1 Then Waitms 100 Portb.0 = 1 Gosub Kirim2 Wait 10 Else Portb.0 = 0 Waitms 500 End If '---------------------------------------- Porta.2 = 0 If Pina.2 = 1 Then Waitms 100 Portb.0 = 1 Gosub Kirim3 Wait 10 Else Portb.0 = 0 Waitms 500 End If '---------------------------------------- A = Inkey() If A > 0 Then Print "AT+CALM=a" ; A Portb.0 = 1 Waitms 50 Portb.0 = 0 Wait 3600 End If Loop End '---------------------------------------- Kirim1: Print "AT+CMGF=0" Wait 5 Print "AT+CMGS="; Print "47" Wait 1 Print "0691268144059011000D91265872040988F50000A724617218042FBBF3F5791D0E6A87E7F535885DBE87E92078DA4DAF83C86578D80D"; Print Chr(26); Print Chr(13); Print Chr(10); Print "AT+CMGF=0" Wait 5 Print "AT+CMGS="; Print "47" Wait 1 Print "0691268144059011000D91261862570530F40000A724617218042FBBF3F5791D0E6A87E7F535885DBE87E92078DA4DAF83C86578D80D"; Print Chr(26); Print Chr(13); Print Chr(10); Return '------------------------------------------- Kirim2: Print "AT+CMGF=0" 'PDU mode Wait 5 Print "AT+CMGS="; Print "49" 'panjang sms dalam PDU Wait 1 'tunggu hp siap Print "07912618485400F911000D91265872040988F50000A726617218042FBBF3F5791D0E6A87E7F535685D06D1DFEB37485E0FBBCFA075D81D7603"; 'smsc + pdu[ada penyusup masuk ke toko ruang kanan] Print Chr(26); 'Ctrl+Z[kirim sms] Print Chr(13); Print Chr(10); Print "AT+CMGF=0" 'PDU mode Wait 5 Print "AT+CMGS="; Print "49" 'panjang sms dalam PDU Wait 1 'tunggu hp siap Print "07912618485400F911000D91261862570530F40000A726617218042FBBF3F5791D0E6A87E7F535685D06D1DFEB37485E0FBBCFA075D81D7603"; 'smsc + pdu[ada penyusup masuk ke toko ruang kanan] Print Chr(26); 'Ctrl+Z[kirim sms] Print Chr(13); Print Chr(10); Return '-------------------------------------------- Kirim3: Print "AT+CMGF=0" 'PDU mode Wait 5 Print "AT+CMGS="; Print "48" 'panjang sms dalam PDU Wait 1 'tunggu hp siap Print "07912618485400F911000D91265872040988F50000A725617218042FBBF3F5791D0E6A87E7F535685D06D1DFEB37485E0FBBCFA0755A9E06"; 'smsc + pdu[ada penyusup masuk ke toko ruang kiri] Print Chr(26); 'Ctrl+Z[kirim sms] Print Chr(13); Print Chr(10); Print "AT+CMGF=0" 'PDU mode Wait 5 Print "AT+CMGS="; Print "48" 'panjang sms dalam PDU Wait 1 'tunggu hp siap Print "07912618485400F911000D91261862570530F40000A725617218042FBBF3F5791D0E6A87E7F535685D06D1DFEB37485E0FBBCFA0755A9E06"; 'smsc + pdu[ada penyusup masuk ke toko ruang kiri] Print Chr(26); 'Ctrl+Z[kirim sms] Print Chr(13); Print Chr(10); Return[/quote:bad5cbd7a1] [b:bad5cbd7a1][color=red:bad5cbd7a1](BASCOM-AVR version : 2.0.7.3 , Latest : 2.0.7.6 )[/b:bad5cbd7a1][/color:bad5cbd7a1]

Viewing all articles
Browse latest Browse all 20577

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>