witam wszystkich jestem początkujący w programowaniu uC i dla tego mam mały problem a mianowicie chciałbym aby na wyświetlaczy pokazywała mi sie temperatura a przy okazji można był sterować różnymi urządzeniami za pomocą pilota RC5
podczas kompilacji w bascom-avr wersja demo program wywala mi błąd
error: 61 line: 176 label not found [_printsdecw]
i nie bardzo wiem jak sobie z nim poradzić a oto program bascom
Proszę umieszczać listingi programów w znacznikach "Code". [c_p]
podczas kompilacji w bascom-avr wersja demo program wywala mi błąd
error: 61 line: 176 label not found [_printsdecw]
i nie bardzo wiem jak sobie z nim poradzić a oto program bascom
$regfile = "m8def.dat"
$crystal = 1000000
$lib "mcsbyte.lbx"
Config Lcd = 16 * 2
Config Lcdpin = Pin , Db4 = Portb.0 , Db5 = Portb.1 , Db6 = Portb.2 , Db7 = Portb.3 , E = Portb.4 , Rs = Portb.5
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Config Pind.2 = Input
Config Rc5 = Pind.2
Config Portc.0 = Output
Config Portc.1 = Output
Config 1wire = Portd.5
Dim Adress As Byte , Command As Byte
Dim I1 As Integer , Ss As String * 6
Dim I2 As Integer
Dim Dsid1(8) As Byte
Dim Dsid2(8) As Byte
Dim B As Byte
Dim W As Byte
Dim A As Byte
Deflcdchar 0 , 8 , 20 , 11 , 4 , 4 , 4 , 3 , 32
Cls
W = 1wirecount()
Lcd "Ilosc czujnikow:"
Waitms 500
Lcd W
Wait 3
Cls
Dsid1(1) = 1wsearchfirst()
Dsid2(1) = 1wsearchnext()
If Dsid1(8) = Crc8(dsid1(1) , 7) Then
Locate 1 , 1
Lcd "OK Czujnik 1 ID"
Wait 1
Locate 1 , 1
For B = 1 To 8
Lcd Hex(dsid1(b))
Next
End If
Wait 2
If Dsid2(8) = Crc8(dsid2(1) , 7) Then
Locate 2 , 1
Lcd "OK Czujnik 2 ID"
Wait 1
Locate 2 , 1
For B = 1 To 8
Lcd Hex(dsid2(b))
Next
End If
Wait 2
Cls
Do
1wreset
1wwrite &H55
1wverify Dsid1(1)
1wwrite &HBE
I1 = 1wread(2)
'---------------------------------
1wreset
1wwrite &H55
1wverify Dsid2(1)
1wwrite &HBE
I2 = 1wread(2)
1wreset
1wwrite &HCC
1wwrite &H44
Wait 1
I1 = I1 * 10
I1 = I1 / 16
'If I1 > 0 Then
Ss = Str(i1)
Ss = Format(ss , "0.0")
Locate 1 , 1
Lcd "IN " ; Ss ; Chr(0) ;
I2 = I2 * 10
I2 = I2 / 16
'If I2 > 0 Then
Ss = Str(i2)
Ss = Format(ss , "0.0")
Locate 2 , 1
Lcd "OUT " ; Ss ; Chr(0) ;
Loop
Enable Interrupts
Do
Getrc5(adress , Command)
Command = Command And &B01111111
Cls
Waitms 100
If Adress = 0 And Command = 12 Then
Portc.0 = 0
Portc.1 = 0
Locate 2 , 13
Lcd " OFF"
Wait 1
End If
If Adress = 0 And Command = 16 Then
Portc.0 = 1
Locate 1 , 14
Lcd " ON"
Wait 1
End If
If Adress = 0 And Command = 17 Then
Portc.0 = 0
Locate 2 , 13
Lcd " OFF"
Wait 1
End If
If Adress = 0 And Command = 32 Then
Portc.1 = 1
Locate 1 , 14
Lcd " ON"
Wait 1
End If
If Adress = 0 And Command = 33 Then
Portc.1 = 0
Locate 2 , 13
Lcd " OFF"
Wait 1
End If
Loop
Proszę umieszczać listingi programów w znacznikach "Code". [c_p]