So, mal schaun wieviel der Code hergibt:
Code:
$regfile = "2313def.dat"
$crystal = 10000000
$baud = 9600
Dim Hi As Byte
Dim Lo As Byte
Dim Zeit As Byte
Config Pind.2 = Output
Config Timer1 = Timer , Prescale = 1
Enable Interrupts
On Timer1 Icnr Nosave
Enable Timer1
Timer1 = 65526
Hi = 1
Lo = 1
Do
Input "High x mal 1us: " , Hi
Input "Low x mal 1us: " , Lo
Loop
Icnr:
Push r0
push r4
push r15
push r16
push r19
push r20
Incr Zeit
If Zeit = Hi Then
Swap Hi , Lo
Zeit = 0
Portd.2 = Not Pind.2
End If
Timer1 = 65526
pop r20
pop r19
pop r16
pop r15
Pop r4
pop r0
Return
...leider werd ich erst am Freitag dazu kommen, die max. Frequenz zu ermitteln!
Lesezeichen