I thougt of assembling my own project with the atmega328 without the arduino module.
Therefore I have done the following actions:
placed the atmega328 on a breadboard, connected it to a 5v power source,
connected the RESET pin to the 5v
connected the 16Mhz oscillator to capacitors (I didn't have 22 pf so I used other small capacitors) and to the chip
And waited for led 13 to blink.
However, It seems like chip doesn't response.
When placing it back to the arduino it works properly, and connecting the power source to ampmeter I see it consumes current.
You also need +5vdc wired to pin 7 and a ground to pin 8. And if that blob is a LED it is on wrong pins and needs a series resistor, if it's just a smug on the picture then never mind.
Are you sure it didn't blink once and then self destruct? (Where's the current limiting resistor?)
Don
don't worry, this LED can handle 5v, and no it didn't burn.
retrolefty:
You also need +5vdc wired to pin 7 and a ground to pin 8. And if that blob is a LED it is on wrong pins and needs a series resistor, if it's just a smug on the picture then never mind.
that's right, I have changed the wires to the right Vcc and ground, but still it doesn't work
here is the new breadboard:
You might try adding a .1ufd 'bypass' cap across pins 7 and 8, as there is lots of chance of power noise as your power wiring is pretty long runs to your power source. Also a pull-up resistor to pin 2 (arduino pin 0), 1-10K ohms, may prevent noise from causing the bootloader to hang on improper serial input noise.
(I didn't have 22 pf so I used other small capacitors)
Are the capacitors between 12pF and 22pF and are they both the same value? You might try repositioning the crystal and the capacitors so that you do not need hookup wire between them and the chip. Put the crystal in at an angle and bridge the capacitors over the 'blue line' between the horizontal and the vertical runs of your breadboard.
retrolefty:
Also a pull-up resistor to pin 2 (arduino pin 0), 1-10K ohms, may prevent noise from causing the bootloader to hang on improper serial input noise.
Lefty
do you mean a resistor should connect between pin 2 and the Vcc?
floresta:
Do you mean that this particular LED has a built-in current limiting resistor, or that it is a magic LED?
Don
I meant that the led can still work at 5v and nothing bad will happen to it if it will light for a few seconds
floresta:
(I didn't have 22 pf so I used other small capacitors)
Are the capacitors between 12pF and 22pF and are they both the same value? You might try repositioning the crystal and the capacitors so that you do not need hookup wire between them and the chip. Put the crystal in at an angle and bridge the capacitors over the 'blue line' between the horizontal and the vertical runs of your breadboard.
retrolefty:
Also a pull-up resistor to pin 2 (arduino pin 0), 1-10K ohms, may prevent noise from causing the bootloader to hang on improper serial input noise.
Lefty
do you mean a resistor should connect between pin 2 and the Vcc?
Yes, if you have nothing wired to pin 2 then it will be floating and can cause the bootloader to hang up on noise. It's not a fix all, but needed in your breadboard set-up as shown.
floresta:
Do you mean that this particular LED has a built-in current limiting resistor, or that it is a magic LED?
Don
I meant that the led can still work at 5v and nothing bad will happen to it if it will light for a few seconds
There are two issues here the led and the output pin, a led without a resistor will draw too much current from the arduino output pin and can damage the output pin as well as the led. Just because the led is not damaged yet doesn't mean the output pin hasn't been overstressed. ALWAYS use a series current limiting resistor when wiring leds to arduino output pins. To not use a resistor is foolish and will bite you sooner or later.
floresta:
(I didn't have 22 pf so I used other small capacitors)
Are the capacitors between 12pF and 22pF and are they both the same value? You might try repositioning the crystal and the capacitors so that you do not need hookup wire between them and the chip. Put the crystal in at an angle and bridge the capacitors over the 'blue line' between the horizontal and the vertical runs of your breadboard.
Don
the capacitors are 0.1 uf each, is that too much?
Yes, much too much and probably the reason your set-up isn't working as the crystal can't oscillate.
I thougt of assembling my own project with the atmega328 without the arduino module.
Therefore I have done the following actions:
placed the atmega328 on a breadboard, connected it to a 5v power source,
connected the RESET pin to the 5v
connected the 16Mhz oscillator to capacitors (I didn't have 22 pf so I used other small capacitors) and to the chip
And waited for led 13 to blink.
However, It seems like chip doesn't response.
When placing it back to the arduino it works properly, and connecting the power source to ampmeter I see it consumes current.
These are the instructions for setting up an Atmel chip on a breadboard.
Make sure the microcontroller is plugged in starting at row 11 bridging across the two sides
of the breadboard.
Set up Power to the Breadboard
Connect the left and right rails of the breadboard with two pieces of
wire, connecting red to red and blue to blue.
Plug the voltage regulator (7805) into the breadboard on the left side.
Plug the input pin into row 28, the ground pin into row 29 and the
output pin into row 30.
Make sure this is correct, or else it won't work!
Then using wire connect row 29 of the breadboard to the blue
(ground, “-”, GND) rail.
Now connect the red wire of the battery clip into row 28.
Connect row 30 of the breadboard to the red rail.
Connect the black wire of the battery clip to the blue rail.
Do not connect the battery yet!
Wire up the Microcontroller
You will need to cut and strip 6 short wires for this step.
Using wires, connect pin 7 of the microcontroller to the red (+5V) rail of the
breadboard.
Connect pin 8 of the microcontroller to the blue (GND) rail.
Connect pins 20 and 21 of the microcontroller to the +5 rail (this is on the
right side of the breadboard).
Connect pin 22 of the microcontroller to the GND rail.
Connect the RESET pin (pin 1) to the +5V rail.
Connect the crystal oscillator to pins 9 and 10 on the MCU.
Insert the 0.1uF capacitor between pins 7 and 8 of the microcontroller (+5V and GND).
Connect row 25 on the left side of your breadboard to GND. Connect a SPDT switch into rows
24, 25, and 26 of the breadboard. The switch will connect pin 14 of the MCU to GND when the
switch is up and disconnects it when the switch is down. This will allow us to tell the MCU when
we want it to boot into programming mode or to run the program already on the chip.
Wire up USB cable
Connect the black wire to the blue GND rail.
Connect the red wire to row 9 of the breadboard (Row 9 is an empty row)
The red wire can be used to supply power to the MCU if connected to the Positive rail on the breadboard,
remember to disconnect the battery!
Connect the yellow wire to MCU pin 2 (row 12 on the breadboard).
Connect the green wire to MCU pin 3 (row 13 on the breadboard).
Here is the Datasheet for the Atmel chip it shows what the pinouts are.
Also if your chip is new it needs a bootloader.
If your wanting to build your own Atmel based microcontroller check out Nerdkits.
They send you everything you need along with great instructions, they also have a support forum with tutorials.
Make sure the microcontroller is plugged in starting at row 11 bridging across the two sides
of the breadboard....
My breadboard doesn't have any numbers on it. Now what do I do?
What about the capacitors that are supposed to be used with the voltage regulator? I don't see them mentioned.
Don
If your breadboard doesn't have numbers on it then number it, or buy one that has the standard numbers and letters on it.
Only one capacitor is needed I listed it and it's connected to VCC and ground not the voltage regulator! "8. Insert the 0.1uF capacitor between pins 7 and 8 of the microcontroller (+5V and GND)."
This is how I have mine hooked up on my breadboard and it works fine. I bought a kit that included instructions and all the needed parts.
I found another breadboard but it's numbers are upside down and only every fifth number appears. Can I use the other rows? My letters are upside down as well and they are capitalized, will that make a difference?
I can't believe that you are responding to my idiotic posts instead of to the one that started all this. Actually the capacitor part was for real, I think Gomer knows as much about three terminal regulators as his namesake.