kannst auch mit pwm antreiben, ist störungsfreier.
ich erhalte bei 360grad-drehung einen wert von 1180 ,sind ca 1/3 grad und das reicht : atmega32 8 mhz
Code:Config Timer1 = Timer , Prescale = 256 Dim W As Word Dim E As Word Enable Interrupts Do Waitms 200 Bitwait Pinc.2 , Reset Bitwait Pinc.2 , Set W = Timer1 Bitwait Pinc.2 , Reset E = Timer1 - W Print E Loop End
Lesezeichen