EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Cannot program the ATmega128 using SPI programming

Started by pragnesh_pavan April 24, 2007
hi, group

i m facing very strange problem,i made my own ISP programmer and i m
using the AVRDUDE as my programming software. now i found very strange
problem when i am trying to program the IC.

at first my PEN pin is connected to the VCC.now i am trying to program
the IC but avrdude gives the error that device is not initialized.

but after that my connect PEN pin to GND and turn off the supply to
the board and again turn on the supply and my IC get programed but it
recently downloaded program is not execute even if i m reset the board.

now after this i connect PEN pin to VCC again and turn off the supply
to the borard and turn on it again now my previously donloaded program
is executed.

my question is that is it necessary to connect the PEN? or make it
left unconnected.

thanks in advance.
regards
Hi,

> i m facing very strange problem,i made my own ISP programmer and i m
> using the AVRDUDE as my programming software. now i found very strange
> problem when i am trying to program the IC.

Are you using MOSI/MISO? If so that's your problem. For some bizarre
reason, the ATMega128 uses PDI/PDO for programming rather than
MOSI/MISO.

--
Dave Hylands
Vancouver, BC, Canada
http://www.DaveHylands.com/
--- In a..., "Dave Hylands" wrote:
>
> Hi,
>
> > i m facing very strange problem,i made my own ISP programmer and
i m
> > using the AVRDUDE as my programming software. now i found very
strange
> > problem when i am trying to program the IC.
>
> Are you using MOSI/MISO? If so that's your problem. For some
bizarre
> reason, the ATMega128 uses PDI/PDO for programming rather than
> MOSI/MISO.
>
> --
> Dave Hylands
> Vancouver, BC, Canada
> http://www.DaveHylands.com/
No, i am using PDO and PDI pin for the programming insted of the
MOSI and MISO.
Dear my frind
Hi
Use STK200 and program IC whit Codevision
Sure that you have not any problems
Regard
mehdi sanaee

---------------------------------
Ahhh...imagining that irresistible "new car" smell?
Check outnew cars at Yahoo! Autos.
Dear my frind
> Hi
> Use STK200 and program IC whit Codevision
> Sure that you have not any problems
> Regard
> mehdi sanaee
>
>---------------------------------
>Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
>
>
>
Dear sir,
i use codevision and STK200 and PEN is connected to GND.but i can not program AVR 128:(
would you help me please?
thanks in advance
banner
dear friend,
i faced a new problem.finally i could program my atmega128 but this happens only one time. i mean i can program a atmega128 chip just one time.do you know why?
i use codevision and PEN pin is connected to GND always.
thanks
banner
How did you set the fuse bits?

Zack

On Sun, 3 Jun 2007, b...@yahoo.com wrote:

> dear friend,
> i faced a new problem.finally i could program my atmega128 but this happens only one time. i mean i can program a atmega128 chip just one time.do you know why?
> i use codevision and PEN pin is connected to GND always.
> thanks
> banner
hi,
i have a problem.i can program atmega128.but the chip does n't work
after programming.pin PEN is always connected to GND.is the problem
related to this connection?
thanks in advance
banner
You have guesed reason of your problem yourself. very probably the problem is because of connecting PEN to GND. this pin is Active-Low and asserting it force the MCU to go to Programming Mode. so for solving your problem I suggest u to pull up this pin to VCC with appropriate ressistance.

Banafsheh wrote: hi,
i have a problem.i can program atmega128.but the chip does n't work
after programming.pin PEN is always connected to GND.is the problem
related to this connection?
thanks in advance
banner

Navid Zeraatkar

---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
hi dear
i`m sure thatyour programmer cause this problem,are u sure that your
programmer is work corectly?and may i ask u wich compiler u use?and
wich programmer?stk200?300?500?whit buffer or not?and at the end if
you are Iranian person,i will be glad to reply you in Parsi.thanks for
your question.bye.

The 2024 Embedded Online Conference