Recovering ATMEGA328p chip from external clock fuse set
A quick post of tragedy and triumph! Whilst breadboarding a new project with an Atmega328p chip (the heart of some of the Arduino ecosystem), I wanted to configure the AVR "fuses" (a desperately misleading term!) in order to use an external 16 MHz crystal, rather than the default internal 8 MHz oscillator. This is straight forward and something I've done before. Using the excellent fuse calculator , I wanted to get cracking and rushed in without double checking my fuse selection. Big mistake! I saw the option "external clock" (CKSEL=0000 SUT=00), and thought "great, that's it", also unselecting the CKDIV8 option (bit 7), generates the LOW fuse = 0xC0 and the HIGH fuse = 0xD9. Two right mistakes here! First of all the small one: Selecting a box corresponds to setting the bit to '0', rather than '1', i.e. *unselecting/unticking* the CKDIV8 boxes will SET this bit as true (and divide the clock signal by 8). It can't be