.INCLUDE "tn26def.inc"
.DEF stack = R16
.DEF temp = R19
.DEF temp2 = R20
.DEF temp3 = R21
.CSEG
.ORG 000
rjmp Start
Delay: ;Pause für 20ms
ldi temp3, 102
Dlyloop2:
ldi temp2, 3
DlyLoop1:
ldi temp, 11
DlyLoop:
dec temp
brne DlyLoop
sbi pinA, 0 ;H-sync
cbi pinA, 0
dec temp2
brne DlyLoop1
sbi pinA, 1 ;V-sync weg
dec temp3
brne DlyLoop2
ret
Start:
ldi stack, 0b00100000
out MCUCR, stack
ldi stack, LOW(RAMEND)
out SP, stack ;stack aktivieren
ldi temp, 0xFF
out DDRA, temp ;portA als Ausgang definieren
Routine:
ldi temp, 0b11000001 ;ton aus|RGB aus|V-sync
out portA,temp
rcall Delay
ldi temp, 0b11000011 ;ton aus|RGB aus|sync aus
out portA,temp
rcall Delay
ldi temp, 0b11001001 ;ton aus|G an|V-sync
out portA,temp
rcall Delay
ldi temp, 0b11001011 ;ton aus|G an|sync aus
out portA,temp
rcall Delay
ldi temp, 0b10010001 ;ton rechts|R an|V-sync
out portA,temp
rcall Delay
ldi temp, 0b10010011 ;ton rechts|R an|sync aus
out portA,temp
rcall Delay
ldi temp, 0b11000001 ;ton aus|RGB aus|V-sync
out portA,temp
rcall Delay
ldi temp, 0b11000011 ;ton aus|RGB aus|sync aus
out portA,temp
rcall Delay
ldi temp, 0b00000101 ;ton links|B an|V-sync
out portA,temp
rcall Delay
ldi temp, 0b00000111 ;ton links|B an|sync aus
out portA,temp
rcall Delay
rjmp Routine |