ATtiny2313 Fuse Programming CS-423 Dick Steflik
Whats a Fuse Fuses are used to hold important configuration information for the MPU Not really a fuse, just a few really important bytes of memory 1 means unprogrammed, 0 means programmed unlike a fuse they can be reprogrammed on the ATtiny2313 there are 3 fuse bytes low byte (lbyte) high byte (hbyte) extended byte (ebyte)
Low Byte 7 (0) – CKDIV8 – Divide Clock by 8 6 (1) – CKOUT – Output clock on CKOUT pin 5 (1) – SUT1 – Select start-up time 4 (0) – SUT0 – Select start-up time 3 (0) – CKSEL3 – Select clock source 2 (1) – CKSEL2 – Select clock source 1 (0) – CKSEL1 – Select clock source 0 (0) – CKSEL0 – Select clock source
Note: Default Low Byte Default Low Byte value is 0x64 Divide clock by 8 Internal RC Oscillator (8 MHz) This means default speed is 1 MHz
Select Start-up time Default value (1 0) results in Maximum start-up time
Clocking Options- CKSEL – External Clock 0010 – Internal RC Oscillator (4 Mhz) 0100 – Internal RC Oscillator (8 Mhz) 0110 – Watchdog Oscillator (128 KHz) – External Chrystal/Ceramic Resonator 0001,0011,0101, Reserved
High Byte 7 (1) – DWEN – debugWIRE Enable 6 (1) – EESAVE – EEPROM is preserved during chip erase 5 (0) – SPIEN – SPI Enable 4 (1) – WDTON – Watchdog timer always on 3 (1) – BODLEVEL2 – brownout detector trig level 2 (1) – BODLEVEL1 – brownout detector trig level 1 (1) – BODLEVEL0 – brownout detector trig level 0 (1) – RSTDISBL – External Reset disable
Brownout Detection Trigger Level The ATtiny2313 has an On-chip Brown-out Detection circuit that monitors Vcc to fixed trigger levels Programmed by BODLEVEL 2..0 Fuses BOD disabled v v v
Extended Byte 7 (1) – not used 6 (1) – not used 5 (1) – not used 4 (1) – not used 3 (1) – not used 2 (1) – not used 1 (1) – not used 0 (1)– SELFPRGEN – Self programming Enable
Fuse Programming Can be done through the Studio GUI if you are using the Atmel programmer AVRDUDE & Parallel Port programmer Use the -U option as follows: Avrdude -p Attiny2313 -c dapa -v -U lfuse:w:0xE4