I would like to select the CKDIV8 fuse on the Arduino Nano using the AVRISP mkII. But, I'm afraid I will mess up the USB bootloader. Would this happen?
I have already erased the bootloader on a second Nano, and I don't know how to re-burn the bootloader via the AVRISP mkII and a hex file.
I would like to select the CKDIV8 fuse on the Arduino Nano using the AVRISP mkII. But, I'm afraid I will mess up the USB bootloader. Would this happen?
The problem is that the bootloader is 'hard coded' to assume the clock rate that the processor is running at and uses that assumption to set the baudrate to the proper value to talk to the Arduino IDE for uploading. Anything you change in the fuse settings that effects the basic clock speed from the value the bootloader was designed to operate at will make the bootloader not functional. I assume changing CKDIV8 will change the processors running clock speed?
I would like to select the CKDIV8 fuse on the Arduino Nano using the AVRISP mkII. But, I'm afraid I will mess up the USB bootloader. Would this happen?
The problem is that the bootloader is 'hard coded' to assume the clock rate that the processor is running at and uses that assumption to set the baudrate to the proper value to talk to the Arduino IDE for uploading. Anything you change in the fuse settings that effects the basic clock speed from the value the bootloader was designed to operate at will make the bootloader not functional. I assume changing CKDIV8 will change the processors running clock speed?
Is there a configuration item anywhere in the IDE to set the speed of communication with the bootloader? I'm thinking that if he sets CKDIV8 so as to divide the clock speed by 8, he could change the baud rate of the bootloader to match the board.
[EDIT: I think I found it - the upload.speed item in boards.txt. So mrjimbo could create a new board definition, based on Arduino nano but with 1/8 of the upload speed - unless there are other sensitive timings in the bootloader besides the baud rate]
The basic purpose of this question on the fuse and bootloader is to test my theory on why I can't get my virgin Atmega 328P to talk to an Arduino Mega 128 (made by Seeeduino Studio). I'm thinking that USART doesn't work when you have two microcontrollers running two drastically different clock speeds - in the case of, the 328P @ 8MHz internal and the Arduino Mega @ 16MHz external.
I never thought about creating my own board definition.
Basically, an Arduino Mega 128 runs the chip at 16MHz from an on-board oscillator. So, I'm thinking that my virgin Atmega328P running with an internal 8MHz clock is preventing effective USART communications.
I've proven that the Arduino Mega 128 can successfully talk (to & from) with an Arduino Nano, which has a 16MHz clock on-board. But, as soon as I upload the same code to a virgin Atmega328P using my AVRISP mkII, the code doesn't work - the virgin Atmega328P is not talking back (maybe not even properly receiving either) via USART, probably because of the difference in clocks.
OR, is it because I have been using the board selection "Arduino Duemilanove Or Nano w/ Atmega 328" when compiling and uploading the hex file to my virgin Atmega 328P via AVRISP mkII? I guess the Arduino IDE software assumes my virgin chip is running @ 16MHz, so the USART is all hosed up?