computer science questions?

Use VMLAB to write AVR code that starts by putting ten numbers, the values 11.0 to 20.0, into the EEPROM. Each number should be in IEEE 754 format with the most significant byte at a lower address than the other bytes in the number (big-endian). Then a loop should increment each value by one and write the result into the EEPROM, overwriting the original number.

Include screenshots from VMLAB that demonstrate your code.

This is skeleton 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

There are no answers yet.
Be the first to answer this question.