Step 2: Section 2 - the ATMEGA328P-PU Microcontroller !

Also There are TWO options for these Kits in this Section, You can either have: Reading Material: Main Differences between Ceramic & Quartz Resonators (Oscillators) {Just google this title for many other sources and more definitions so you have a range of answers not only from one location!}

Also i had copied directly from the ATMEL Datasheet to display the EXACT pin connections of the microcontroller and also a picture from the internet showing clearly what pin connections the Arduino Corresponds with the Pin Connections on the Actual ATMEGA328P-PU  Chip  ! Also the ATMEGA168 has the same pin-connections as the ATMEGA328 just for your information !

***** Always Always Always CHECK and DOUBLECheck the pin connections on the LASTThree Pictures in this step's picture list, refer to the one above to know exactly where you are connecting the Wires onto the microcontroller and the LAST Picture in the List Shows you how to SAFELY Bend The ATMEGA328 P-PU chip's Pins so that they fit smoothly into your breadboard or IC Socket, also as this will better familiarize yourself with the pin connections AND when your ready to power up the microcontroller CHECKaTHIRD TIME that everything is connected as it should be from this 'ible ! *****

Okay here we go!

Start by taking the last 1K Resistor (Colours: Brown , Black , Red , GOLD ) as seen in the 1st small picture below (Picture 1) and bend is so it looks like the 2nd small picture Below (Picture 2) and insert it as shown in the pictures below (Picture 3)...

Next, take the BLUE LED and insert it as Picture 4 Shows making Double-Sure you see exactly which side the 'Flat-Notch' is on as you can see in the picture Below (Picture 4) and just in case you cant see it clear enough - look closely to the right-side of the LED below, thats the MINUS ( - ) LEG so thats the leg that the 1K Resistor Connects to:(Now if you want to make this to have a LOW-Parts-Count you can choose to not use the Blue LED and its 1K Resisotr but these two components are used to test the Breduino with the 'Blink' Sketch later on, but its completely your choice ! lol)

Now time to add my  Blue wire-link  - NOTE that the wire link will go from the POSITIVE Side of the LED ( + ), look at the picture Below Carefully (Picture 5) and notice that its sitting in the hole just above the (Anode, + ) POSITIVE Side of the LED and there are EXACTLY FOUR holes that this  Blue wire-link  skips before entering the 5th hole - THIS IS VITAL IT STAYS CORRECT !!! (This is Pin 19 on the ATMEGA Chip also known as Pin13 of an Arduino, Please refer to the 'Pin Mapping Picture' at the end of the pictures list or at the beginning of Section 2, THIS Section !)

                                 ---   ***   !!!   ATTENTION   !!!   ***   ---         

Now BEFORE PROCEEDING ANY FURTHER - THIS IS THE TIME TO SLIP ON an AntiStatic-Writband to make sure you do not accidentally destroy or damage the precious ATMEGA328P-PU  Microcontroller as you go to Place it into the breadboard for this step and i have pointed out a good number of times the very-REAL-threat/s of ESD Damage on components that are susceptible to this kind of damage and if you know what your doing jus ignore me rambling-on and continue with this Guide but please note that without proper ESD Prevention - you could essentially damage your ATMEGA Chip and it necessarily wont show up straight away that its been damaged but could even take months before it fails completely so Prevention IS Better than a Cure i always say (Computer-Repair Background for me!) so as long as you observe these tips carefully there shouldn't be any problems...

A Quick Tip though:
I used-to repair my computers/laptops for over 10 years without EVER owning an Anti-Static Writsband because i ALWAYS used-to touch the computer's power supply metal housing BEFORE & DURING handling ANY sensitive devices susceptible to ESD damage AND NEVER move my feet after touching the computer's power supply housing -  as i always had carpet on my floors and we all know rubbing your feet on carpet causes static electricity to build up and ive NEVER EVER had any device FAIL on me EVER - So it is Completely Possible to be safe in the use of these Microcontrollers without an AntiStatic Wristband BUT YOU MUST GROUND YOURSELF BEFORE & DURING TOUCHING such Sensitive Devices and the Anti-Static Wristbands are so very cheap nowadays i treated myself to 4 of them from China lol !!!

Take the chip out of its special Anti-Static IC Tube, these Microcontrollers Usually Come from the Factory with their pins slightly 'splayed' - what this means is that the pins wont line up totally with the holes on the breadboard or an IC Socket so you will need to SLIGHTLY & GENTLY bend them so that they are pointing straight down or even slightly inwards to have a good fit into the breadboard and one way to do this accurately like in the picture Below:

So Look at the picture below (Picture 6) and insert the ATMEGA Chip into the breadboard as shown Below MAKING SURE that PIN1 is inserted into the LOWER-BOTTOM-LEFT had-side of the breadboard (Click on Picture 6 in the LIST of pictures just under the title of: Step 2 Section 2 - The ATMEGA328P-PU  Microcontroller ! above for notes displayed onto Picture 6)

Ok now grab the last 0.1pF (100nF) Ceramic Capacitor and place as shown in Picture 7 (into the holes where PIN 7 & PIN8 are on the ATMEGA Chip!) along with the two power wires also as shown (RED Wire to PIN7 & BLACK Wire to PIN8 of the ATMEGA Chip!)

Add the next Two brown wire links as shown in the 1st picture Below-LEFT (Picture 8) {into PIN9 & PIN10 of the ATMEGA Chip} - these are for your choice of installing either a 16Mhz Ceramic Resonator (with Built-in Capacitors) OR a 16 Mhz Quartz Crystal Resonator that must have TWO accompanying 22pF Ceramic Capacitors... Firstly i will show how to connect the Ceramic Resonator - place this as shown in the 2nd picture Below (Picture 9), these resonators you can place in any direction but i like to have the writing on the component facing me but you can place them how you please, placed into the 3 holes that are shown in 2nd picture Below-RIGHT..

In the picture Below (Picture 10) place a black Ground wire ( - ) as shown !

Now we will be installing the Quartz Crystal Resonator in place of the ceramic one, If you either dont have a Ceramic Resonator OR your project is a timing project that needs greater accuracy then the picture Below-LEFT (Picture 11) shows just after installing the two brown wire links and the Capacitor added on the picture on the picture Below-LEFT is the first 22pF Ceramic Capacitor and the Below-RIGHT picture (Picture 12) is showing the second 22pF Ceramic Capacitor in place...

The Below-LEFT (Picture 13) shows placing the Quartz Crystal Resonator - now - you can put these in any way round in the two holes its in but again, i prefer to be able to read the writing printed on the top of them but its completely up to you how you want to place it ! And finally the picture Below-RIGHT (Picture 14) shows adding the Black 'Ground' wire link and thats it for the part on Resonators !

So Now you Can Choose which type of Resonator you want to use or that comes with your kit !!

For installing the Tactile Switch (Which is used to either Reset the Breadboard Arduino or to initiate the "Manual Reset To Upload Sketches" which i will cover in the last Section of this Guide!), look at the TOP-LEFT picture Below (Picture 15) to start with placing a  Green wire link  like so, Then look at the TOP-RIGHT picture (Picture 16) Bend a purple wire link as shown - this makes it easier to place into the holes without interfering with any other wires, insert the switch as Shown in the BOTTOM-LEFT picture (Picture 17) then insert the  Bent purple wire-link in the BOTTOM-RIGHT picture (Picture 18) ! { The GREEN wire link is first inserted into the PIN1 of the ATMEGA Chip & the Bent Purple wire link is inserted into PIN2 of the ATMEGA Chip which is the "RX" pin used for uploading sketches to the Arduino}

Now add a Black power (Ground) wire link as shown in the picture Below-LEFT (Picture 19) and the picture Below-RIGHT (Picture 20) is a close-up showing which way round the switch goes!

Now Bend both the 10K Resistors (Colours: Brown, Black,ORANGE,GOLD) as shown in the TOP-LEFT picture Below (Picture 21) & Bend the 10K Resistor as shown in the TOP-RIGHT picture (Picture 22) and insert the first 10K Resistor as shown in the BOTTOM-LEFT picture (Picture 23) Then add another purple wire link as shown in the BOTTOM-RIGHT picture (Picture 24) ! { Longer Purple wire link is inserted into PIN3 of the ATMEGA Chip which is the "TX" pin used for uploading sketches to the Arduino}

insert a Single-Pin-Header into the hole as shown in the picture Below-LEFT (Picture 25) & Insert the last 10K Resistor as shown in the picture Below-RIGHT (Picture 26) {This is the Breadboard Arduino's RESET PIN and this will be needed for Uploading Sketches the "AUTOMATIC SOFTWARE RESET" way as i really cant be bothered exactly "Timing" however many seconds it is to hit and release the reset switch when uploading my sketches so i always use the software-reset & its just done automatically as soon as i press upload-button on the Arduino IDE Software and not be EVER hassled with my sketches EVER FAILING to upload !!!}

The next 3 pictures Below (Picture 27, Picture 28 & Picture 29) are all showing what i do to these male-pin-headers to make them stay inserted into breadboards because they tend to pop out as soon as you insert them, you can see from the 1st Bottom-Left picture (Picture 27) the first three pins at the top don't have enough of their length to stay inserted in breadboards so observe the last pin which i simply pushed through the black plastic housing, do this to all the pins and they will make better connections in the breadboard for later Uploading Sketches! The Bottom-Middle picture Below (Picture 28) is showing a set of four pins that ive pushed through the plastic to make them an even length on both sides and the two sets of pins showing on the Bottom-Right picture (Picture 29) is showing how they normally come and my pins that are of (almost!) equal length of both sides!!

Next Insert the 4-Pin headers into position as the two pictures Below Left & Below Right (Picture 30 & Picture 31) These are showing that the 3rd Pin of the Headers is connected to PIN 3 of the ATMEGA Chip through the Longer Purple wire link and the 4th Pin of the Headers is connected to the 10K Resistor which is connected to PIN 2 of the ATMEGA Chip through the Shorter Purple Wire Link- DO NOT GET THIS WRONG or you wont be able to UPLOAD Sketches without having problems !!

Add the two power wires as shown in the two pictures Below (Picture 32) & (Picture 33) and the picture on the Right (Below) is Showing you what the pin labels correspond to on the 4-pin header when its time for Uploading Sketches in the last section of this instructable! ! !  

Go and Make a Cup of Tea and Celebrate with a Slice of Cake or have a Kit-Kat as youve just Finished Making your Easy Breadboard Arduino Compatible and take a Well-Deserved Break and join me in the last Section after youve stuffed yourself with a treat, lol ! (British here so we like alot of Tea and cake, lol)

                    Jump into the final part of this Guide:
Section 3 - Uploading Sketches with 2 Different USB Modules!         Go Back To Section 1 (Step 1)
<p>hello!!</p><p>thanks for sharing such a nice instructable.I uses this instructable to built an arduino uno and burned a basic led blink code on it with 1 sec delay in on and off of led. but problem is that it takes around 14 sec to on led and another 14 sec to off the led..</p><p>can you suggest where i am making a mistake.?</p>
<p>I follow this guide and got it to work using the PL2303 USB interface and a manual reset button. I have one quirk that it only gets a COM port assigned and can accept upload if one particular USB socket on my PC is used. And straight after the Arduino program finishes compiling I quickly press the reset button once, dont keep it pressed down. I am a noob at electronics and what I do is to help not frying my PC USB (I had 2 blue screen's of death in Windows 7 probably due to bad wiring) is to use two diodes on the +5V and +3.3 V voltage outputs on the PL2303.</p>
Dear Author, A really fantastic and superb INSTRUCTABLE. I searched the web for so many ways to upload the sketch but you MAN...Enlightened me with your knowledge....thank you ssssssoooooooo muchhhhhhhhhhhhh.........!!!!!!!!!!!!And by the same time can you send me schematic of the Instuctable my mail ID is mohamedabrez@gmail.com
waiting for ur replyyyyyyyyyy pls do reply sir......!!!!!!
Hello, my friend &quot;AshleyLad&quot; bought me this kit and had it sent to me in Swansea, I have a couple of questions if that's cool, I'm want to run the program from the &quot;DIY FlySky RF module&quot; from rc gourps but not sure if I need to change any code to run (all components ) on 3v3 so I don't fry the XL7105 module etc, can you help?
sorry for solution 3. - what i mean by no voltage regulators needed is that no extra external voltage regulators are needed as there is a 3.3v 250mA voltage regulator included in this kit ;-)
Good morning to you DJ,<br> <br> hey thanks, not so bad now, some days are inherently worse than others but still in alot of pain sadly :-(<br> <br> Do you only have the XL7105 Module that needs the 3.3v to power it or do you also have other 3.3v modules that need to be powered ??<br> <br> Well i have a few solutions, going from the low to high price-wise;<br> <br> 1. You can use a 3.3v voltage regulator to take the native 5v that your kit provides to drop the voltage to the 3.3v that any modules need, would be a good idea to use a decoupling/filter capacitor on the output of the 3.3v voltage regulator ;-)<br> <br> 2. ive made a 3.3v voltage regulator board specially for these purposes, <a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=321099116737&ssPageName=STRK:MESE:IT" rel="nofollow"><strong>you can see the details here</strong></a> and this will take the 5v and you will get a very regulated 3.3v output that can supply upto 1A output !&nbsp;;-)<br> <br> 3.&nbsp;Theres also a special 3.3v Kit that runs fully on 3.3v so no such voltage regulators are needed, just hookup any 3.3v devices to the kit as it supplies and runs with 3.3v as its native voltage, <strong><a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=321071618487&ssPageName=STRK:MESE:IT" rel="nofollow">right here</a></strong>, but if you have a few devices, option 2 will be the better choice as it supplies upto 1A current !<br> <br> 4. If you want a full Arduino Based 3.3v board (DIY Soldering Kit), <strong><a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=321161928017&ssPageName=STRK:MESE:IT" rel="nofollow">check this one out here</a></strong>, again this will only supply upto 250mA of current from the voltage regulator so if you need more devices to run at 3.3v, options 2 along with another option in conjunction would be the better choice !<br> <br> Few Notes:<br> <br> 3.3v Through-hole voltage regulators usually come in no bigger than 150mA, my ones supply upto 250mA of current and are the TO-92 shaped regulators (small) but if you want a 1A through-hole voltage regulator then they come in the TO-220 shape (large) but be careful in inserting this large version into breadboards as they can seriously and permanently enlarge breadboard holes and this causes connection problems when smaller leg components such as resistors enter the holes that a TO-220 voltage regulator once sat in !<br> <br> I would have suggested the cheapest method of all which is using a voltage divider, using a few resistors to drop the 5v down to 3.3v but as your circuit/s draws more current the voltage divider wont account for this so for example, with no load, the voltage divider can be showing 3.3v on the multimeter but as soon as you connect up your load (XL7105 module) then the voltage can drop anywhere from 1.5v to 2.5v !!! So this method would need some experimentation by yourself to sus out which resistor values are needed for supplying 3.3v output with the load attached but <strong>Exercise Caution</strong> when doing this method !<br> <br> hope this helps !
sorry for solution 3. - what i mean by no voltage regulators needed is that no extra external voltage regulators are needed as there is a 3.3v 250mA voltage regulator included in this kit ;-)
PS hope your feeling better.
i am using my arduino uno to upload the blink sketch
Aha !<br><br>Okay so try this test, disconnect all power to the UNO with your Atmega328P-PU in it (the one that doesnt have sketches upload to it) and look at the pin 13 LED on the UNO, it is simply named as &quot;L&quot; on the UNO...<br><br>Now, connect power and at the same time observe the pin13 LED - Does it Blink a few times when you 1st apply Power to it ???
Though I'm not sure if that's your mistake or I'm missing something important here but you can see it on the last two pictures on the second page. Pin 2 on Atmel328p-pu (RX) is connected through a resistor with the pin-headers rightmost pin. On the side of the board you have marked it as TX. Same thing with the third pin (TX). The USB serial thing is connected correctly according to the markings on the side, but the mistake is made on the board. <br> <br>Interestingly enough you say it worked so maybe it doesn't matter :D Though &quot;doesn't matter&quot; is a rude word when it comes to any kind of engineering. :) <br> <br>I hope you manage to sort it out!
Sorry for the delay in responding, i had to check this all out, double check it and then tripple check just to make sure i know what im talking about - lol x 2 !!! <br> <br>Okay it does seem to be correct the way the pictures show but this maybe because i am using a PL2303 USB TTL to Serial converter, i dont know for sure but the way things are, this is the way things are setup: <br> <br>PL2303 Module Breduino (Breadboard Arduino, lol !) <br> <br> TX to 10K Resistor to Pin 2 of Atmega328P-PU ( RX ) <br> RX to Pin 3 of Atmega328P-PU ( TX ) <br> <br>&amp; i have uploaded the Blink-Sketch to the breadboard setup exactly as shown in the picture you refer-to and it uploads perfectly each time with no errors at all !!! <br> <br>Even with myself saying that these 'Transmit' ( TX ) &amp; 'Receive' ( RX ) pins should be connected like-for-like, apparently my overlooked mistake turns out to be correct ! <br> <br>I do also have a USB BUBII but cant find it to test this out with a different USB TTL to Serial Converter but will definitely test that out again as soon as i find it lol !!! <br> <br>Are you interested in making this breadboard setup yourself, or have you done so already ??!?? <br> <br>Anyways, thanks for pointing this out as i will make amendments to say that these pins are not connected like-for-like - it kinda makes sense to be connecting it via TX to RX and RX to TX because one is a 'Transmit Line' and the other is a 'Receive Line' but i am only a beginner/intermediary in the great world of Anything Arduino so im learning as i go along and also this set of instructions is from my actual breadboard setup which i have not taken off of the breadboard since i built it many many months ago (at the time of posting this instructable, lol !) so i can say for sure that this all works as described in the photo's ! <br> <br>If at all curious, breadboard it up yourself for some testing using the same gear in this instructable, would be great to see someone elses results, perhaps even with a different USB TTL to Serial Converter, the links to the ones im using for this instructable are in the end page ! <br> <br>Anyhoo, thanks once again for getting this into the limelight, i will endeavour to put it right asap ! <br> <br>Also lol @ &quot;doesn't matter&quot; !
A nice tutorial overall, but I found it to be strange that you connect the *ino RX pin with TX on PL2303HX and TX pin with RX. Is this right? I'm a beginner myself and this little thing has got me all confused. <br> <br>I would have also appreciated seeing the corresponding schematic. :)
Oops ! <br> <br>Thats definitely a slight mistake, i should have been saying that those pins should be connected like-for-like, TX to TX, RX to RX etc, please could you tel me at which point (or where abouts!) you saw me explaining that the TX should be connected to RX ?!? <br> <br>Although its like for like connections with this microcontroller, my next up and coming instructable is the Mighty Atmega1284P-PU (Total of 32 I/O Pins !) and that is TX to RX etc but for this humble Atmega328P-PU (or Atmega328-PU !) its like for like ! <br> <br>Many thanks in advance !
Hiya there, <br> I absolutely LOVED your instructable about the arduino breadboard. I am just like you in the way you talk and the humor you put into everything! I have always wanted to make an UBER awesome instructable like the one you just made, but i could never find time or energy to do it. :(. <br> <br> <br> Anyways, I also had a question. Actually I am following your instructable through, and you keep mentioning the auto-reset button thingy, so I was wondering, how do I do the manual reset/upload sketches manually? I am asking this because, my cable to connect my PC to my arduino board is a serial ttl to usb female cable(Yes, I do have a separate male to male usb cable). I got this cable from an old computer I took apart. It was actually from one of the usb ports :D. So, it has 4 pin slots, and there are the 4 wires going from the slots. I am almost positive that the 4 wires represent Ground, Rx, Tx, and 3.3v, and I believe I have correctly identified them. But, unfortunately it does not have a pin for reset, so I can't use an auto reset button(right?). Also, I had another question in mind. Since my cable is from the inside of a computer, it is supposed to get power from the serial end, not from the usb end, because you are supposed to plug in usb devices into it, lol. So, I was wondering, how would I be able to use this cable in this situation? Could I possibly just attach the 3.3v pin to the 5v male header on my arduino, and have the arduino supply power? I am not sure how do deal with this situation, but I really want to be able to use this cable, even if I have to supply power from my power source while the arduino is connected to a PC. Well, I think that's it, and any help would be sooooooo appreciated, as I trust you and respect you as a knowledgeable person of arduinoism, lol. Thank you so much and please reply as soon as possible. And once again thanks in advance, and many congratulations on the wonderful instructable. <br> <br> <br>By the way here are the pics of the cable: <br> <br>http://imgur.com/a/4FR7n <br> <br>
Very nice stuctable! I don't think I've ever seen this much detail and explanation. I've built a few pseudo-arduinos very similar to this. I prefer them to the &quot;real&quot; Arduinos for most projects. One thing I didn't see in your pictures (although I admit I didn't search ALL of the pictures) was a connection from the top 5v rail to the bottom 5v rail. When the regulator circuit is used, the top rail is powered, and when the programmer is attached, the bottom rail is powered. If either rail is not powered, the only way I can see for 5v to get there is possibly the 2 common Vcc pins of the 328. Since each Vcc pin is on a different rail, this means current must flow THROUGH THE MICROCONTROLLER. This probably works OK in a minimal circuit, but the chip is not designed for this, so as you add more to each rail it will stress the controller. At some point, you might have an expensive fuse. A simple fix would be to just connect the power at row 24/25 to the bottom rail. <br>
You know what, your soooooo-completely right !!! <br> <br>i usually always connect both the top and bottom rails for the VCC and GND together so that they share an equal supply of power but in all my explanations i had left that behind ! <br> <br>Oh thank you so very very much ! <br> <br>Also thanks loads for the praise, i really do appreciate it and am very grateful for it too, i just wanted a place where i could have almost every possible component that a Protoboard/breadboard Arduino would use to function as the official ones do and also have all the info in one place and some decent close-up pictures !! <br> <br>The official Arduino.cc instructions of putting Arduino loose components onto a breadboard are definitely NOT 'beginner-friendly' and the pictures dont show everything connected clear enough (in my own humble opinion, lol !) and only give a Birds-Eye/Top View of the components being added onto a protoboard/breadboard and as i was just beginning to learn about Arduino's and how to go about prototyping the bare bones of it, i wanted a clearer set of instructions for everyone to follow as i had great difficulty following the 'Official' instructions and just didnt want anyone else to go through the amount of head-scratching i went through !! Plus im now selling these Arduino Kits on ebay along with custom modified USB TTL to Serial converters that take advantage of the Auto-Reset function of uploading sketches, i just dont have the patience for all that timing of the press of the reset button to upload sketches !!! <br> <br>Just plug and play lol ! <br> <br>Once again abqlewis, many many thanks for the update - i will place the needed corrections asap !!!

About This Instructable




Bio: Always modifying something ! Some Simple Rules.. * if you havent taken it apart - you DONT truly own it ! * Tinkering is a way of Life :) * Do what ... More »
More by offtherails2010:How To Make The Easiest Breadboard Arduino-Compatible Sanguino-Equivalent...EVER ! & How to Upload Sketches Straight to it !! How To Make The Easiest Breadboard Arduino Uno...EVER ! - The Breduino ! (& How to Upload Sketches Straight to it !!) With Additional Hardware Options - UPDATED - JULY 2013 How To Duplicate & Prototype Your Own RC Car Parts Cheaply! Final Update 20-03-2012 ! 
Add instructable to: