Kommentar: Einfügen von HTML im Kommentar: Link einfügen: <a href="LINKURL" target="_blank">LINKTITEL</a> Bild einfügen: <img src="BILDURL"> Text formatieren: <b>fetter Text</b> <i>kursiver Text</i> <u>unterstrichener Text</u> Kombinationen sind auch möglich z.B.: <b><i>fetter & kursiver Text</i></b> C Quellcode formatieren: <code>Quellcode</code> BASIC Quellcode formatieren: <basic>Quellcode</basic> (Innerhalb eines Quellcodeabschnitts ist kein html möglich.) Wichtig: Bitte mache Zeilenumbrüche, bevor Du am rechten Rand des Eingabefeldes ankommst ! -> I > > Hi Torsten, > > > > I would not know how one could realize the solution you suggest: "der Input-Capture Interrupt den > > Overflow-Interrupt-Zähler umschaltet". But have you already considered another, rather pragmatic > > solution? One could use another timer to make a rough estimation of the period time and use that > > value together with the value of the Input Capture Register to calculate an accurate value of the > > period time. > > > > Period time measurement with prescaler PS_1 has a range of 65536 * 67.8 ns = 4.44 ms. > > Therefore the period time equals the value of the Input Capture Register + n * 4.44 ms. If one sets > > up another timer to increase a variable say every 1 ms, one could use its value in the PM IRQ > > function to determine the value of n. > > > > As said, a pragmatic solution, not elegant and not absolutely fail safe. Maybe you discarded it > > already. I think it will work in a simple program but probably not in a complex program that > > consumes processor time in chunks of more than 1 ms. > > > > Regards, > > Pepe > > Hi Pepe, > > do you have an code-example for your suggestion? > The first timer runs in normal mode. > So he is not reset at an input-capture event. > The second timer does not know anything about the first timer. > At the moment i would not know any solution there. > The accuracy of the time measurement is only > restricted by the system clock. > The C control user becomes not this possibility for > longer time measurements. > An important condition would be the possibility > to be able to write assembler interrupt functions. > > Regards Torsten >