Está en la página 1de 9

ESCUELA POLITCNICA NACIONAL

LABORATORIO DE:

SISTEMAS MICROPROCESADOS

INFORME

Prctica: 03 Tema: Conocimiento del software de desarrollo ATMEL Studio

Realizado por:

Alumno (s): Paul Fiallos Grupo: Gr13

Fecha de entrega: 24/11 /2016 f.


Recibido por:

Sancin:

Semestre: 2016-B
7.1
Repetir la simulacin con otros cuatro conjuntos de datos y presentar los resultados
mediante capturas de pantallas

DIVIDENDO MAYOR QUE DIVISOR

Divisin 54/13: c = 4; r=2

Divisin 85/31: c = 2; r=23

Divisin 104/42: c = 2; r=20


Divisin 96/16: c = 6; r=0

Dividendo Menor a Divisor


;***************************************************************************
;***** Subroutine Register Variables

.def drem8u = r25 ; remainder, residuo


.def dres8u = r16 ; result
.def dd8u = r16 ; dividendo
.def dv8u = r17 ; divisor
.def dcnt8u = r18 ; loop counter

;***** code
.org 0x00
ldi dd8u,0
ldi dv8u,5
ldi drem8u,2

;div8u: sub drem8u,drem8u ; clear remainder and carry


ldi dcnt8u,9 ; init loop counter
d8u_1: rol dd8u ; shift left dividend
dec dcnt8u ; decrement counter
brne d8u_2 ; if done
rjmp fin ; return

d8u_2: rol drem8u ; shift dividend into remainder


sub drem8u,dv8u ; remainder = remainder - divisor
brcc d8u_3 ; if result negative
add drem8u,dv8u ; restore remainder
clc ; clear carry to be shifted into result estaba primeo sec OJO
rjmp d8u_1 ; else

d8u_3: sec ; set carry to be shifted into resul


rjmp d8u_1

fin: rjmp fin ; es un ciclo infinito

4/9=0.4444444
Registro 16: .0110001: 2^-2+2^-3+2^-4+2^-8=0.44140625

5/11=0.4545454
Registro16: .01110100: 2^-2+2^-3+2^-4+2^-6=0.453125

2/3=0.666666
Registro16: .10101010: 2^-1+2^-3+2^-5+2^-7=0.6640625

2/5=0.4
Registro16: .01100110: 2^-2+2^-3+2^-5+2^-7=0.4140625

7.2 Adicionalmente realizar lo que el instructor solicite el instructor.


CONCLUSIONES:

BIBLIOGRAFIA
http://www.atmel.com/products/microcontrollers/avr/default.aspx
https://www.dspace.espol.edu.ec/bitstream/123456789/24378/1/PAPER%20DE
%20TESINA%20Luis%20Pati%C3%B1o.pdf

También podría gustarte