Sebastian Fischmeister <address@hidden> wrote:
My setup is working fine with an at90s8515. I use MacOS, a
usb2serial, a stk500, and avrdude 4.4.0.
As soon as I switch from the at90s8515 to the atmega16, I get the
following error when I try to program it: failed to enter programming
mode.
Below I attached the output of "-v -v -v -v".
Does anyone had similar problems and found a solution for it?
The default clock speed for a mega16 is 1 MHz. SCK speed needs to be
less than or equal to one quarter of the clock speed. Try setting the
SCK period to 5 us. Below is an example of how to do this. This may
not be your only problem. Are you programming in-circuit, or are you
inserting the devices into the DIP sockets of the stk500?
galen
$ avrdude -P /dev/ttyS1 -c stk500 -p m48 -t
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100%
0.03s
avrdude: Device signature = 0x1e9205
avrdude: current erase-rewrite cycle count is -257 (if being tracked)
avrdude> parm
parm
Vtarget : 5.1 V
Varef : 5.1 V
Oscillator : 1.843 MHz
SCK period : 1.1 us
avrdude> sck 5u
sck 5u
avrdude> parm
parm
Vtarget : 5.1 V
Varef : 5.1 V
Oscillator : 1.843 MHz
SCK period : 5.5 us
avrdude> quit
quit
avrdude done. Thank you.
$