The reset pin is connected to a 10k resistor connected to VCC. Would this pose issues?
Also, will I be able to use the existing ICSP header to reprogram it?
Quote from: Aakash on Nov 18, 2012, 09:59 pmThe reset pin is connected to a 10k resistor connected to VCC. Would this pose issues?You would need to cut or remove that. As you can imagine.Quote from: Aakash on Nov 18, 2012, 09:59 pmAlso, will I be able to use the existing ICSP header to reprogram it? No. There are about 20 jumpers you have to run from the programmer to the chip. You would need access to most of the pins on the Atmega328.
I set REQUIRED_FREQUENCY (128000) and connected the logic analyzer to CLKOUT.When connecting the source to XTAL1 nothing happens to CLKOUT. But when connecting it to XTAL2 the attached screenshot is the output.EDIT: When D9 is connected to XTAL2, I ran this command "avrdude -c avrispmkII -p m328p -P usb -B250" and it still failed to initialize.
For future reference, what fuses should I be using in order to make the atmega328p use the 8MHz resonator?
I was reading the CLKSEL bits the wrong way round.
-i delayFor bitbang-type programmers, delay for approximately delay microseconds between each bit state change. If the host system is very fast, or the target runs off a slow clock (like a 32 kHz crystal, or the 128 kHz internal RC oscillator), this can become necessary to satisfy the requirement that the ISP clock frequency must not be higher than 1/4 of the CPU clock frequency. This is implemented as a spin-loop delay to allow even for very short delays. On Unix-style operating systems, the spin loop is initially calibrated against a system timer, so the number of microseconds might be rather realistic, assuming a constant system load while AVRDUDE is running. On Win32 operating systems, a preconfigured number of cycles per microsecond is assumed that might be off a bit for very fast or very slow machines.
EDIT: When D9 is connected to XTAL2, I ran this command "avrdude -c avrispmkII -p m328p -P usb -B250" and also -B500 and it still failed to initialize.
avrdude: stk500v2_command(): command failedavrdude: stk500v2_program_enable(): bad AVRISPmkII connection status: Unknown status 0x00avrdude: initialization failed, rc=-1
To get an extra slow SCK you may need to use something else for programming.
It's making more sense to me now:- with 128kHz applied to XTAL2 you are getting 16KHz on CLKOUT- so you need to program it with SCLK not exceeding 4KHz- so -B 250 is barely enough cycle time, if avrdude does use the -B parameter to set the SCLK rate of the AVRISPmkIISo try with 128KHz applied to XTAL2 again, but this time:- try avrdude with a -B parameter greater than 250- try using AVR Studio, with the SCLK frequency in the user interface set to 4KHz or even lower.If that fails, try with 32768Hz or so applied to XTAL1 or XTAL2 (whatever gives you a clean CLKOUT signal) and use SCLK <= 1kHz in AVR Studio. The docs say you can't program the flash below 2KHz, but you can do a chip erase.