Hallo
Mit US habe ich noch nichts gemacht, deshalb ist die Frage vielleicht blöd. Warum macht ihr es nicht so?
GrußCode:Disable Int0 do 'Beginn Hauptprogramm Do 'Warten auf Tastendruck (PB4 nach GND) Debounce Pinb.4 , 0 , Start_mit_burst Loop Start_mit_burst: Endtime = 0 For Pulsecount = 1 To 16 '16 Pulse erzeugen (Burst mit ca 41kHz) Reset Portb.1 Waitus 11 Set Portb.1 Waitus 11 Next Pulsecount Disable Interrupts ' kann auch bei der Zeitmessung nicht schaden While Pinb.0 = 0 Incr Endtime Wend Call Display_value(endtime) 'Meßzeitausgabe über 7 Segmentanzeige Enable Interrupts While Pinb.0 = 1 Wend Loop 'Loop Hauptprogramm
mic







Zitieren
Hoffentlich liegt das Ziel auch am Weg 


Lesezeichen