Twitter: / greatscottlab Facebook: / greatscottlab Previous video: • Video In this video I will show you how to use your Atmega328P without an Arduino Board. Music: Killing Time, Kevin MacLeod (incompetech.com)
I like this a lot, but there are two thing's I'd like to mention: First off, you should add 100nF caps between the +5V pins and GND of the ATmega. This is something one should always do when an IC is involved, which I learned the hard way some time ago. And then I want to mention that the Arduino IDE supports the use of an external programmer without a hitch - you only have to use the menu option "File/Upload with programmer" instead of the toolbar button when uploading your code. That approach also has the advantage of working without the Arduino bootloader which can come in handy if you have to ditch the bootloader in order to get some more free space on the chip, so I prefer ICSP to serial in my projects.
Does that mean that I can use the FTDI chip like he said to programm a bought Atmega also if I have no Arduino? Because a bought Atmega comes without a bootloader on it, right?
Gregor Ottmann Thanks! Do you know if there is a possibility to use the Arduino to programm a atmega without removing the atmega of the Arduino? Because I have a fake Arduino and you can't remove it there...
There should be a 6-pin ISP connector on your Arduino. Using that and a programmer, you should be able to program the chip without desoldering. If you have a second Arduino lying around, you can use that as a programmer. There are instructions for that on the Arduino website.
This is a great video, It really help me put together my own Arduino. I saw some of your videos and they are very easy to follow. Keep up the great work and thanks
Hello, thank you for this video. It even works with Atmega8 as Arduino NG. For some reason I had to pull down RX, because program would never boot. Updating code with ftdi works normal, no need to diconnect pulled down RX. Also during upload manual reset is needed.
When programming with ftdi and the wiring you showed, dont forget to put a capacitor between the reset of the atmega and the ftdi to shorten the reset pulse!
Scott, I've recently learned that is possible also to use an Arduino Nano as an ICSP to program a bare Atmega328P. Just upload Arduino ISP sketch on Arduino Nano, (you can find it in the provided examples), change line 73 to use pin 6 instead of 10 as reset line in case of Arduino Nano. Then connect Arduino's usual ISP pins: 6, 11, 12 and 13 to Atmega328's reset, MOSI, MISO and SCK, in order, and, of course, gnd and 5V. Then you can upload you code to Atmega328 from menu "sketch/upload through a programmer". NOTE: Atmega328 need to have a bootloader loaded, already. Ciao!
There is another way of programming your Arduino if you keep the original Atmega in the Arduino and use a 2nd Atmega for your project. You need to flash the "Arduino As ISP" Sketch, select the Arduino as a programmer and then you can upload the sketch on the standalone arduino using specific pins ( I don't know which, it stands in the arduinoasisp sketch). But this only works, if the 2nd atmega already has the arduino bootloader on it. You can flash it, if you plug in the empty, new atmega in the arduino and press burn bootloader in the IDE. btw: Nettes Video. Wie immer halt :)
Hi @GreatScott i have a question how can i use the I2C protocoll for example a rtc module with the ATmega328p like the i2c pin on the arsuino where are those?
Great video! However, when I tried it myself nothing would work and at some point I thought I've had fried the microcontroller. Then, I decided to experiment using a normal Uno R3 (GEEKCREIT china clone) and an FTDI. It still wouldn't upload, so I thought that something was wrong with the connection. To all people that had the same problem with me, here's what you have to do to get the thing working: 1) Do the same as GreatScott! did for the breadboard part except that the 10kOhm resistor goes to 5V! 2) Take the ftdi programmer. 3) DTR goes to one side of a 100nF ceramic capacitor and the other side of the capacitor goes to reset. 4) TX, RX and vcc go like normal. 5) CTS goes to GND (GreatScott!'s ftdi I think didn't have a CTS port). 6) GND goes to GND. In the Arduino IDE, select "Arduino UNO" as your board and the port is the FTDI's one. Thanks for reading and for those who had the problem, I hope they managed to solve it and didn't throw the ATMega away as I was about to do :).
I didn't have an oscillator on hand, but puttting both chips od a breadboard and connecting the oscillator pins from the socket in the Arduino to both in parallel worked.
Hi, i really like your videos, they are really great. After this video I wonder if the same thing is possible with arduino MEGA. I know atmega 2560 is an smd chip and i need to do some smd soldering in order to get it working. and i may need to have some more parts than to have a mega328 working standalone. i searched the web for info about this but did not really find what i meant. have u got any ideas how to do it and possibly could u make video about that? thanks in advance and thanks for these great videos best wishes Agoston
A question: I'm implementing this on a PCB instead of a breadboard, so Im building my own reset button on the PCB, if I don't connect the reset pin of the arduino to chip pin 1 can I still upload code through the 2nd method?
Thanks for the Video, Scott. Can you please share some sources where to learn ICSP? (Gerne auch auf deutsch) I have an ISP-Programmer laying around and downloaded the Atmel Studio but I have no clue how to find my ATmega. Thanks in common.
Hello! I'm wanting to make a standalone circuit like this but with USB communication. I searched through your videos but couldn't find a video showing this (Maybe I missed it). Would you happen to know how someone would do that? Would I just connect the TX and RX pins to D- and D+?
Nice job.I have a question.How can I upload code on atmega 328P on breadboard using arduino board wich has atmega 328 smd and I can't remove chip from breadboard?Thanks a lot.
1:26 Dude, that's no 10K resistor, that's 120 ohms! Oh wait... nevermind, I was reading the color code backwards... or at least I think so. Damn. In all seriousness now, if you have a 10K ohm (brown black black red brown) and a 120 ohm (brown red black black brown; same sequence as before but backwards) metal film resistor, is there any quick and easy way to tell which is which without using a multimeter?
It's so helpful, thank u so much. Well now is it possible to burn an atmega bootloader using USB to TTL only without an arduino uno chip ?? and if so how?
00:24 Is it ok for the separate solder pools to touch each other from other tracks(I don’t know what you call the lines connecting the resistors the components to each other. Lanes? Is there a term for it?) just as long as the actual wire and components legs don’t touch each other? Because man idk how people solder things so close to each other without the individual solder pools touching each other. Does the solder itself not conduct electricity so the flow of electricity not hop onto another circuit/nearby resistor/capacitor etc?
You could left the whole right site open because GND and VCC are connected inside the controller. The only thing that might be needed is soldering vcc and aref together (the pins directly next to each other) if analog reading is used. Du könntest auch die ganze rechte Seite frei lassen weil Masse und 5V innerhalb des Mikrocontrollers verbunden sind. Wenn analoge Werte eingelesen werden sollen muss Aref noch mit 5V (direkt daneben) kurzgeschlossen werden als Referenz.
ICSB... haven't used that in over a decade. I thought the industry was moving away from that stuff. Funny enough, I used ATMEL when programming it back then too. Guess that was good enough software to survive a 6th edition. Nothing wrong with ICSB as such, it's just a pain to program and I was basically hired by the company to make a firmware upgrade for each product at least once a month, because of bugs they kept finding (I did not make the original firmware, I just patched bugs as they were found by Q&A). It would've been fine if that was it, but the company is an industry leader and moved over 500 units a day, and they were all assembled and programmed in China. It takes about 8 months to move the units from China to EU, so I spent most of my days unpacking 500 units, plugging a cable into each of them, clicking a button on the computer, repacking it and whenever I had time left, I'd work on bugfixes in the firmware. With the new way of doing it, you get an easier overview of the programming and can test it on-site, which leads to fewer bugs. It's also quicker to update the firmware. That would've saved the company a lot of time, and any semi-skilled worker could've done the updates. Also, the new system uses USB or SD cards, so you can use just about any laptop to reprogram it. No need for expensive separate programmers, so you can have 2 people updating firmware twice as fast (or more than twice, since the new one is much faster). Plug in, hit button, unplug, done.
Very interesting, but the Arduino Nano seem to be only a little bit more expensive than the ATMEGA328P I found on Alixpress. For learning something it might still be useful to build that but to cut the costs and size not so much anymore.
Off topic, but you seem like an electronics wizard & I wanted to ask if you can re-program ATtiny (ATtiny84, ATtiny85, etc.) chips & aren't stuck only being able to upload one sketch to it?
Is it possible, to get out native ATMEGA328 chip from Arduino Uno, put in new clean ATMEGA328 chip with loader, program it, then put it out and use separatly as shown on video? Simply - using Arduino Uno as programer for other ATMEGA328?
I used the first method to upload simple blink sketch yet nothing work. I also add reset push button to ground and my atmega328 doesnt do anything. What can be the problem?
i'm working on atmega328p project. i use fast pwm at the 16 bit timer. so i want to output 2 pwm at OCnA and OCnB. both of them have a same top value and same OCRnA and OCRnB. does anyone how i can toggle OCnA and then OCnB repeatedly
What is problem in my Atmega328P-U microcontroller. I am using external 16mhz crystal . I am using this setting 0xFF, 0xDE, 0xFD, 0xC0 and write by avrdude. my project stuck or hang after some hour... how to solve my problem...plz tell me
how are you able to solder such complicated circuits on a perf board? what editor do you use to make the schematic and how do you solder components using that?.
am mr.great scott sir im in Philippines rx and tx ics is a bit hard to find can you please help me on coding atmega 328 one for decoder and one for encoder?? how many io will it be and how far will it go on a standard rf modules?? thanks alot :) more ideas :)
I have 328p-u so I'm facing 1e 95 0f problem.while uploading (without crystel) .... . Can you help me? . . . (i ordered crystal for now.... ) . What is the problem plese explain it.. And tell us if any solution available
ICSP is just as simple. Requires 6 wires - 4 to MISO/MOSI/SCK/RESET and 1 to VCC and 1 to GND. Yes you need a +5V pullup on the reset line but there are tons of simple diagrams in Google Images.
Or Pro Mini... And no, not really. The benefit of doing it like this, is only that it _look_ more professional and streamlined, and many will enjoy the fact that you built it yourself and enjoy the time spent doing it. But for pretty much any hobby project using a prototype board like this, a nano or mini will be better, cheaper (or as cheap) and faster to set up. And if you were making a real product for sale, you would have a small SMD microcontroller integrated in a even smaller, professional PCB anyway.
Can you tell me how much amps to supply with 5v to atmega if I want to connect it to other source than Arduino such as wall charger or maybe a 12v battery?