Help with fuse bits to setup atmega2560

Hi all, i have recently been building a project and prototyped with an arduino mega to get the main pcb design working but have just done my first board design including the atmega2560 chip so no arduino. I have successfully uploaded a sketch via icsp and have it working but am trying to work out the fuse bits and i can't get my head around it and what i need.

Firstly it ran slow so im assuming the divide by 8 clock was set wrong so found a working combination but when uploading my actual code i think it seems to run slow compared to when it was on the arduino board.

For example a button press from the touchscreen is lagging compared to when i push and let go versus when it enables and disables.

Im using a Ceramic Resonator 16mhz so was wondering how to go about setting the fuse bits correctly i've tried to use the calculator online but after reading im not sure what half of the variables mean or what i should be using

Is there anyone that can help me or what information or board variables will change these fuse bit requirements?

Thanks,
Darcy

The quick way to get the fuse bits set is to burn the bootloader (using ICSP). This assumes that your board is basically a Mega with added components. If there is no need for a bootloader after that, you can upload your sketch again over ICSP.

Atmel's / Microchip's Mega datasheet should help to understand.

Its not a mega more so a bare bones mega just the ic and resonator a few capacitors and thats about it no usb or any other components like that.

I was confused with the clock fuses as to which one to use but i think i worked it out. I ended up going with 0xFF for the low byte but not sure if i'm meant to use Full swing or external crystal for a ceramic resonator.

I've gone with the longest start up delay because its not critical to my application so thats what im stuck on. The rest i understand but the clock side of it am a little stuck on.

0xFF or 0xF7 is what i have come up with for the low byte

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.