Step 3: Arduino Pin Mapping

Now we want to prepare the ATmega168 or 328 chip. Before we begin, let’s take a look at what each pin on the chip does in relationship to the Arduino functions. NOTE: The ATmega328 runs pretty much the same speed, with same pinout, but features more than twice the flash memory (30k vs 14k) and twice the EEPROM (1Kb vs 512b).
Figure 1-5: Arduino Pin Mapping
The ATmega168 chip is created by Atmel. If you look up the datasheet you won’t find that the above references are the same. This is because the Arduino has its own functions for these pins, and I have provided them only on this illustration. If you would like to compare or need to know the actual references for the chip, you can download a copy of the datasheet at www.atmel.com. Now that you know the layout of the pins, we can start hooking up the rest of the components.
Hey, this is a great instructable and is very informative. Just one thing is missing... pictures! It really helps a lot when trying to follow directions so you should consider taking some photographs. Once you do that and leave me a message when you have so that we can publish your work. Thanks! Thanks for the cool instructable and we hope to publish this soon!
I had the images embedded into the step by step directions. Were you able to see those? I have uploaded printable versions to be included as well with each step. Please let me know if everything is done properly now.<br /> <br /> I felt the embedded illustrations worked better so you could follow along easier and look at them as a map of where to place wires, etc.<br /> <br /> Thank you for your time, and for such a great web site!
I have a sneaky suspicion that it's an automated response.<br /> Nice initiative with the embedding forces you to read the steps<br /> and not just give the pictures a once over and forget it like one usually does :)<br />
Hey, this is a great instructable and is very informative. Just one thing is missing... pictures! It really helps a lot when trying to follow directions so you should consider taking some photographs. Once you do that and leave me a message when you have so that we can publish your work. Thanks! Thanks for the cool instructable and we hope to publish this soon!
<p>amazeing thank you</p>
<p>To be absolutely correct and avoid any risk of oscillations on the 5V line due to sudden load changes, especially considering the distances of the wiring around the 7805, there should be two additional ceramic capacitors of 100nF each from the input and the output of the 7805 to the ground. These are normally 2.54mm spaced lead components that are fitted into the board next to the regulator. There is space available on the breadboard to be able to fit these easily.</p>
<p>Do you really need a 440 tie point breadboard rather than a 400 one? I can't seem to find a 440 pin</p>
<p>I Make it.</p>
<p>I will definitely try this out! :D</p>
<p>That was very easy to make!<br>Thanks for the elaboration! :D :D</p>
<p>Old instructable but this was a great idea and decided to do my own for when I don't want to pull apart my others.</p><p>I changed it a little since the photo, just to make it easier to access the output pins.</p><p>Thanks</p>
In the Arduino IDE, Go to file&gt;preferences and turn on verbose output on UPLOAD. <br>Close the preferences window. <br>Now click Upload. <br>Your sketch will compile and when you see the baud rate or &quot;send&quot; in the output, press reset. <br> <br>Hope is works. <br>Should work for avrdude in the cmd/terminal. <br> <br>Also! With this method you only need the 5v, Tx, Rx and GND from an FTDI or UART/TTL programmer. No DTS or RTS, <br>Some UART boards have a line marked RTS or RST. Don't use these.
This is if you get the &quot;out of sync&quot; or errors on upload.
Hi! Great tutorial. Can a normal USB cable be used instead of the 232r converter here? I have plenty lying around that I could just rip open. <br>S&oslash;ren
hi sir, good day, cn u give me an schematic of this? so that i cn make my own modified arduino, pls T_T i need it badly coz we are ask by our prof to make our own modified arduino, T_T pls...i need reply asap sirT_T
Very nice man! An old post of yours rang in at $15. Does your price include a breadboard, or just components? I'm looking at cost cutting for arduinos.
hey...no one has asked about the bootloading thing....<br>Its Important....
This 'ible is only about Arduinos, Arduino is basically an ATMEL chip with the arduino bootloader installed. You can purchase certain chips that come preloaded with the bootloader from places like sparkfun or you can upload your own to blank chips (save a little $) but you will need to lookup ISP programmers, which ironically can be created with an arduino.
awesome 'ible ! got this one bookmarked for my up and coming arduino adventure!!! <br> <br>one quick question though... how did you create the simple breadboard diagrams ? <br> <br>i want to be able to create these too so i can preserve my breadboard designs without having to take photos from multiple angles to document my work ??? <br> <br>please help if you can, i know this is an old ish 'ible &amp; may not get a reply but i would be very grateful if you could point me in the right direction! <br> <br>many thanks in advance ;-)
Why do you use a 16 MHz although the Atmega 168 support up to 20 MHz? <br>
hello <br>i know this is an old thred<br>i have a small question<br>can i use atmega8a for this project<br>thanks in advance
Late reply, I know, but, yes, you can use an atmega8a. You will have to modify the connections though. You can read the datasheet to find out where vcc, vdd, reset, and any other pins you might need are and adjust the wiring accordingly. You can't just drop an an atmega8 where the other IC is though (if pin out is the same then you could, like I said, check the datasheet)
can you post where i can fins these for the cheapest?
gr9 work!
can i use atmega 8 ?
Does it matters 10uF Electrolytic capacitor's voltage?
go and read <a href="http://www.hobbytronics.co.uk/arduino-atmega328-hardcore">here</a>
if you have a serial port in your computer you can use the following:<br>--------------------------------------------------------<br>serial port atmega l<br>pin1 DTR 0.1uf reset l<br>pin2 RX TX l<br>pin3 TX RX l<br>pin4 ( not connected ) l<br>pin5 GND GND l<br>pin6 ( not connected ) l<br>pin7 ( not connected ) l<br>pin8 ( not connected ) l<br>pin9 ( not connected ) l<br>-------------------------------------------------------<br>PS : on the right most of the picture there is &quot;pin 1 reset&quot;<br>it is pin 1 on the serial port and reset pin on atmega but there is a 0.1uf cap in between these two pins for auto reset as in arduino uno.
I know this post is from a ways back, but what program did you use to draw this design? Do you know of any free programs I can use to come up with something similar? Thanks for any help.
Fritzing is AWESOME.
hi there is some thing i don't understand the connection between the pc and the bread board is as follows: (USB to miniUSB cable-FT232RL-breadboard) is that right and please explain more deeply about when to press the reset button and what does it do. thanks best arduino instructable i've ever read.
hey guys jelmareanvlad its right, i dont understand either, if anyone could replay ill be very glad thanks
in the parts list you said that it was needed two 22pf capacitors and two 10uf capacitors but in the component part of the pcb are: one 10uf cap and 100uf cap!? where are the other two and why the 100uf cap hasnt been in the parts list? I dont understand...and what means &quot;RAW&quot; ?and why are there 2 power sources dc jack and &quot;volts in +9 to 12v???????? PLEASE REPLY AS SOON AS POSSIBLE!! thank you in advance.... :((
I'm assuming you're using an ATMEGA168 with the bootloader pre-installed.. What option do I have if I can't get a pre-installed ATMEGA and a <span style="font-size: 12.0pt;">TTL-232R(or any of the options you mentioned)?.. I'd really like to do this instructable but i can't get the parts mentioned in my country :(<br /> </span>
if you can get the arduino ide and go to<br><br>tools&gt;burn bootloader&gt;check what they have listed <br><br>you can use a isp or a friends arduino to burn it
On the PCB, could you tell me what the programming pin layout is? cause im making my own programming cable and want to know to pins.<br>Thanks in advance.
!!!!READ THIS!!!!!<br><br>I followed this tutorial without knowing that you need to have a bootloaded chip for it to work. For you guys who just bought a chip and the other parts should follow this tutorial first:<br><br>http://arduino.cc/en/Tutorial/ArduinoToBreadboard<br><br>
I believe the cheapest route would be to use a usb&nbsp; to rs-232 cable as they can be bought for as lil' as $2.00 shipped. Couldn't I&nbsp; also tap into the power from the cable so I can eliminate the 9 volt battery. How well would a setup like this work with serial monitor though? <h1 class="vi-is1-titleH1">&nbsp;</h1>
I did the breadboard setup above and bought a usb-to-rs232 cable. what now? how do I connect the two
If you also bought the P4, in theory you could connect the cable to P4 and connect the P4 to the breadboard.<br><br>If you haven't bought the P4, I wouldn't yet. I think there is a way to interface the cable directly to the breadboard. I have one on order and when I get it, I will try to get it to work and will write an Instructable if it does.<br><br>Lazy Old Geek
I recently ordered one of these usb to rs-232 cables but just thought of a problem. RS-232 signals are +5 and -5V instead of 0 and 5V so RS-232 will not interface directly with an Arduino or the breadboard.<br><br>However, I think these are all based on the Prolific PL2303 chip which I believe is 0-5V (TTL). If that is the case, then the correct signals are available. If I get it to work, I will do and Instructable.<br><br>Lazy Old Geek
Hi, I'm a very newbie in this Arduino.<br>I have tried to build my own Arduino Board using ATmega328 chip with Arduino Bootloader and for upload the sketch, I'm using FTDI Basic Breakout - 5V ( both of this part are from SparkFun ). I've followed all your wiring schematic. The power LED and the 13 pin LED blink without any problems ( so I think nothing wrong with the ATmega 328 chip )<br>The problem occured when I try to upload the blink sketch to the board, there are some avrdude error that I don't understand how to solve .<br>The error message is : <br><br>Binary sketch size: 1010 bytes (of a 30720 byte maximum)<br>avrdude: stk500_getsync(): not in sync: resp=0x00<br>avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51<br><br>For make sure all the wiring is correct, I upload the sketch through my Arduino Duemilanove board ( without the AT mega chip ), and within second the sketch uploaded to the board smoothly. No error at all.<br><br>So, can anyone help me to solve this problem ?<br><br><br>
I've seen similar problems with some of my 'Arduinos'. The problem I had was intermittent connections on the serial connectors. If I just wiggled my USB-BUB it would work okay.<br><br>For this situation, make sure you also have a ground from your breakout board. Another possible problem is that Tx and Rx may be reversed. Different authors and vendors will label the Tx and Rx differently. The confusion is that a Tx (transmit) from one device say the Atmega is connected to the Rx of the other device say the FTDI. And vice versa. <br><br>Also, some Arduinos have DTR connected to the the Atmega Reset pin, but the newer Bootloader has RTS connected to the Reset through a capacitor. I am guessing that if you don't have anything connected to the Reset pin than it should load correctly but you may have to push reset to start the program.<br><br>Another thing to remember is with the Arduino software you may have to select the correct com port. Right now I have two Arduinos connected to my computer so I have to make sure I'm using the right one.<br><br>Good luck,<br><br>L.O.G.
I have the same problem. The chip I am using is the AT328 with UNO preloaded and I get the same error msg. <br> <br>
&nbsp;works great with an ATMega168 ... I would really like to see an instructable that shows us how to use a simple rs232 cable and an rs232 chip setup instead of the expensive ftdi cable. that would be useful when we're beyond the prototyping phase and maybe want to do an inexpensive permanent setup with a serial comm option (ambient light based on twitter feed or server monitoring setup)<br /> <br /> I also added a couple of LED's to tx/rx lines just to see the activity during sketch upload.<br /> <br />
Modern Device and Wulfden have a nice little RS-232 to TTL board, the P4 http://www.moderndevice.com/products/p4 For the DIYer the schematics are also available. It's basically one IC and a bunch of resistors and capacitors and on zener diode. Lazy Old Geek
how do you use this. buy a usb-to-rs232 then use this to convert to TTL? then connect rx and tx to the breadboard setup?
The Wulfden website is a little confusing but the P4 will not work with USB. It will work with RS-232 serial ports. I've never bought one as none of my current computers have an RS-232 serial port. <br><br>To use a P4 you do connect the Rx and Tx to the breadboard but you also need a ground and 5V. Serial ports do not provide 5V so it must be supplied external such as from the 7805 on this breadboard.<br><br>Lazy Old Geek

About This Instructable


651 favorites


More by ArduinoFun: Arduino Lilypad Interactive Passion Sensing Scarf Creating Printed Circuit Boards with a INKJET Printer Dual Motor Driver with Arduino using a SN754410NE Quad Half H-Bridge
Add instructable to: