I try to implement USB with AVR-CDC using ATtiny2313
I referenced the datasheet but can't get the right setting for fuse bits,
(or it doesn't need to program the fuse bit ? )
can anyone tell me which fuse bits should be programmed (set to 0) ?
( use 12MHZ crystal oscillator )
please give me a hand, thanks a lot~~
How to set fuse bits for Tiny2313 when implementing USB ?
Christeven,
this MAKEFILE snipplet is from Osamu Tamura's own tiny2313 example. It worked fine for me (version 2007-10-03).
To use it you need to run "make fuse_tiny2313" before or after flashing the actual code,
Cheers
Gert
this MAKEFILE snipplet is from Osamu Tamura's own tiny2313 example. It worked fine for me (version 2007-10-03).
To use it you need to run "make fuse_tiny2313" before or after flashing the actual code,
Code: Select all
# Fuse low byte:
# 0xef = 1 1 1 0 1 1 1 1
# ^ ^ \+/ \--+--/
# | | | +------- CKSEL 3..0 (clock selection -> crystal @ 12 MHz)
# | | +--------------- SUT 1..0 (BOD enabled, fast rising power)
# | +------------------ CKOUT (clock output on CKOUT pin -> disabled)
# +-------------------- CKDIV8 (divide clock by 8 -> don't divide)
#
# Fuse high byte:
# 0xdb = 1 1 0 1 1 0 1 1
# ^ ^ ^ ^ \-+-/ ^
# | | | | | +---- RSTDISBL (disable external reset -> enabled)
# | | | | +-------- BODLEVEL 2..0 (brownout trigger level -> 2.7V)
# | | | +-------------- WDTON (watchdog timer always on -> disable)
# | | +---------------- SPIEN (enable serial programming -> enabled)
# | +------------------ EESAVE (preserve EEPROM on Chip Erase -> not preserved)
# +-------------------- DWEN (debug wire enable)
fuse_tiny2313: # only needed for attiny2313
$(AVRDUDE) -U hfuse:w:0xdb:m -U lfuse:w:0xef:m
Cheers
Gert