I programmed my Mega128 and now it will not connect to my programmer.
All the new range of ATmega devices have fuses (CLKSEL) to configure them for use with specific types of hardware clocks. You may have programmed a setting which is not compatable with the clock circuit on your board. The common problem is this. The board has the normal crystal OSC circuit. Ticking CKSEL0,1,2,3 ("0000" in table6 p34 on M128 datasheet) sets the device to run from an external clock, so the crystal no longer runs. The correct setting would be "1111", no CLKSEL bits ticked, but since "1" is unprogrammed it is easy to set "0000" by mistake.This being the case, applying a suitable clock signal to the XTAL1 pin with a signal generator should allow the device to be detected again and the fuses reprogrammed.