Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Communication error when trying to reprogam ATmega32

Status
Not open for further replies.

yviswanathbe

Full Member level 4
Joined
Jun 14, 2007
Messages
221
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
3,065
Hi Friends,

I am working on ATMEGA 32 micro controller. I am using Code Vision AVR and parallel port programmer(Kanda System).
first time when i program the chip it is working fine. but if i try to reprogram the chip i am getting error message.
I have tried with 4 chips. but the result is same.
what could be the problem. Does all the chips were damaged or locked? how to know whether the chip is damaged or locked? Is there any way to solve my issue?
Please help me.

Thanks and regards,
Viswanath
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Re: ATmega32 problem????

Did you change any fuses?
The default clock source is the internal RC, did you change the clock fuses?
You are using an ISP programmer right?

Alex
 

yviswanathbe

Full Member level 4
Joined
Jun 14, 2007
Messages
221
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
3,065
Re: ATmega32 problem????

Error i am getting is:

communication error, please check the following:
- the programmer power supply is on
-the avr chip is damaged.

the above errors occured when programming for the second time.all the connections and power supply are properly given. same thing has happened with all the 4 chips that i used.

programmed fuse bits for atmega 32 clock freq=8Mhz are

CKSEL0=0
CKSEL1=0
CKSEL3=0
SUT0=0

these fuse bits have not been changed while programming for the second time..

what can be the problem?

thanks and regards,
viswanath
 

yviswanathbe

Full Member level 4
Joined
Jun 14, 2007
Messages
221
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
3,065
Re: ATmega32 problem????

HI srikanth,
the same error message appears even if i click erase option.
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Re: ATmega32 problem????

Are you sure about the meaning of 0 and 1 in your program, a checked checkbox in codevision means that the fuse is set to 0 (programmed)

so you had the following (8MHz internal RC)?
CKSEL0=0 (checked)
CKSEL1=0 (checked)
CKSEL2=1 (unchecked)
CKSEL3=0 (checked)
SUT0=0 (checked)

Alex
 

srikanthsamaga

Full Member level 3
Joined
Dec 14, 2008
Messages
179
Helped
12
Reputation
24
Reaction score
2
Trophy points
1,298
Location
12°52′N 74°53′E
Activity points
2,022
Re: ATmega32 problem????

The CKSEL setting are proper if you had configured fuses as said by alexan_e,
What is the fuse setting for SPIEN?
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Re: ATmega32 problem????

An serial programmer can't disable the serial programming fuse, only a parallel programmer can do that.

Alex
 

yviswanathbe

Full Member level 4
Joined
Jun 14, 2007
Messages
221
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
3,065
Re: ATmega32 problem????

Hi srikanth and alexan,

Thanks for your responses.

Yes, the fuse bit selection is as follows
CKSEL0=0 (checked)
CKSEL1=0 (checked)
CKSEL2=1 (unchecked)
CKSEL3=0 (checked)
SUT0=0 (checked)

and i did not see SPIEN fuse bit in PROGRAM FUSE BITS list.

is it compulsory to enable this fuse?

regards,
viswanath
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
Re: ATmega32 problem????

The SPIEN is 0(programmed) by default and it is no accesible using a serial programmer so don't mind that.
You are using a serial programmer right?

Alex
 

srikanthsamaga

Full Member level 3
Joined
Dec 14, 2008
Messages
179
Helped
12
Reputation
24
Reaction score
2
Trophy points
1,298
Location
12°52′N 74°53′E
Activity points
2,022
Re: ATmega32 problem????

An serial programmer can't disable the serial programming fuse, only a parallel programmer can do that.

Alex
I thought it depends on ISP software...
Even in the software which I use, SPIEN option is shaded (not accessible).

yviswanathbe said:
Yes, the fuse bit selection is as follows
CKSEL0=0 (checked)
CKSEL1=0 (checked)
CKSEL2=1 (unchecked)
CKSEL3=0 (checked)
SUT0=0 (checked)
Did you try to reading fuse bits after programming?
Are they set properly on the chip by the ISP programmer?
 
Last edited:

yviswanathbe

Full Member level 4
Joined
Jun 14, 2007
Messages
221
Helped
10
Reputation
20
Reaction score
6
Trophy points
1,298
Activity points
3,065
Re: ATmega32 problem????

Hi Nandu,
Thanks for your suggession.
Now i have got new ISP programmer from Atmel (AVR ISP MKII).
i am getting the following error message when i connect AVR ISP to my target board
"AVRISP MKII COULD NOT ENTER PROGRAMMING MODE"

I am getting this error for all my 4 ATMEGA chips(which are programmed with my old programmer). What could be the problem? Does all my 4 ATMEGA32's are damaged???

Thanks and regards,
Viswanath
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top