Athlonxp2000
29.12.2006, 20:58
Tach ich versuch gerade ein paar Daten über ir zu schicken habe aber irgendwie kein Erfolg!
Mein IR Empfänger arbeitet mit 36khz.
Ist meine Code zur 36khz erzeugung richtig??
Sender Code:
$regfile = "2313def.dat"
$crystal = 8000000
$baud = 9600
Const T_oc1 = 110
Config Pinb.3 = Output
Config Pind.5 = Input
Portd.5 = 1
Config Timer1 = Timer , Prescale = 1 , Compare A = Toggle , Clear Timer = 1
Timer1 = 0
Compare1a = T_oc1 'Pb.3 = OC1 = IR carrier output 36 kHz
Dim Test1 As Byte
Dim Test2 As Byte
Test1 = 11
Test2 = 22
Do
If Pind.5 = 1 Then
Print Test1
Else
Print Test2
End If
Loop
Empfänger Code:
$regfile = "2313def.dat"
$crystal = 8000000
$baud = 9600
Config Pind.3 = Output
Led Alias Portd.5
Dim I As Byte
Do
I = Inkey()
If I = 11 Then
Led = 0
Else
Led = 1
End If
Loop
Ich hoff mir kann jemand helfen!?
MfG
Athlon
Mein IR Empfänger arbeitet mit 36khz.
Ist meine Code zur 36khz erzeugung richtig??
Sender Code:
$regfile = "2313def.dat"
$crystal = 8000000
$baud = 9600
Const T_oc1 = 110
Config Pinb.3 = Output
Config Pind.5 = Input
Portd.5 = 1
Config Timer1 = Timer , Prescale = 1 , Compare A = Toggle , Clear Timer = 1
Timer1 = 0
Compare1a = T_oc1 'Pb.3 = OC1 = IR carrier output 36 kHz
Dim Test1 As Byte
Dim Test2 As Byte
Test1 = 11
Test2 = 22
Do
If Pind.5 = 1 Then
Print Test1
Else
Print Test2
End If
Loop
Empfänger Code:
$regfile = "2313def.dat"
$crystal = 8000000
$baud = 9600
Config Pind.3 = Output
Led Alias Portd.5
Dim I As Byte
Do
I = Inkey()
If I = 11 Then
Led = 0
Else
Led = 1
End If
Loop
Ich hoff mir kann jemand helfen!?
MfG
Athlon