Essays.club - Ensayos gratis, notas de cursos, notas de libros, tareas, monografías y trabajos de investigación
Buscar

DESCRIPCIÓN DEL PROYECTO OBJETIVO: Poner en práctica lo aprendido en la materia sistemas micro procesados.

Enviado por   •  29 de Noviembre de 2017  •  1.457 Palabras (6 Páginas)  •  445 Visitas

Página 1 de 6

...

mostrar0:

ldi tempo,0b00000000

out porta,tempo

ldi r20,4

ldi zl,low(tabla1

ldi zh,high(tabla1

ldi xh,high(elemento)

ldi xl,low(elemento)

traer0:

lpm r21,z+

st x+,r21

dec r20

brne traer0

ldi r20,4

ldi zl,low(tabla2

ldi zh,high(tabla2

ldi xh,high(complemento)

ldi xl,low(complemento)

traer01:

lpm r21,z+

st x+,r21

dec r20

brne traer01

push r16

in r16,sreg

push r16

push xl

push xh

push yl

push yh

ldi xl,low(elemento)

ldi xh,high(elemento)

ldi yl,low(complemento)

ldi yh,high(complemento)

ldi r19,4

mostrar01:

ld tempo,x+

ld r20,y+

out portb,tempo

out portd,r20

call retardo

dec r19

brne mostrar01

pop yh

pop yl

pop xh

pop xl

pop r16

out sreg,r16

pop r16

ret

;barrido 2

mostrar1:

ldi tempo,0b00000000

out porta,tempo

ldi r20,6

ldi zl,low(tabla3

ldi zh,high(tabla3

ldi xh,high(elemento)

ldi xl,low(elemento)

traer2:

lpm r21,z+

st x+,r21

dec r20

brne traer2

ldi r20,6

ldi zl,low(tabla4

ldi zh,high(tabla4

ldi xh,high(complemento)

ldi xl,low(complemento)

traer02:

lpm r21,z+

st x+,r21

dec r20

brne traer02

push r16

in r16,sreg

push r16

push xl

push xh

push yl

push yh

ldi xl,low(elemento)

ldi xh,high(elemento)

ldi yl,low(complemento)

ldi yh,high(complemento)

ldi r19,4

mostrar02:

ld tempo,x+

ld r20,y+

out portb,tempo

out portd,r20

call retardo

dec r19

brne mostrar02

pop yh

pop yl

pop xh

pop xl

pop r16

out sreg,r16

pop r16

ret

;barrido 3

mostrar2:

push r16

in r16,sreg

push r16

ldi r23,0b11111110

out porta,r23

ldi tempo,0b00000000

ldi r22,0b11111110

out portb,tempo

out portd,tempo

call retardo

ldi r23,0b11111101

out porta,r23

ldi tempo,0b00000000

ldi r22,0b11111110

out portb,tempo

out portd,tempo

call retardo

...

Descargar como  txt (13 Kb)   pdf (103.9 Kb)   docx (23 Kb)  
Leer 5 páginas más »
Disponible sólo en Essays.club