Go Down

Topic: how to run bootloaded microcontroller with sketch without arduino board? (Read 481 times) previous topic - next topic

webaddic

Hi All,

I have finally managed to bootload Atmega 328p-pu controller and uploaded the "blink" sketch and its working with arduino uno (Led on pin 13 blinks). 
i want to now take out that microcontroller and use it as a standalone device .......
So i removed the chip from arduino and placed it on a breadboard.
i then connected a 10 k risistance with pin 1 to +5v.
i then connected the vcc to avcc(pin7 to pin 20) and connected to +5v
ground to ground.
then i connected 16mhz crystal to pin 9 and  10. and connected 22pf cap .(to ground)
i then connected the led to pin no 19.
(all the pins connected with the help of pin out guide of atmega 328)

It does not work..... please help me out... correct me where ever i m wrong.... or tell me the additional steps,.......

thanks in advance


webaddic

thanks for the quick reply....

i know that i m making standalone arduino but i cant run a simple program by doing so....

CrossRoads

Your LED may be backwards - and don't forget a current limit resistor, something in the 180 (bright!) to 1K (dimmer) range. The sketch expects the LED anode on 19, then cathode to resistor, and resistor to Gnd.
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.

webaddic

Thanks for the reply "Crossroads"

I did that check to ........
( by the way thanks .......i finally bootloaded Atmega 328 because of you..... you guided somone to nick gammon's atmega bootloader program page snd i followed.... thanks again )

sorry for these stupid questions that i ask.... but i am in the process of learning......

i double checked everything....
i even tried the chip back on arduino uno to see if it got damaged accidently ...... but it works perfectly....

i dont know what to do .... where should i start now .... i checked and duble checked the connections. still scratching my head :(


webaddic

thanks alot for the hints you people provide.....
almost solved my problem...
just programmed the atmega 328 on internal clock and it works fine....
when i program it in 16mhz configuration then it is not working as it should ( I installed the clock to pin 9 , 10 with two 22 pf capacitors...)

i wonder i changed the crystals also to be sure that they are working as they should..... but still cant get them to work...

Go Up