Pages: [1]   Go Down
Author Topic: Standalone Atmega8u2 gotchas?  (Read 1794 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I put an Atmega8u2 on a circuit board together with a crystal and an ICSP, plus power and some peripherals I want to control, including a Atmega328 (this part is similar to an Uno.) I also hooked up an USB connector, with TVS to ground and 22 ohm resistors. And the 1uF capacitor for the USB regulator. And pulling /RESET up to +5V through a 22k resistor.

I want to program this through ICSP. However, when using AVRdude, it fails to connect with Rc=-1.
I'm using an usbtiny. I can connect to the 8u2 on an Uno board, so the programmer and software are ok. I can also program the 328 through its separate ICSP so at least its clock and power is OK. That doesn't mean the 8u2 isn't hooked up wrong, but it means there's no systemic problem with the board.

I believe all the QFP legs are well soldered, and not shorted. I have tested what I can with an ohm meter, and it checks out. Yet ICSP doesn't see it, and it also doesn't answer when plugged into the USB of a computer.

The data sheet says it should come with internal RC clock, divided down to 1 MHz, so the crystal shouldn't even matter yet. What else can I have gotten wrong?


* 8u2-schematic.png (148.38 KB, 800x502 - viewed 63 times.)

* 8u2-board.png (704.22 KB, 1024x655 - viewed 67 times.)
« Last Edit: February 17, 2012, 11:34:39 pm by jwatte » Logged

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, now, don't everybody answer all at once! One at a time, please.

Anyone? Anyone? Bueller?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26554
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe a stronger reset pullup resistor?  You show a 22K with a cap to ground which will make for slow ramp up, most designs only have 10K & no cap.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe a stronger reset pullup resistor?  You show a 22K with a cap to ground which will make for slow ramp up, most designs only have 10K & no cap.

I guess I can cut the cap and try it out. Thanks for the note!

I did take it out, but it still doesn't respond at all to the ICSP. (rc=-1, meaning the usbtiny finds "nothing there" on the SPI.)

You had my hopes up there for a while :-) Thanks for your time, though, I appreciate it! More eyes are almost always better.
« Last Edit: February 19, 2012, 02:50:14 am by jwatte » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26554
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Good luck!
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1328
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


 My only suggestion would be to check to see if you have 5v and GND where they belong when you power your standalone. It is hard to do with standard meter leads but, you can wrap a strand of wire on the end of a lead to help probe the small areas.
Logged


Switzerland
Offline Offline
Sr. Member
****
Karma: 6
Posts: 375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What's your programming baud-rate?
Logged

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I tried with -i 1, 10, and 100 for SPI rate control. Rc=-1 for all.

It is possible I toasted the chip when soldering. I first tinned the pads, then positioned the chip and mashed one side at a time until it melted. My tip is set at 625 F, but the sensor is pretty far in, so I don't think it's as hot at the end.

Is the 8u2 super sensitive to solder heat? If I try to reflow on a hot plate or toaster oven, I'm not sure it will really be any cooler...
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26554
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.atmel.com/Images/doc7799.pdf

The data sheet doesn't discuss soldering temps. Probably have to find a reference for the package itself somewhere.

Were you soldering with solderpaste, or regular lead/tin 63/37 or 60/40 type of solder which requires higher temps to melt?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26554
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.atmel.com/Images/doc8583.pdf
So about 220C is the peak for reflow soldering.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm using 63/37.
But ROHS requires 260 C reflow...
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you removed the cap from the reset pin, it WILL mess the ISP programming, is MOSI connected to MOSI, MISO to MISO, CLK to CLK?
You should program at a max of 250Khz, but try slower, because the internal oscillator as some drift.
What programmer are you using?
And finally there is no Atmega8u2 available in DIP package, all USB enabled atmegas come in SMD packages, so you have either an atmega8 or an atmega88.
Logged

Offline Offline
God Member
*****
Karma: 4
Posts: 813
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you removed the cap from the reset pin, it WILL mess the ISP programming, is MOSI connected to MOSI, MISO to MISO, CLK to CLK?

I removed the cap, as I said above, and believe the signals are right.

Quote
You should program at a max of 250Khz, but try slower, because the internal oscillator as some drift.
What programmer are you using?

As I said above, I tried -i 10 (100 kHz) and -i 100 (10 kHz). I'm using an usbtiny.

Quote
And finally there is no Atmega8u2 available in DIP package, all USB enabled atmegas come in SMD packages, so you have either an atmega8 or an atmega88.

No, I have an atmega8u2 in TQFP32 - I did mention the QFP and USB above. I described tinning the pads before positioning the chip, and talked about the heat of reflow in comparison with hand soldering.

So, thanks for the advise; I had taken it all already ;-)
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know this is an old thread, but if you're still struggling with this, maybe this will help. I managed to pull this off yesterday. I was able to program an atmega8u2 on a breadboard (with a breakout PCB) using an AVR ISP mkII programmer. I tested it by loading the Blink example onto an atmega326-PU that had the Uno bootloader on it.

My circuit is a bit different from yours. I'm using USB bus power and I think the reset pins are handled a little differently. I've attached a pdf of the Fritzing breadboard. I should be documenting this better sometime soon.

* atmega8u2_standalone_01_bb.pdf (1178.9 KB - downloaded 27 times.)
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 76
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quick note: Obviously the IC in that diagram isn't an atmega8u2, but a breakout board I made. I've attached what that looks like.

* atmega8u2Breakout_001_pcb.pdf (663.87 KB - downloaded 21 times.)
Logged

Pages: [1]   Go Up
Jump to: