328p TQFP problem

Hi people, I’m just learning so need your advice.

I’m trying to use 328p TQFP in my project. So I’ve made a small pcb-converter and soldered a blanc chip using hot air.

The problem is that it doesn’t work when trying to connect it via ISP. I’m using stk500 and avrisp mkII. Avr studio doesn’t detect it. If use regular dip28 or just any arduino - all works good.

I’ve desoldered the chip and put another one (both new). Still doesn’t work.

Could someone explain me how properly to wire TQFP 328p. For dip28 I’ve used just crystal, even without caps, and all worked good.

Is it possible that I’ve damaged both chips with hot air? I’m using paint stripper gun at lower speed (instruction says its 400C)

Again, I’m really not too familiar with all of this so need some help from more experienced.

Few pics of what I have. There is a ground pin of crystal in the air, it’s happened after testing. And also 99,9% there are no shorties, checked with microscope.

Thanks in advance.

All GND are connected, all Vcc are connected and also to AVcc : good.
Crystal without two 22pF : not good.
No decoupling capacitor of 100nF at Vcc and GND : not good.

Trying to run a microcontroller without decoupling capacitor ? That decoupling capacitor is the most important component of your design.
A DIP version that runs with a crystal but without the 22pF caps ? That's magic.
Perhaps the TQFP is a different series of ATmega328P that are slightly different ? Because they all have the same chip die inside.

As to the dip28 atmega328p without caps - just believe me, I didn’t have them that day. It worked perfectly. I’ve used this crystal. Probably this is some special crystal. See attached.

In this case I’ve used 3 pin resonator from nano, it should have caps already in it.

As to the 100nf cap - as you can see from the pics I’ve used 0.1mf cap. It’s kind of the same:)

I’m pretty sure they are the same 328p. I mean the main question is: are wiring diagrams for dip28 and TQFP differ somehow?

S20160801_0001.jpg

I see, a ceramic resonator, yes, probably with the caps inside.
A decoupling capacitor is not an electrolytic capacitor. Can you find a normal 100nF capacitor ?

The DIP28 is the same as the TQFP. The DIP28 is missing the pins for A6 and A7, but the A6 and A7 are inside the DIP28, without pins to the outside. The wiring and working of the chips is exactly the same.

For the communication with the ISP to work, a clock is needed. I think they are in the factory set to internal clock. Once you set the clock as external, without a good clock signal, then the ISP is no longer working.

Try again, check everything. It should work.

OK, I've just found 104 cap.

What about 10k resistor to +5v from reset pin? Is it needed?

Yes.

I’ll try to make a super simplified PCB in order to check just if it detects.

PS I don’t get it, Dip28 works with just the crystal. TQFP should have decoupling cap, resistor from reset etc. Why if they are the same?

Sorry fro stupid questions:)

If they are the same, then it is the same.
The ATmega chips were changed, so perhaps there is a difference. Or the extra metal of the longer pins of the DIP version changed it.

A crystal needs two 22pF, the /RESET needs 10k to Vcc, and the power needs a decoupling cap.
When you do things that are almost not possible, then anything can happen.

You ask the wrong question.
For example : A car with an empty fuel tank and no tires, still runs. Why ?
Then I would ask : Do you want to go somewhere ? Then get gas and tires.
The same for the ATmega. Do you want to make it work ? Then forget about the almost impossible and make it work.

Don't hesitate to ask questions though :wink:

ok, will do this pcb right now with everything needed. Will let you know about the result asap.

Also probably tomorrow will make a short video about dip328p working with just a crystal.

You have the wrong crystal. You should have a 16.0000 Mhz crystal.

raschemmel:
You have the wrong crystal. You should have a 16.0000 Mhz crystal.

you mean that one with 16.6667? is this a big difference between this and 16? actually that one was included in STK500 board package.

Anyways, it works with a lot of chips I played with (1284p, 16, 32, 328p etc.)

Minor overclocking usually works with any uP. I once used a 6 Mhz crystal in place of tge original 4 Mhz crystal on a 6800 uP trainer and it worked, which is a much greater diffrrence than what you did.

Allright, it works:) I’ve made that pcb but to test the atmega I was pressing it with fingers. It recognized immediately and then I burned fuses and upload the blink sketch. OMG I’ve almost broke my finger))

Seems like previous few time I was simply overheating them. So all in all it cost me 3 burned chips to figure out everything:)

PS tested one more time the dip28 with just that 16.666 crystal and it still works braking all rules:))
video to follow

I'm glad you found the problem :slight_smile:
Look at 16:30 EEVblog #186 - Soldering Tutorial Part 3 - Surface Mount - YouTube
Adding extra flux, to solder the small smd pins with a big solder iron.

With a 16.666 MHz crystal, the baudrates are wrong. That means you can not upload the sketch with a bootloader and can not use the serial monitor to print variables.

With hot air start relatively cool and wait. You have to warm the entire board through and any attempt
to rush will involve using much higher temperature air than the melting point of your solder,
which can cook the chip before its leads and pads are hot enough.

So first check the melting point of your solder/solder paste and set the air temp above that
a modest amount. If it doesn’t melt in 1 minute, inch up the temperature slowly. Lots of flux,
always, or you’ll oxidize the leads and board and solder will refuse to wet it.

Its a good idea to soak the nearby board to 150C (300F) or so first, then go up in temperature, this
shortens the time the local part of the board is really hot, and its the normal flow-solder profile
used to make boards - it allows better matching of max temperatures between different components.
Remember vias conduct heat through the board to the other side, so until the board is hot both
sides you’ll have cold spots around each via delaying reflow.

raschemmel:
Minor overclocking usually works with any uP. I once used a 6 Mhz crystal in place of tge original 4 Mhz crystal on a 6800 uP trainer and it worked, which is a much greater diffrrence than what you did.

From the datasheet:

– Up to 20 MIPS Throughput at 20MHz

Does it really count as "overclocking" if it's still far under the limit?

Does it really count as “overclocking” if it’s still far under the limit?

No, I suppose not. My point was that usually if the uC frequency is 16.000 Mhz, that’s the frequency crystal you use but apparently the 16.666 Mhz crystal in the photo is ok.

Allright, it works:) I’ve made that pcb but to test the atmega I was pressing it with fingers. It recognized immediately and then I burned fuses and upload the blink sketch. OMG I’ve almost broke my finger))

Seems like previous few time I was simply overheating them. So all in all it cost me 3 burned chips to figure out everything:)

PS tested one more time the dip28 with just that 16.666 crystal and it still works braking all rules:))
video to follow

So what then was the reason it didn’t work originally ? (poor connection ?)

raschemmel:
No, I suppose not. My point was that usually if the uC frequency is 16.000 Mhz, that's the frequency crystal you use but apparently the 16.666 Mhz crystal in the photo is ok.

I believe the reason is historical. The original chip used in the Arduino boards had a 16MHz limit, so that's what they clocked it at. When they changed to the 328P with a 20MHz limit, they underclocked it to 16 so everything would be the same. Changing the crystal speed by 700 kHz won't make the chip stop functioning, but someone else mentioned earlier that Serial baud rates would be wrong. Also the timers for millis and micros will run slightly too fast.

So what then was the reason it didn't work originally ? (poor connection ?)

Apparently.

raschemmel:
So what then was the reason it didn't work originally ? (poor connection ?)

I think I just burned few first attempts with hot air. That was my first try and also I used the hot air gun with no temperature indication, just 2 speeds, 400c and 550c. MarkT is right, I started too fast and simply overheated the chip before paste had melted.

What about an idea to preheat the board putting it on the electric griddle and then adding heat from top with the heat gun?

I think what you are doing is "tricky" to put it mildly.