Go Down

Topic: Standalone Atmega8u2 gotchas? (Read 2119 times) previous topic - next topic

jwatte

Feb 18, 2012, 05:27 am Last Edit: Feb 18, 2012, 05:34 am by jwatte Reason: 1
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?

jwatte

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

Anyone? Anyone? Bueller?

CrossRoads

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.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jwatte

#3
Feb 19, 2012, 08:34 am Last Edit: Feb 19, 2012, 08:50 am by jwatte Reason: 1

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.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

cyclegadget


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.
Good links: Eagle tutorial= http://www.youtube.com/playlist?list=PLDE1858BD83D19C70
General Arduion tutorials = http://tronixstuff.wordpress.com
http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=123

tim7

What's your programming baud-rate?

jwatte

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...

CrossRoads

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?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

CrossRoads

http://www.atmel.com/Images/doc8583.pdf
So about 220C is the peak for reflow soldering.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

jwatte

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

Senso

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.

jwatte


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 ;-)

mattgilbertnet

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.

mattgilbertnet

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.

Go Up