0% found this document useful (0 votes)
32 views1 page

Assembly Flipflop

The document contains assembly code that loads values into registers and outputs them to ports to light an LED by rotating through the bits in a register.

Uploaded by

ryuzacky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views1 page

Assembly Flipflop

The document contains assembly code that loads values into registers and outputs them to ports to light an LED by rotating through the bits in a register.

Uploaded by

ryuzacky
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

.include "m8535def.

inc"

rcall tunda

.org 0x0000

rjmp ulang
tunda:

utama:

ldi r18,$2

ldi r16,low(RAMEND)

loop1:ser r16

out SPL,r16

loop2:ser r17

ldi r16,high(RAMEND)

loop3:dec r17

out SPH,r16

brne loop3
dec r16

ldi r16,0xff

brne loop2

out ddra,r16

dec r18

out porta,r16

brne loop1
ret

ser r19 //set register di r19

stop:
rjmp stop

ulang:
ror r19 //rotate right through
out porta,r19

Dewa Ayu Natasya Widya


14/363666/TK/41738

You might also like