Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

(Probably solved) Probs programming ATMega16 via ICSP

(Probably solved) Probs programming ATMega16 via ICSP

2004-02-10 by Marcus Klein

Hi all!

After pulling the device out of the circuit (no, not brute force -
desoldering was the task *g*) I put it in an external programmer,
flashed the same hex-file and fuses as with the ICSP interface - put it
back in circuit - and it worked and still works (also with ICSP).

Ok, I was calling Atmel these days to find the key to this prob (it's
not nice to pre-flash ks of devices if the application goes into
production...) - they suppose the transfer rate on the ICSP to be to
high. Low enough to flash the program and the E2PROM but
a litle bit to high for the fuses. Not knowing why there might be some
difficulty in timing during  fuse-programming - I should check this.

I can't tell anything about that, but it seems a litle bit strange to
me. All goes but the fuses don't ?!?

There must be a way using ICSP from the very first programming on all
devices. I don't want to buy an STK 500 for high voltage p/s programming

as the Atmel guy suggested - I use SMD-devices and so it might not be
the
best choice in my case.

Is there anybody out there to bring a little bit of light into my
darkness ??

Thanks a lot
Marcus

Re: [AVR-Chat] (Probably solved) Probs programming ATMega16 via ICSP

2004-02-10 by Dave VanHorn

>
>There must be a way using ICSP from the very first programming on all
>devices. I don't want to buy an STK 500 for high voltage p/s programming

"click"

We do this with M8's, M128's and T26's.
Your clock rate on the board should be no faster than 1/4 the M16's clock.
They should come with internal 1 MHz RC on.

Make sure you don't have anything else hanging on the SPI lines, and that 
the STK can pull the reset down.
If you use the SPI for other tasks, you'll need resistors between the M16 
and the device, and the programming connector direct to the M16, otherwise 
the programmer may not be able to pull the lines up and down.

Dave, Prince of Hopefully Suficient Light.

Re: [AVR-Chat] (Probably solved) Probs programming ATMega16via ICSP

2004-02-10 by Marcus Klein

Hi Dave!

Dave VanHorn schrieb:

> >
> >There must be a way using ICSP from the very first programming on all
> >devices. I don't want to buy an STK 500 for high voltage p/s programming
>
> "click"
>
> We do this with M8's, M128's and T26's.
> Your clock rate on the board should be no faster than 1/4 the M16's clock.
> They should come with internal 1 MHz RC on.

Ok, but how can I change / adjust the clock rate? The software does not
support this feature.
PonyProg plus the SI-Programmer (serial adapter) has no options for clock rate
and in CodeVision
I haven't found one, too. (used with STK 200+/300-ICSP-Dongle on parallel
port)

> Make sure you don't have anything else hanging on the SPI lines, and that
> the STK can pull the reset down.

I'd put them in designing the schematics...
Reset is well down to ground - I've checked this

> If you use the SPI for other tasks, you'll need resistors between the M16
> and the device, and the programming connector direct to the M16, otherwise
> the programmer may not be able to pull the lines up and down.

Erhhhhh - I don't use the STK500 and I don't want to use it if it's possible
(SMDs don't
fit in DIL-sockets very well).

> Dave, Prince of Hopefully Suficient Light.

Marcus,
owner of a torch with empty cells %-{

Re: [AVR-Chat] (Probably solved) Probs programming ATMega16via ICSP

2004-02-10 by Dave VanHorn

>Ok, but how can I change / adjust the clock rate? The software does not
>support this feature.
>PonyProg plus the SI-Programmer (serial adapter) has no options for clock rate
>and in CodeVision
>I haven't found one, too. (used with STK 200+/300-ICSP-Dongle on parallel
>port)

Oh.. I thought you had the STK-500.
AVR studio does that.
Don't select 32 kHz unless you need it, it's a "go out for lunch" 
programming session.

> > If you use the SPI for other tasks, you'll need resistors between the M16
> > and the device, and the programming connector direct to the M16, otherwise
> > the programmer may not be able to pull the lines up and down.
>
>Erhhhhh - I don't use the STK500 and I don't want to use it if it's possible
>(SMDs don't fit in DIL-sockets very well).

The 500 does ICSP.

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.