hi
hab folgendes problem:
möchte wie viele vor mir schon einen drehzahlmesser machen
jetzt hab ich auch ein prog geschrieben und zum teil geht es auch (sagt zumindest der simulator bei bascom).
da ich jedoch nicht nur einen interrupt verwenden möchte sondern auch nen zweiten (int0 und int1) hab ich jetzt dieses problem dass der zweite interrupt gar nicht geht (k.a.wieso???)
sieht jemand den fehler?
CU
Code:$regfile = "M32def.dat" $crystal = 8000000 'Timer Configuration Config Timer0 = Timer , Prescale = 256 Timer0 = 0 Start Timer0 'Interrupts Enable Interrupts Enable Int0 Enable Int1 Config Pind.2 = 1 Config Pind.3 = 1 On Ovf0 Timerinterrupt Nosave On Int1 Motorl_interrupt Nosave On Int0 Motorr_interrupt Nosave Timerinterrupt: Drehzahl1 = Intcounter0 Drehzahl2 = Intcounter1 Intcounter1 = 0 Intcounter0 = 0 Timer0 = 1 Return Do --------- Loop Motorr_interrupt: Intcounter1 = Intcounter1 + 1 Return Motorl_interrupt: Intcounter0 = Intcounter0 + 1 Return
Lesezeichen