Step 2: The Microcontroller ! Introducing the Atmega1284P-PU MONSTER-KILLER ! lol

Okay so now we got the right voltage coarsing through the breadboards veins, so-to-speak, lol, now this is the opportune moment to slip on the ANTI-STATIC WRIST-STRAP so that you DON'T accidentally kill the MCU (Micro-Controller-Unit) via ESD Damage, which hopefully you already know about as you've checked out the link in the ingredients list or your a well seasoned veteran and already know how to safeguard against killing MCU's with human-generated static electricity lol !

So with WRIST-STRAP on, place the MCU like so:

i have also created some pin description labels for these MCU's so immediately stuck one to the MCU so that prototyping with its pins is going to be ultimately quicker and easier and at this point you want to add the TWO 0.1uF Ceramic Caps to the MCU's pins as shown below:


With that done, now its time to add the 16 Mhz Crystal, TWO 22pF Caps and a GND wire, check out these next 4 pics below in sequence and follow exactly:



& Now to add the wires to connect the 16 Mhz Crystal & Caps to the XTL1 & XTL2 pins on the MCU: (Below)


Now add a Blue LED & a 1K Resistor to the other side of the MCU:
Also carefully Observe the Flat-Notch on the side of the LED, this is the Cathode or NEGATIVE side so this wants to be connected to GND which i will come to in a minute!


Now i like to use these same colours whenever im making the circuit lines for the Reset Switch, i cut a piece of single core wire and bent it as shown in the pic Below-Left and then inserted it so that the way its been bent wont be hindered by the already present wires:

Also add a 10K Resistor to the RESET pin of the MCU and connect it to the Lower Breadboard POSITIVE RAIL:


Now add a 6mm x 3mm Tactile Momentary Switch, i chose this type of switch specifically because its thinner, takes up less space on a breadboard and less complicated than its usual 6mm x 6mm square brother which has 4 pins, this thinner version only has 2 so its kinda fool-proof to use too, lol !

So add the switch to the Green wire that was just placed into the breadboard, then the other side of the switch to the GND Pin of the Voltage Regulator (MIDDLE Pin!) as that was a nice tidy & out-of-the-way connection to make about here: (Below)

Also Add two POSITIVE & two NEGATIVE wires for powering the MCU from the breadboard Power Rails, shown below-right:


And finally the last two connections that need to be made, is the GND wire for the Blue LED which is shown below-left, and also i always like to add some kind of voltage protection in with these types of circuits so i will be adding a 1N4004 Reverse Polarity Protection Diode and this will DIRECTLY Replace the INPUT POSITIVE wire that goes to the INPUT Leg of the Voltage Regulator which is shown in the below-right pic:

which direction the "Stripe" on the Protection Diode is pointing towards when connecting it, please make DOUBLE SURE it is the right way - what this does is protect the voltage regulator from accidentally connecting up the wrong polarity INPUT voltage so just in case you or i had placed the POSITIVE INPUT Lead on the NEGATIVE and vice versa, then there wouldn't be any damage caused!


And thats it !

Quite nice and easy with these pin description labels, so now your breadboard should look like this:

You should have taken about half of the breadboard, Now you can use the other half for your prototyping needs, but theres just one more thing to do and thats to upload a test sketch to this breadboard setup so that we know for 100% sure that it is all connected okay and you will be able to continue with your own Arduino Projects!

Here's a look at the full breadboard:

Onto the next & final Section - Uploading a test sketch to the MIGHTY1284P-PU ('P' indicates "Pico-Power" and the 'PU' refers to the Plastic DIP Package of this MCU !) Arduino Compatible Breadboard Setup, The Mighty1284 for short lol !
<p>Another thing (besides below comment) I&rsquo;ve discovered worth mentioning: When you use the SERVO library, the PWM on PWM PINS: D12 and D13 do not work. The SERVO Library probably uses a timer that&rsquo;s conflicting with the PWM on those pins.</p><p>So, if you use the SERVO Library, don&rsquo;t use &ldquo;analogWrite&rdquo; on PIN D12 and D13</p>
<p>There&rsquo;s an mistake in the assignments of the interrupt pins. In the above image the interrupts are on PIN 0, PIN 1 and PIN 2. THAT&rsquo;S WRONG. The interrupt pins are PIN 2, PIN 10 and PIN 11.<br>But, if you want to use &ldquo;attachInterrupt()&rdquo;you address them with their interrupt numbers, NOT their PIN numbers. INTERRUPT 0 = PIN 10, INTERRUPT 1 = PIN 11, INTERRUPT 2 = PIN 2.<br>Example: If you want to attach an interrupt on PIN 10, the code is: &ldquo;attachInterrupt(0 , FunctionToBeExecuted, RISING);&rdquo;<br><br>Anyhow, thanks for the tutorial! Helped me a lot. Love the 1284P especially if you want to use graphical LCD&rsquo;s with memory hungry icons.</p>
Sorrry, I upload twice the picture ;)
lol no worries! ;-) <br> <br>I only charge what Royal Mail Charge me for postage and the padded envelopes are always over 25mm thick so its &pound;3 for postage and &pound;0.50 for envelope, fragile stickers, address labels etc ! <br> <br>so far, no one does better ;-)
The kit with 3 ATmega is most interesant for my, but :
You sell a kit with 5 ATMega, I use only 1.
lol ! Yaa i stopped selling singles a long time ago, sorry ! <br> <br>At least with a 3-Pack of atmega's you get one for your project and another 2 for another 2 projects ! <br> <br>;-)
I found this 2 kit with the oscillator, the ATmega 328 and the to small 22 pF caps. <br> <br>http://www.ebay.fr/itm/K034-Atmel-ATMEGA-328-328P-PU-Arduino-Duemilanove-bootloader-XTAL-22pf-cap-/321148016763?pt=UK_Computing_Other_Computing_Networking&amp;hash=item4ac5e9d87b#ht_2247wt_1183 <br> <br>http://www.ebay.fr/itm/K035-Atmel-ATMEGA-328-328P-PU-with-Arduino-UNO-Opti-bootloader-XTAL-22pf-cap-/221244023419?pt=UK_Computing_Other_Computing_Networking&amp;hash=item33832be27b#ht_2247wt_1451
Try the links now ! <br> <br>Yaa i unfortunately dont sell single Atmega chips unless its the Atmega1284P-PU ! <br> <br>All the microcontroller packs i sell also come with capacitors and crystals ;-) <br> <br>Also choice of either Duemilanove, UNO, or the special 3.3v Arduino Pro Low Power Bootloader ! <br> <br>Normally only for the UK but i have clients in France, Miers ! takes about 5-7 days ! <br> <br>Due to the location of posting (Because France is so much larger than UK, some places cost more to post to for me because i am a New Seller on ebay, Almost 1 Year Old Seller !)
Ok, thanks. When I open your links I have this from Ebay : Unfortunately, access to this particular item has been blocked due to legal restrictions in some countries. We are blocking your viewing in an effort to prevent restricted items from being displayed. Regrettably, in some cases, we may prevent users from accessing items that are not within the scope of said restrictions because of limitations of existing technology. Please accept our apologies for any inconvenience this may cause, and we hope you may find other items of interest on eBay. But i try to found the equivalent in a French website ;). <br> <br>
Finaly, I think I went to use the ATMega 1284, It has 32 inpout/outpout, the 328 has only 23 inpout/outpout.
Also i am cheaper than Farnell ***And*** my Atmega1284P-PU chips come with the instructions and Bootloader already loaded lol ;-)<br> <br> Same with the Atmega328P-PU's !<br> <br> Here's my selection of breadboard kits but of course if you just want the Chips then it is cheaper !<br> <br> <a href="http://stores.ebay.co.uk/Fully-Loaded-Systems/Breadboard-Kits-/_i.html?_fsub=3707893017&_sid=969719817&_trksid=p4634.c0.m322" rel="nofollow">Breadboard Kits</a><br> <br> <a href="http://stores.ebay.co.uk/Fully-Loaded-Systems/Microcontroller-Packs-/_i.html?_fsub=3707897017&_sid=969719817&_trksid=p4634.c0.m322" rel="nofollow">Microcontroller Packs</a><br> <br> You will still need to get a bootloader loaded onto any Atmega chip if you buy from anywhere else and my postage to France is only &pound;3 GBP ;-)<br> <br> Unless you want to try to get the bootloader onto the chip yourself, then you will need this tutorial:<br> <br> <a href="http://arduino.cc/en/Tutorial/ArduinoISP" rel="nofollow">Arduino As ISP</a>&nbsp;<br> <br> As for the 16Mhz crystal, just do a google search for what devices would contain a 16 Mhz crystal !<br> <br> Or post the question in the Arduino Forums ;-)<br> <br> If you get as far as making this circuit out of balsa wood and graphite i would be very amazed, i will be looking forward to that ;-) Good Luck ;-)<br>
Before making the PCB, i would test my idea on a simple circuit (and, why not, post an article about this method). For the cristal, you now were I can found a 16 or 20 MHz cristal (that must be in old device) ? I saw the datasheet and they said to put a cristal between 0.04 and 20 MHz for the ATMega. ATMega328 is chiper than the 1284, I think I went to use the 328, thanks for information.
Can I use a some varnish to cover the circuit board (that must be a common devise). I will try to found a 20 MHz, or a 16 MHz quartz cristal. for the Atmega, I want buy this one : http://fr.farnell.com/jsp/search/productdetail.jsp?sku=1715481&amp;CMP=KNC-GFR-FFR-GEN-SKU-MARGIN&amp;mckv=ssyHhE96J|pcrid|15868866182|kword|atmega1284p-pu|match|p|plid| <br>It's a Atmega 1284P-PU <br>Herre you have the datasheet : http://www.farnell.com/datasheets/1695247.pdf
Yaa that sounds like a good way of sealing the components in place but you will need to be very very careful not to move the components whilst the varnish is drying, personally i dont think this approach will work but you would be welcome to try and i would definitely sit corrected if you manage to get it to work ! <br> <br>You will need to make sure there is a 100% connection between the graphite and the components legs before you apply any varnish, maybe super-gluing the body of the component into place would help ? <br> <br>Alternatively you could even try making your own conductive glue by shaving a pencil's graphite and mixing it with a drop of varnish ??? try this out on a small simple circuit to see if this works, you might need alot of graphite dust !!! <br> <br>As with the crystal, best to find/use a 16 Mhz, not 20Mhz unless you know how to put a bootloader on this Atmega1284 ? <br> <br>Is there any specific purpose you need an Atmega1284 compared with an Atmega328 ?!?
I think about a very simple PCB. I want to make a simple project, in the D.I.Y method for PCB, you must buy the Ferric Chloride solution. I want to make the PCB with a piece of wood (1 or 2 mm, balsa or other wood), and draw the circuit with a graphite pencil, I drill some holes for the componants, and that's make ! Can I use a 27 MHz quartz cristal, I can't found a 16 or 20 MHz ?
Yaa the problem with a graphic pencil circuit (paper circuit method) is that the connections for the components could be easily knocked off or become loose and this would make the whole circuit not work if even one leg of one resistor was loose - unless you used conductive glue ! Then it would work !<br><br>I use ferric chloride all the time, every week and never had any problems with it, always wear disposable gloves and eye protection and never had it stain, spill or destroy anything lol ! each to their own i guess lol !<br><br>As for the Atmega Crystal, no, a 27Mhz will not work...<br><br>The MAX would be a 20Mhz BUT the Atmega must have the bootloader to tell it to use a 20Mhz crystal...<br><br>16Mhz crystal is always the standard so this would work without messing around with the bootloader...<br><br>What Atmega chip are you using ?<br><br>Are you using the Atmega328 or Atmega1284 ??
Ok, thanks, I hope to find the datasheet of my old computer (Asus, maybee 10 years old).
Lastly, lol, heres the original schematic that the very early Arduino Boards used when they were using the olden-day serial ports on old computers, you will only need a bunch or standard discrete components, the only IC would be the voltage regulator, if one calls that an IC lol:<br> <br> http://webzone.k3.mah.se/k3dacu/arduino/releases/serial_v1/arduino_serial_v1.png<br> <br> So as long as you test out the reclaimed 5v voltage regulator from whatever old parts your taking components from, this looks like how they used to do this in the very very early Arduino designs !<br> <br> Also, question:<br> Do you make your own homebrew circuitboards ?!? (PCB's ?)<br> <br> Would be a perfect starter project for you to make on single sided copperclad board for your very own Olden-Day Serial to Arduino Adapter !!
PS: <br>you will need to register on the Arduino forums to see the pictures and schematic or they will be hidden, free to register lol
Check out the forum topic now, full schematic to achieve what you want to do without complicated IC's !! lol <br> <br>i know i will be aquiring an old computer for this now lol ! (not got an old computer with a serial port LOL !) <br> <br>Enjoy !
well i started an Arduino Forum topic relating to your Quest to use the serial port connection of an old computer, you can check it out here:<br> <br> Someone has already uploaded a schematic of using just transistors and resistors but i wouldnt know if this would work or cause damage to your microcontroller but then i am just learning electronics myself so couldnt say if it worked or not but i will try to find out !<br> <br> Here is the arduino forum post i have started:<br> <br> <a href="http://forum.arduino.cc/index.php?topic=173317.0" rel="nofollow">http://forum.arduino.cc/index.php?topic=173317.0</a>
Ok, thanks.
All the parts were found in old stuf exept the Atmega and the breadboard.
Ahhh i see what your trying to do, this is an awesome approach to recycling out old technology and i will try to help as much as i can as its as i said, an awesome way your trying to do this ! <br> <br>Okay, so if your going to be using the serial port, you will still need an IC that will convert the serial communications of the computer's serial port to the language of the Atmega chip on the breadboard..... <br> <br>The language of the Atmega chip is called TTL - Transistor Transistor Logic. <br> <br>So, if the aim is to use old devices to take parts from, you need to find out what old devices you have that are computer serial devices and have IC's soldered inside them, you will need to read out the model numbers on them and google search their datasheets and look for an IC similar to the MAX232 which is the Serial-To-TTL converter chip. <br> <br>Without this kind of chip i would think that im correct in saying that no one would be able to upload anything to any microcontroller in the world without a Serial to TTL converter chip, ive just posted this question in the official Arduino Forums and will do the same here on instructables too when i get the time, unless you have already ?
Yes, but I want to make this project with only stuf found in old devises. can i limit the voltage of the serial cable with a regulator, a resistor or something like this ?
Yes, I want connect the serial port of an old computeur directly on the breadbord with a cable like this : http://pmcdn.priceminister.com/photo/830605757_L.jpg (I cut one end and connect the wires in the cable direcly to the breadboard.) Sorry for my english, I'm French and I don't use any translators).
Oops, Sorry i forgot to mention, ive just found out that a computer's Serial Port uses 12 VOLTS - DO NOT USE THIS DIRECTLY !!!!!!! <br> <br>YOU CAN BLOW THE ATMEGA CHIP AND DESTROY IT PERMANENTLY !!! <br> <br>These Atmega Chips can use a MAX of only 5.5v ! <br> <br>Get yourself a USB TTL to Serial Converter, much safer and easier ! <br> <br>I also sell this kit from here: <br> <br>http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&amp;item=321105030774&amp;ssPageName=STRK:MESE:IT
Can I connect a normal serial directly on the breadboard ?
Im not too sure what you mean by normal serial ?<br><br>Do you mean a direct connection between a computer's actual serial port that looks like this:<br><br>http://ergocanada.com/ergo/tips/serial_port.jpg<br><br>to your breadboard arduino hardware or do you mean to use a 'USB' TTL to Serial Adapter that looks like this:<br><br>https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQxEo7xwI4PZu3lFo9RdzzTsIxcyjSoKvuhw-vDwll78Ks3_dqV
how much do all the parts for this project cost?

About This Instructable


43 favorites


Bio: Always modifying something !!! (Why "Stuff" cant come as you need it or why Stuff has to be repaired just after the warranty OR if the ... 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: