Circuit for ATmega328p uno r3

Hello and fist of all sorry for poor English.
I have a question.
What is the real circuit, for uno r3 Oscillator.
I want to use Arduino uno r3 ATmega328p in another circuit.
But It has so noise in Oscillator circuit and always goes to restart.I closed my circuit the same as arduino schematic.
My circuit feeding is from Arduino's Board +5v and GND.What can I do for that?
Thanks.

Do not cross-post. Other thread removed.

Nobody is answer me.please.

Shows us a schematic or picture, or a better explanation of your setup.

Is this a fresh Atmega328 or one with the bootloader already on it?

Hello.Yes I'm using the uno mega I mean ATMEGA328P.
My circuit is the same as below.Sorry for poor Image.
And here is code.A simple blink.

void setup() {
pinMode(4,OUTPUT);
}

void loop() {
digitalWrite(4,HIGH);
delay(500);
digitalWrite(4,LOW);
delay(500);
}

If it's in a loop, how can you tell if it's "restarting"?

But It has so noise in Oscillator circuit and always goes to restart.

Is the resonator connected to the ATmega chip with short leads?

Are you sure that's the problem? Re-starting sounds like a problem in the reset circuit (or a program bug).

Yes , sometimes micro is locked and do nothing and is last state.
For example led stays for 0.5ms on and sometimes stays for more than 10s , or when I close my hand near the circuit , led goes on and off, but when I'm away from circuit, micro locks.

Nobody is answer me.please

Hi.I am still here with my problem.
Do not forget me,thanks

You are being forgotten because you don't provide important information to help solve your problem, after you have been asked for it.

Your circuit needs 0.1uF caps from VCC and AVCC to Gnd. It also needs the other Gnd pin connected. (i.e. pins 20 and 22 need to be connected up).
Did you bootload the part so it is running at 16 MHz? If not, the as-shipped fuses will have the part running at 1 MHz from the internal oscillator.

Very thank you. How can I bootload ?
My 'LOW ' register for selecting oscillator is 0xFF.
Do you think I should change it.??????
Remind, Atmega328p.uno r3 micro.
Thanks again.

If you are using an ATmega328 with no bootloader then you probably need an UNO to load the bootloader in the new blank chip.

Is there any differences between Atmega328 and Atmega328p.?
Because my Arduino board has Atmega328p.

328P is Picopower, needs a little less current, and has an extra command or two for brownout level.
The parts have different signature byes. 328P is what the IDe code is set up for. 328 can be used with extra fooling around.

You don't have a bootloader in the chip , right ?

Actually, My Arduino is working well with micro inside in it,But when I am using arduino's micro in my circuit. I have this problem.

You haven't posted any code or schematic so I don't see how we can help you.

Please see answer #4.
Thanks

For example led stays for 0.5ms on and sometimes stays for more than 10s , or when I close my hand near the circuit , led goes on and off, but when I'm away from circuit, micro locks.

The code says it's half a second. As for the rest, of course it makes no sense.