das geht so:
Code:
$regfile = "m644def.dat"
$framesize = 32
$swstack = 32
$hwstack = 32
$crystal = 20000000
$baud = 9600
' ----- Empfänger -----
Dim Kanal_nick As Integer
Dim Kanal_roll As Integer
Dim Kanal_yaw As Integer
Dim Kanal_pitch As Integer
Dim Kanal_nick_check(3) As Integer
Dim Kanal_roll_check(3) As Integer
Dim Kanal_yaw_check(3) As Integer
Dim Kanal_pitch_check(3) As Integer
Dim Kanal_nick_init As Integer
Dim Kanal_roll_init As Integer
Dim Kanal_yaw_init As Integer
Dim Kanal_pitch_init As Integer
Dim Puls(8) As Integer
Dim Kanal As Byte
Dim Empfaenger_ok(4) As Byte
'-----------Interupts----------
On Icp1 Get_empfaenger Nosave ' ICP fuer Funke
On Ovf1 Kanal_reset Nosave
Config Timer1 = Timer , Prescale = 8 , Capture Edge = Falling
Enable Ovf1
Enable Icp1
Enable Interrupts
'...
'blablablabalbal... codecode
'...
'------------Interupts--------------- ' FUnke am ICP interrup
Get_empfaenger:
push r10
push r11
push r24
push r25
push r26
push r27
in r24,sreg
push r24
Puls(kanal) = Timer1
Timer1 = 40000
Incr Kanal
pop r24
!Out Sreg , R24
pop r27
pop r26
pop r25
pop r24
pop r11
pop r10
Return
Kanal_reset:
push r24
in r24,sreg
push r24
Kanal = 1
pop r24
!Out sreg,r24
pop r24
Return
End
Die Signale sind alle am anfang von dem Signal, das erste nach der langen Pause ist also kanal 1 usw...
Bild hier
[/code]
Lesezeichen