Hallo
ich bin auch der meinung das es mit dem ICP wesendlich einfacher ist.
hier ein kleines Beispiel.
Du brauchst es nur Deinen wuenschen anzupassenCode:'-------------------------------------- $regfile = "m32def.dat" $crystal = 16000000 $baud = 115200 Dim Wcount As Word On Icp1 Oncapture 'Interrupt-Routine Config Timer1 = Timer , Prescale = 256 , Capture Edge = Rising Enable Icp1 'Capture-Interrupt Enable Interrupts 'Interrupts global Main: 'Hauptschleife Goto Main '-------------------------------------- Oncapture: 'Timer1-Capture Wcount = Timer1 'Erst Wert sichern Timer1 = 0 'Sofort Timer-Reset Print Wcount ; " "; Return
Gruß raggy







Zitieren

Lesezeichen