Skip to content

Instantly share code, notes, and snippets.

@gayapedro
Last active September 9, 2019 23:21
Show Gist options
  • Select an option

  • Save gayapedro/36e39883aa20b4898e64eaabf1d5ba5c to your computer and use it in GitHub Desktop.

Select an option

Save gayapedro/36e39883aa20b4898e64eaabf1d5ba5c to your computer and use it in GitHub Desktop.
.ORG 0x0000
RJMP main
main:
LDI r16,0xFF
OUT DDRB,r16
LDI r20,0b000000
OUT PortB, r20
loop:
INC r20
OUT PortB, r20
RCALL atraso
RJMP loop
atraso:
LDI r19, 16 //aprox 200ms
volta:
DEC r17
BRNE volta
DEC r18
BRNE volta
DEC r19
BRNE volta
RET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment