programming the ICs

Discussions related to MegaDrum Hardware

Re: programming the ICs

Postby estregan » Sun Nov 11, 2007 2:35 am

dmitri wrote:Is a crystal in place?


Yes, I'm using a 12Mhz crystal.
estregan
 
Posts: 116
Joined: Tue Aug 28, 2007 6:24 am

Re: programming the ICs

Postby dmitri » Sun Nov 11, 2007 2:53 am

estregan wrote:
dmitri wrote:Is a crystal in place?


Yes, I'm using a 12Mhz crystal.

Of course I presume the power (5V) is there on the pin 10 when you try to program Atmega32 and the crystal is not damaged (maybe to try another crystal?).
If the healthy crystal is there along with C1 and C2 and they are properly connected but you're not able to read/write the chip anymore than it means you programmed fuses incorrectly. There are several ways to recover from this state. The easiest is explained here -> http://www.larsen-b.com/Article/260.html
You will need to find a source of around 1MHz TTL level (3,6-5V) signal and apply it to XTAL1 (pin 13 on Atmega32). With this signal applied you will be able to program the correct fuses configuration.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: programming the ICs

Postby dmitri » Sun Nov 11, 2007 2:56 am

It's half past 2 in the morning here. I'm about to go to bed. Good luck to you and I'll try to help you more tomorrow if you're still having problems.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: programming the ICs

Postby estregan » Sun Nov 11, 2007 3:05 am

dmitri wrote:Of course I presume the power (5V) is there on the pin 10 when you try to program Atmega32 and the crystal is not damaged (maybe to try another crystal?).
If the healthy crystal is there along with C1 and C2 and they are properly connected but you're not able to read/write the chip anymore than it means you programmed fuses incorrectly. There are several ways to recover from this state. The easiest is explained here -> http://www.larsen-b.com/Article/260.html
You will need to find a source of around 1MHz TTL level (3,6-5V) signal and apply it to XTAL1 (pin 13 on Atmega32). With this signal applied you will be able to program the correct fuses configuration.


Uhhmmm, you lost me here. Too much technical stuff for me to understand already. :)

I read the link you gave on how to reset the incorrect fuse programming. What does he mean with this:

Of course, you need a external clock at something like 1Mhz. Of course I don't have this kind generator at home, but this can be easily done with another AVR micro this something like this:

void main()
{
DDRA = 0xFF;
while (1)
{
PORTA = ~PINA;
nop(); // added some nop, to slow the clock a bit
nop();
}
}




Does that mean I can reset the fuses without 1Mhz external clock? And what do you mean when you say
You will need to find a source of around 1MHz TTL level (3,6-5V) signal and apply it to XTAL1 (pin 13 on Atmega32). With this signal applied you will be able to program the correct fuses configuration.

Can you please clarify a bit more? A step by step instruction for dummies like me would be great, hehe :lol:

Thanks.
estregan
 
Posts: 116
Joined: Tue Aug 28, 2007 6:24 am

Re: programming the ICs

Postby dmitri » Sun Nov 11, 2007 11:30 am

estregan wrote:
dmitri wrote:Of course I presume the power (5V) is there on the pin 10 when you try to program Atmega32 and the crystal is not damaged (maybe to try another crystal?).
If the healthy crystal is there along with C1 and C2 and they are properly connected but you're not able to read/write the chip anymore than it means you programmed fuses incorrectly. There are several ways to recover from this state. The easiest is explained here -> http://www.larsen-b.com/Article/260.html
You will need to find a source of around 1MHz TTL level (3,6-5V) signal and apply it to XTAL1 (pin 13 on Atmega32). With this signal applied you will be able to program the correct fuses configuration.


Uhhmmm, you lost me here. Too much technical stuff for me to understand already. :)

I read the link you gave on how to reset the incorrect fuse programming. What does he mean with this:

Of course, you need a external clock at something like 1Mhz. Of course I don't have this kind generator at home, but this can be easily done with another AVR micro this something like this:

void main()
{
DDRA = 0xFF;
while (1)
{
PORTA = ~PINA;
nop(); // added some nop, to slow the clock a bit
nop();
}
}




This shows how to program a spare Atmega to be an external clock (generator). Do you have a spare Atmega32 or Atmega8?
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: programming the ICs

Postby estregan » Sun Nov 11, 2007 1:20 pm

dmitri wrote:This shows how to program a spare Atmega to be an external clock (generator). Do you have a spare Atmega32 or Atmega8?


I have the Atmega8L to be used for AVR-CDC board but that is also showing the error. Can that be used? If it can, how? I do not understand what the codes are for and how they are used.
estregan
 
Posts: 116
Joined: Tue Aug 28, 2007 6:24 am

Re: programming the ICs

Postby dmitri » Sun Nov 11, 2007 2:55 pm

estregan wrote:
dmitri wrote:This shows how to program a spare Atmega to be an external clock (generator). Do you have a spare Atmega32 or Atmega8?


I have the Atmega8L to be used for AVR-CDC board but that is also showing the error. Can that be used? If it can, how? I do not understand what the codes are for and how they are used.

Again, are you sure your crystals are alright? I just can't believe you programmed incorrect fuses (i.e. didn't follow my instructions exactly) on both ICs. If fuses really programmed incorrectly on both ICs than you'll have to get another Atmega8, make a simple circuit to generate ~1MHz signal (just one Atmega8 and one 100nF capacitor). I'll compile the code mentioned above to make a firmware for this generator and you'll write this firmware into this IC so that you could recover first two ICs.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: programming the ICs

Postby estregan » Mon Nov 12, 2007 7:13 am

dmitri wrote:Again, are you sure your crystals are alright? I just can't believe you programmed incorrect fuses (i.e. didn't follow my instructions exactly) on both ICs. If fuses really programmed incorrectly on both ICs than you'll have to get another Atmega8, make a simple circuit to generate ~1MHz signal (just one Atmega8 and one 100nF capacitor). I'll compile the code mentioned above to make a firmware for this generator and you'll write this firmware into this IC so that you could recover first two ICs.


I tried different crystals but the problem is still there. So, I might have to reset the fuses.

Please do compile the code and give me a simple schematics on how to connect and program them.

Thanks.
estregan
 
Posts: 116
Joined: Tue Aug 28, 2007 6:24 am

Re: programming the ICs

Postby dmitri » Mon Nov 12, 2007 11:17 am

I'll do it tonight.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

Re: programming the ICs

Postby dmitri » Mon Nov 12, 2007 4:59 pm

This is the schematic of the generator:
generator.png

This is the firmware for this generator:
generator.hex


For the generator you must not touch fuses configuration on a factory shipped Atmega8 chip. Just write the firmware into it. After you've written the firmware into Atmega8, place it as shown on the schematic. Connect ground and power between this board and the board where you'll be recovering another Atmega. Connect pin 13 of Atmega8 on the generator board to XTAL1 pin on Atmega to be recovered (pin 9 for Atmega8, pin 13 for Atmega32). Power them up, connect ISP cable to the board with Atmega to be recovered. Try to read fuses configuration on this Atmega and compare with the fuses configuration on the Documentation and FAQs page. Now write proper fuses configuration into Atmega to be recovered. Once recovered you should be able to read/write firmware into the recovered Atmega.
You do not have the required permissions to view the files attached to this post.
dmitri
Site Admin
 
Posts: 8706
Joined: Fri Aug 03, 2007 8:05 pm

PreviousNext

Return to MegaDrum Hardware

Who is online

Users browsing this forum: Google [Bot] and 91 guests