Importance of clean soldering
Posted: Wed Jun 09, 2010 11:49 pm
Up until yesterday I had been doing all MegaDrum development using a development board assembled on a stripboard using Atmega32 at 16MHz. This is how it looks like:
From time to time I was getting inexplicable glitches but I was just ignoring them.
Of course I used the same board to develop the protected bootloader and the bootloader appeared to work fine. I also tested the bootloader with Atmega644P-20AU on a board I use to install into modules I build for sale myself and of course it worked fine as well. If interested, this how this board looks like:
Now, after Atmega bulk order I needed to program and test a bunch of Atmega644P-20PU in DIP packaging. Not surprisingly I decided to use my development board but replacing a simple 40 pin socket with a ZIF socket and wasn't expecting any problems since I already tested the bootloader with Atmega644P-20AU.
Yesterday the bunch of Atmega chips and two ZIF sockets arrived I got straight to the business. What an unpleasant surprise I got when I programmed the first chip with the protected bootloader - it was not working! The firmware update was failing all the time. I could not understand why the firmware update was working fine with Atmega32, Atmega644P-20AU but not with Atmega644P-20P although the last 2 are identical internally. I replaced a 20MHz crystal with a 16MHz crystal, checked for shorts/breaks, used PIC18F2550 and PIC18F14K50 - no luck. I already started to think there was in fact a difference between Atmega644P-20AU and Atmega644P-20PU which was causing the bootloader to fail.
Then I decided to test with the old bootloader and, to my surprise, it worked. I was going mad. Just to make sure I didn't miss anything I compared the firmware loaded with the old bootloader and the original firmware file and bang, there were some errors here and there but because the old bootloader didn't do any verification the process was finishing fine and if errors happened in not too many place the loaded firmware appeared to work fine. So in fact there were communication errors.
As a last test I decided to try at 12MHz and ... both the old and the protected bootloader loaded firmware without a single error. So I concluded the problem was with the devboard's quality, though I still didn't understand why it was working with Atmega32 at 16MHz (although I now remembered that I'd had a few failed firmware update attempts) but not with Atmega644P-20PU at 16MHz (not mentioning 20MHz).
It was 3:00 in the morning by the time and I thought I needed a sleep and a clean start.
The next day I quickly made a new Digital board (slightly enlarged to allow some space for a ZIF socket), soldered it and here we are - all Atmega644P-20P chips loaded MegaDrum firmware with the protected bootloader without a single failure. Here is my new devboard:
A few outcomes and observaions:
1. I now use a new devboard.
2. What good enough for Atmega32 is not so good for Atmega644
3. Stripboards are good ... only to some extent.
4. "Утро вечера мудренее". Choose any of the translations below:)
Night is the mother of counsel.
The best advice is found on your pillow.
An hour in the morning is worth two in the evening.
Tomorrow is a new day.
In every country the sun rises in the morning.
Have a sleep on it.
Sleep over it.
Fresh for tomorrow
From time to time I was getting inexplicable glitches but I was just ignoring them.
Of course I used the same board to develop the protected bootloader and the bootloader appeared to work fine. I also tested the bootloader with Atmega644P-20AU on a board I use to install into modules I build for sale myself and of course it worked fine as well. If interested, this how this board looks like:
Now, after Atmega bulk order I needed to program and test a bunch of Atmega644P-20PU in DIP packaging. Not surprisingly I decided to use my development board but replacing a simple 40 pin socket with a ZIF socket and wasn't expecting any problems since I already tested the bootloader with Atmega644P-20AU.
Yesterday the bunch of Atmega chips and two ZIF sockets arrived I got straight to the business. What an unpleasant surprise I got when I programmed the first chip with the protected bootloader - it was not working! The firmware update was failing all the time. I could not understand why the firmware update was working fine with Atmega32, Atmega644P-20AU but not with Atmega644P-20P although the last 2 are identical internally. I replaced a 20MHz crystal with a 16MHz crystal, checked for shorts/breaks, used PIC18F2550 and PIC18F14K50 - no luck. I already started to think there was in fact a difference between Atmega644P-20AU and Atmega644P-20PU which was causing the bootloader to fail.
Then I decided to test with the old bootloader and, to my surprise, it worked. I was going mad. Just to make sure I didn't miss anything I compared the firmware loaded with the old bootloader and the original firmware file and bang, there were some errors here and there but because the old bootloader didn't do any verification the process was finishing fine and if errors happened in not too many place the loaded firmware appeared to work fine. So in fact there were communication errors.
As a last test I decided to try at 12MHz and ... both the old and the protected bootloader loaded firmware without a single error. So I concluded the problem was with the devboard's quality, though I still didn't understand why it was working with Atmega32 at 16MHz (although I now remembered that I'd had a few failed firmware update attempts) but not with Atmega644P-20PU at 16MHz (not mentioning 20MHz).
It was 3:00 in the morning by the time and I thought I needed a sleep and a clean start.
The next day I quickly made a new Digital board (slightly enlarged to allow some space for a ZIF socket), soldered it and here we are - all Atmega644P-20P chips loaded MegaDrum firmware with the protected bootloader without a single failure. Here is my new devboard:
A few outcomes and observaions:
1. I now use a new devboard.
2. What good enough for Atmega32 is not so good for Atmega644
3. Stripboards are good ... only to some extent.
4. "Утро вечера мудренее". Choose any of the translations below:)
Night is the mother of counsel.
The best advice is found on your pillow.
An hour in the morning is worth two in the evening.
Tomorrow is a new day.
In every country the sun rises in the morning.
Have a sleep on it.
Sleep over it.
Fresh for tomorrow