With VMLAB, write a code file that starts by putting ten numbers, the values +11.0 to +20.0, into the EEPROM using direc
Posted: Tue Jun 07, 2022 10:21 am
With VMLAB, write a code file that starts by putting ten
numbers, the values +11.0 to +20.0, into the EEPROM using
directives. Each number should be in IEEE 754 format with the bytes
arranged big-endian. Then a loop should replace each value with the
value plus +1.0. For example, the bytes for +11.0 will change to
the bytes for +12.0.
Include screenshots from VMLAB that demonstrate your
code. Here is code to get you started:
.include "C:\VMLAB\include\m168def.inc"
.eseg
.dw 0x3f80
.cseg
ldi r16, 0x00
out eearh, r16
ldi r16, 0x04
out eearl, r16
sbi eecr, eere
wait1: sbic eecr, eere
rjmp wait1
subi r16, 4
out eearl, r16
sbi eecr, eempe
sbi eecr, eepe
wait2: sbic eecr, eepe
rjmp wait2
subi r16, -5
out eearl, r16
numbers, the values +11.0 to +20.0, into the EEPROM using
directives. Each number should be in IEEE 754 format with the bytes
arranged big-endian. Then a loop should replace each value with the
value plus +1.0. For example, the bytes for +11.0 will change to
the bytes for +12.0.
Include screenshots from VMLAB that demonstrate your
code. Here is code to get you started:
.include "C:\VMLAB\include\m168def.inc"
.eseg
.dw 0x3f80
.cseg
ldi r16, 0x00
out eearh, r16
ldi r16, 0x04
out eearl, r16
sbi eecr, eere
wait1: sbic eecr, eere
rjmp wait1
subi r16, 4
out eearl, r16
sbi eecr, eempe
sbi eecr, eepe
wait2: sbic eecr, eepe
rjmp wait2
subi r16, -5
out eearl, r16