;; (c) david vajda ;; 07/21/2026 ;; m8 oszi count, wait loop .include "m8def.inc" ldi r16, HIGH (RAMEND) out SPH, r16 ldi r16, LOW (RAMEND) out SPL, r16 ldi r16, 0xff out DDRB, r16 ldi r16, 0x00 main001: out PORTB, r16 rcall waitloop001 inc r16 rjmp main001 waitloop001: nop nop nop nop nop nop nop nop nop ret ;; taktlaengen: main001: out PORTB, r16 ;; out: 1 ;; rcall waitloop001 ;; rcall: 3 ;; inc r16 ;; inc: 1 ;; rjmp main001 ;; rjmp: 2 ;; 1 + 3 + 1 + 2 = 7 ;; man koennte rcall weg machen, es sind 4: und wg. 5: nop ;; aber nein: ;; ret ;; ret: 4 ;; zusammen: 11 ;; und auf: 1MHz/20CLK = 50 kHz ;; wg. 11: 9 nop ;; jetzt time/div: ;; pro (1/50kHz) = (time/div) = ;; 2 * 5 = 10 ;; 0.2 * 5 = 1 ;; 0.02 * 50 = 1 ;; also: 0.02, ...