Hi all,
DrJones has been helping me with this however it appears that he is very busy these days so in an attempt to bug him less I'm going to see if anyone can help me here
I have some code that I want to use on an ATMEL 25V. It's proven to be working with a 13V. DrJones believed that the code would more or less work on the 25V with 2 minor changes to get voltage detection working. Anyway, his last comment on the matter was to suggest some fuse settings:
[QUOTE]As fuses I’d recommend low:0×52 high:0xFF extended:0xFF
(clock runs at 1MHz then, in AVRstudio: clock:8MHz-RC and check CKDIV8).[/QUOTE]
Now it is important to note I know nothing about ATMEL programming - this is the first time I've ever attempted writing new firmware to an ATMEL chip (I finally got hold of an ISP programmer that works!!!!).
So using what information I could get from the flashlightwiki I entered this:
[QUOTE]avrdude -p t25 -c usbasp -u -Uflash:w:led.hex:a -Ueeprom:w:led.eep:a -Ulfuse:w:0×52:m -Uhfuse:w:0xFF:m[/QUOTE]
Now that appeared to work until it got to the high fuse:
[QUOTE]
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xFF:
avrdude: load data hfuse data from input file 0xFF:
avrdude: reading on chip hfuse data:
Writing | ################## | 100% 0.01s
avrdude: verifying …
avrdude: verification error, first mismatch at byte 0×0000 0xff !=0xdf
avrdude: verification error; content mismatch
avrdude done. Thank you.
[/QUOTE]
So 2 things:
1) How can I fix the high fuse issue?
2) What is causing the high fuse problem?
3) I didn't even think about it last night, but what should I be doing with DrJone's suggested extended fuse!? I completely missed it lol.
I'll start reading up a bit more and see if I can find something helpful elsewhere on the interwebs. It might be important to note that DrJones' suggested changes to the code have not been made yet. Just in case they could help rectify this issue his suggestions were:
[QUOTE]58: #define ADC_PRSCL 0x06 // ADC prescaler of 64
---> #define ADC_PRSCL 0x05 // ADC prescaler of 32
515: ADMUX = _BV(REFS0) | _BV(ADLAR) | (uint8_t) ADC_MUX;
---> ADMUX = _BV(REFS1) | _BV(ADLAR) | (uint8_t) ADC_MUX;[/QUOTE]
So yeah - any help would be greatly appreciated.
Thanks,
- Matt