Electronic – What happens to AVR registers during multi-cycle instructions

assemblyavrmicrocontroller

This is more of a theoretical question… (Also my first on Stack Overflow)

I am wondering what happens to Atmel AVR microcontroller (i.e. ATTINY85) registers during a multi-cycle instruction.

i.e. ADIW takes two cycles to add an immediate to a two-byte (word) register.

I imagine that during the first cycle one of the bytes is operated on, and then in the next cycle the other byte is operated on. But is this process defined anywhere I can read? And what about the other multi-cycle instructions?

Essentially I'm interested in the state of the microcontroller after each individual cycle, even within multi-cycle instructions.

Best Answer

Here is my interpretation:

In order for a 8-bit uC to do 16-bit maths, it has to first calculate the lowest significant bits then moves to the highest significant bits, so first cycle adds 8-bits with a carry then adds that carry to the higher 8-bits.

In abstract sense 8-bit can't do 16-bit calculation in a single instruction as results affect each other.