problem with fuse bits

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

i programmed my atmega16 mcu fuse bits in this way for internal 8 mhz oscillator along with jtag disable using avr dude the fuse bits code is like this

avrdude -p m16 -c bsd -t

w hfuse 0 0xd9
w lfuse 0 oxd4

now my mcu has a strange problem i programmed it with a flash led program which blinks the led in every one sec my code is like this

# include
int main(void)  // for 8 mhz internal oscillator 1 sec gap//

{
 DDRC|=_BV(0);
 TCCR1B|=(1<<CS12);
 while(1)
  {
  
    if(TCNT1>=31250)
	 
	 {
	  PORTC^=(1<<0);
	  TCNT1=0;
	 }
 }
 return(1);
}

but what happens is that sometimes when i switch on the micro sometimes the led blinks, sometimes it doesnt , i hade a similar problem with another atmega16 which now doesnt get programmed coz i get this message

invalid device signature 0xffff

can anyone tell me what is the problem

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sounds like you have a hardware problem, most likely with your reset line. What programmer are you using and how does the circuit look like?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

well i rectified everything , one of the atmega16 started working again but i still get the same error in the other one ,

did i mess up the fuse bits , if i did then how come the other one is working with the same configuration

oh yes iam using a self made bsd programmer made up of a centronics printer cable