wokwi-features icon indicating copy to clipboard operation
wokwi-features copied to clipboard

AtTiny85 reset pin to GND does not reset correctly

Open zukizuki opened this issue 1 year ago • 0 comments
trafficstars

Connecting the pin 1 - (reset pin) to Gnd on the AtTiny should reset the chip. In Wokwi, however, it seems the simulation resets to the beginning of Void Loop, but does not perform a full reset of the chip (does not restart the program from the beginning).

I have built the below setup in real life, and the chip definetely does reset to the beginning of the code, when Pin 1 is connected to Gnd.

To Reproduce Link: https://wokwi.com/projects/383411514584646657

(In this example, I've set button pin 1L to VCC which is needed to get the "faulty reset" described above (resetting to Void loop). If I omit the 1L to VCC in WokWi, there seems to be no reset effect at all, which is also erroneous.

  • In the "real world" setup, the 1L to VCC is not needed, simply connecting any of the 2L or 2R to Gnd and 1R to pin 1 on AtTiny85 and pressing the button will perform a full reset.

Expected behavior

It was expected, that shorting pin 1 and Gnd would reset the chip and restart the program completely from the top. This seems to not happen.

The program performs a short sequence of fast blinking at start (void setup), then resumes blinking at slower intervals (void loop). Shorting Reset and Gnd should re-run the program, including the fast-blinking sequence under void setup. This does not happen.

Environment (please complete the following information):

  • OS: Win10
  • Browser: Chrome
  • Version: 119.0.6045.200

Additional context This setup has been replicated in real life, where it does work as expected (without the connection from button 1L to VCC)

zukizuki avatar Dec 07 '23 00:12 zukizuki