Answer the question
In order to leave comments, you need to log in
What is the RESET AVR procedure?
Everything that is described below is tested in the Proteus program.
Let's say code has only two interrupts defined in the vector table, RESET and an ADC conversion interrupt. After the vector comes the RESET handler, then an empty infinite loop and then the interrupt handler from the ADC. If the RESET: label itself is removed in this code, that is, only the label, but not the RESET interrupt handler, the code does not work (the PC ends up in empty memory), although the code that was in the RESET handler is actually executed (probably).
And again, if this interrupt is executed when the MK starts, then why if I place the RESET interrupt handler last - it also does not work (the PC gets into empty memory).
Essence of the question:
- Why does this happen if you make the changes in the code that I described above?
-What is the RESET procedure for?
-How is it called?
Answer the question
In order to leave comments, you need to log in
Why does this happen if you make the changes in the code that I described above?
I recommend reading the datasheet for the microcontroller, section Interrupt Vector Table.
Interrupt #0 RESET_vect is called when the microcontroller is reset (rising edge at the nRESET input).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question