Go Down

Topic: Mega 644 problems (Read 7938 times) previous topic - next topic


I just tried this code and it produces exactly the same results.

One of the first things I tried yesterday was to burn the hex code of my original test program generated by the Arduino ide direct to the chip by avrisp2 and that produced what I thought was a fix, but after a few dozen more button presses the problem showed up again, a few seconds delay until the led lights again.


I have just backtracked and double checked this and realised that the test I did above with your code was with a 2k2 pullup resistor on the reset pin. If I tie the pin direct to 5V the problem appears to be fixed.


Very strange.
I use a 644P and havent noticed issues like this.

Are you still using the Sanguino bootloader/core?
Have you tried the ones MarkS has developed/compiled on his website? www.avr-developers.com
I think the alternative core is called the Duino-644P.

Download it and give it a try if you havent already.
I have had issues with the Sanguino core, but not for input/output stuff. I now use the Duino-644P core.


Hi WanaGo, yes I have already tried that and it is the same. I just checked and found that all the chips I have got are from the same batch, I suppose it is not beyond a slight possibility that they might be the problem.


WanaGo, Which bootloader are you using with your 644 chips? There isn't one in my arduino-extras directory.


Coding Badly, I have just done another test and now I am going to have to stop until I get a new batch of chips come in.

If I program the chip (any of them) with your latest code as above via the Arduino ide using the Sanguino bootloader, then with a 2k2 pullup on the reset pin the problem persists.

If I tie the reset pin directly to 5V then the problem appears to go away.

If I load the hex file from the ide directly by avrisp then the chip starts up with the led blinking regardless of what the reset pin is connected to.


Apr 30, 2011, 11:37 pm Last Edit: Apr 30, 2011, 11:39 pm by WanaGo Reason: 1
Hi Wiz,

I believe I have just been using the Sanguino bootloader.
You are correct, the extended core files from Mark do not include a bootloader for the Duino-644P. I did a quick google search and found an adafruit forum topic which said to just use the Sanguino bootloder.

You think the problem exists in the bootloader itself?

You should try the new core files without the bootloader, adding an extry into the boards.txt file, to use whatever ISP programmer you use instead - and see if that has the same problem.

This is one I use, you may need to change it to suit the ISP programmer you use if it is different.

Code: [Select]


# Ext. Crystal Osc 8Mhz+, Start-up time 16K CK + 65 ms; [CKSEL=1111 SUT=11]
# Brown-out detection level at VCC=4.3 V; [BODLEVEL=100]
# Serial program downloading (SPI) enabled; [SPIEN=0]
# Boot Flash section size=512 words Boot start address=$7E00; [BOOTSZ 11]
# Boot Reset vector Disabled [BOOTRST=1]



The blank empty644P.hex file specified was created using this method, Message # 15 from Coding Badly:

Make sure you add this to the boards.txt inside the new core file directory (arduino-extras).

So basically, connect the chip to the ISP, select this new board, write the bootloader (which is just a blank file), and then program it and see what happens.

Let me know the results.


Thanks for the reply.
I think the problem is with the chips even though they are four brand new ones out of the tube and it doesn't really explain how the other 21 chips from the same tube have been running for over two years without problems.
Anyway, the new chips have been ordered and I will update this post as soon as they arrive. 


You should try this anyway with the current chips ;)

Just for sh*ts and giggles.

Go Up