From 083b3221a1b6f7804b36edae2c0387eaa0371e5c Mon Sep 17 00:00:00 2001 From: BrokenVoodooDoll Date: Wed, 22 Feb 2023 20:37:27 +0400 Subject: [PATCH] Format main.asm --- src/main.asm | 56 ++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/main.asm b/src/main.asm index 945c24d..3024334 100644 --- a/src/main.asm +++ b/src/main.asm @@ -2,41 +2,41 @@ ; Author: Maksim Vinogradov ; ;-----Ports setup----- - ldi r16, 0b10000000 - out DDRD, r16 - out PORTD, r16 + ldi r16, 0b10000000 + out DDRD, r16 + out PORTD, r16 ;-----Waiting for start signal----- -start: sbis PIND, 3 ; Check for sync pulse on the 3rd pin - rjmp start +start: sbis PIND, 3 ; Check for sync pulse on the 3rd pin + rjmp start -;-----Puls formation----- - - ldi r18, 5 ; Delay 210 us - ldi r19, 92 -delay: dec r19 - brne delay - dec r18 - brne delay +;-----Pulse formation----- + + ldi r18, 5 ; Delay 210 us + ldi r19, 92 +delay: dec r19 + brne delay + dec r18 + brne delay - ldi r19, 11 ; Setup 11 pulses + ldi r19, 11 ; Setup 11 pulses -pulses: cbi PORTD, 7 ; Setup 1 onto the 7th pin - - ldi r18, 13 ; Delay 2.6 us -pause1: dec r18 - brne pause1 +pulses: cbi PORTD, 7 ; Setup 1 onto the 7th pin + + ldi r18, 13 ; Delay 2.6 us +pause1: dec r18 + brne pause1 - sbi PORTD, 7 ; Setup 0 onto the 7th pin + sbi PORTD, 7 ; Setup 0 onto the 7th pin - ldi r18, 33 ; De;ay 6.5 us -pause2: dec r18 - brne pause2 + ldi r18, 33 ; Delay 6.5 us +pause2: dec r18 + brne pause2 - dec r19 - brne pulses + dec r19 + brne pulses ;-----Waiting for the end of the start signal----- -wait: sbic PIND, 3 ; Check for the end of the sync pulse on the 3rd pin - rjmp wait - rjmp start +wait: sbic PIND, 3 ; Check for the end of the sync pulse on the 3rd pin + rjmp wait + rjmp start