hope I didnt fry my crystal.

So I was building a breadboard arduino with the atmega328 and I think i sorta maybe connected one of the capacitors from the clock crystal to the 5v rail instead of the ground. I'm pretty sure it is fried because the led blinks starting slow then speeds up really fast and the shuts off until i reset it. Is it possible that I may have fried the atmega also? I was also using a max 232 chip. Do I just need to buy a new crystal and all is well?

If you connected the ground side of the capacitor to +5V instead of ground the circuit would still work fine - +5V is the same as ground from a high-frequency AC perspective.

Perhaps you shorted one side of the crystal to +5V? If this was the crystal oscillator output pin that could damage the chip.

Can you install the atmega into an Uno or something and confirm sketches will still upload? If so, write a sketch to change the LED blink behavior. Upload it, test that it works in the Uno, and put the chip back in the breadboard. If that runs, would be a good indication the breadboard parts are fine.

They are ceramic capacitors so polarity doesn't matter right? Unfortunately I have the SMD Uno version. Guess I will have to try buying the pieces again and see what still works. Here is a picture of what I did. I think what happened was I was following 2 tutorials on breadboard arduino, and the rails were different on both tutorials. Lesson learned I guess.

That one miswiring should have caused no problems or damage. Caps block DC, so no current passed through the cap to the crystal. Move it to ground as it should be and check for loose connections.

In building Arduinos remember to always measure twice and cut once. :wink: