Download AVR GCC Tutorial (WinAVR)
Transcript
lfuses: build -$(OBJCOPY) -j lfuses --change-section-address lfuses=0 \ -O ihex $(TARGET).elf $(TARGET)-lfuse.hex @if [ -f $(TARGET)-lfuse.hex ]; then \ $(AVRDUDE) $(AVRDUDE_FLAGS) -U lfuse:w:$(TARGET)-lfuse.hex; \ fi; hfuses: build -$(OBJCOPY) -j hfuses --change-section-address hfuses=0 \ -O ihex $(TARGET).elf $(TARGET)-hfuse.hex @if [ -f $(TARGET)-hfuse.hex ]; then \ $(AVRDUDE) $(AVRDUDE_FLAGS) -U hfuse:w:$(TARGET)-hfuse.hex; \ fi; efuses: build -$(OBJCOPY) -j efuses --change-section-address efuses=0 \ -O ihex $(TARGET).elf $(TARGET)-efuse.hex @if [ -f $(TARGET)-efuse.hex ]; then \ $(AVRDUDE) $(AVRDUDE_FLAGS) -U efuse:w:$(TARGET)-efuse.hex; fi; The target “clean” must still around the lines $(REMOVE) $(TARGET)-lfuse.hex $(REMOVE) $(TARGET)-hfuse.hex $(REMOVE) $(TARGET)-efuse.hex are extended, even if the Fuse files are to be deleted. Around now the Fuse bits of the attached MICROCONTROLLER to program must be only started “make lfuses”, “make hfuses” or “make efuses”. With the Fuse bits special caution is required, since these can make a programming of the MICROCONTROLLER impossible. Program thus only if one has a HV-programmer handy or a few reserve AVRs; -) In order to be able to describe further the “normal” Flash, it is important, for the target “*.hex” in the Makefile not only” - R .eeprom " as parameters to hand over separate additionally still “- to R of lfuses - R of efuses - R of hfuses”. Otherwise AVRDUDE of problems gets these sections in the Flash (where they do not belong) to write. See also :Comparison of the Fuses with different programs External reference tension of the internal analogue-digital converter The minimum (external) reference tension of the ADC may be not arbitrarily low, see in addition (most current) the data sheet of the used MICROCONTROLLER. e.g. with the ATMEGA8 it may not fall below 2,0V according to data sheet (S.245, table 103, line “VREF”). NOTE: this information is only in the last revision (Rev. 2486O-10/04) of the data sheet. After my own experience one can however (on own danger and naturally not for standard sets) small little far fallings, with the ATMEGA8L taken by me under the magnifying glass (thus the Low Voltage variant) quite still functions the ADC with 5V operating voltage with up to VREF=1,15V down correctly, starting from 1,1V