You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I modified the code so that it would overwrite the whole chip with 0xea. Turns out when i change the break condition in the erase loop to 32767 to match the size of the eeprom it goes into a seemingly infinite loop. My guess is that the 16 bit signed INT of the arduino overflows so that the break condition of the erase loop will never be met. Changing this to an unsigned INT solved the problem for me. But because of my inexperience with arduinos i could also be wrong.
The text was updated successfully, but these errors were encountered:
Yes. The int variable address is a signed 16-bit variable. That means it'll never be larger than 32,767. Instead, it'll wrap around to -32,768 and start over again. We can change the address variable to a long type:
I modified the code so that it would overwrite the whole chip with 0xea. Turns out when i change the break condition in the erase loop to 32767 to match the size of the eeprom it goes into a seemingly infinite loop. My guess is that the 16 bit signed INT of the arduino overflows so that the break condition of the erase loop will never be met. Changing this to an unsigned INT solved the problem for me. But because of my inexperience with arduinos i could also be wrong.
The text was updated successfully, but these errors were encountered: