I am designing a PCB in which I am using the MCU used in Arduino UNO which is Atmega328P and some other components as per my project requirements. I have almost designed the circuit but I am confused with the USB programming part. I want my MCU to be programmed using USB B Type just like we do it in Arduino UNO. My friend suggests me to purchase an Arduino UNO device and program that MCU and then put it in my circuit. But I don't want to do it like this. I have found the schematic design but its very confusing. Can anyone help me out with this.?

migrated from electronics.stackexchange.com Sep 28 '15 at 19:34

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • Eh. Save yourself the pain and just use ISP. – Ignacio Vazquez-Abrams Sep 28 '15 at 6:51
  • Can you explain more.? – Aircraft Sep 28 '15 at 6:56
  • You can use an Arduino to program a bootloader into an ATmega328. There's even an official tutorial for that. – Nick Alexeev Sep 28 '15 at 6:57
  • @NickAlexeev thanks for the tutorial – Aircraft Sep 28 '15 at 7:21
  • I fail to see why you think this is so confusing. If you want the functionality of an Arduino UNO then just duplicate the schematic into your project. Fully. You will end up with two MCUs in your project just like the UNO. BTW these MCUs are quite inexpensive. – Michael Karas Sep 28 '15 at 8:51
up vote 0 down vote accepted

It is quite a lot simpler to obtain an FTDI USB - TTL Serial cable. (The link goes to the American supplier, Sparkfun, but such cables are available from many online suppliers.) They are typically made with a 6-pin female header instead of a USB B connector; you may have to make up that part yourself, if it is important to you. If you only need USB functionality for programming, one cable can serve any number of boards (one at a time, of course), no need to build it into each board.

  • 1
    Not 100% exact. In fact this requires you to have a Atmega328P with bootloader; commonly sold atmega, however, do not have it, so you will also need the ICSP port to program the bootloader the first time – frarugi87 Mar 15 '16 at 12:16
  • It takes only one chip with a bootloader to make an arduino work-alike which can then flash the bootloader into bare chips. A borrowed work-alike can flash that first chip. The OP seems familiar with Arduino and there was no constraint that no Arduino should ever be used – JRobert Mar 15 '16 at 23:02
  • Totally agree, but... If there is no ICSP connector on the PCB then you will not be able to program it once soldered. Hence, the "not 100% exact", since you can fix it by pre-programming the bootloader, but 1) it's more useful to put an ICSP connector on the PCB (if the bootloader gets corrupted you can flash it again later), and 2) better saying it before the OP solders the IC on the board (and then finds out he can't upload with just a USB-TTL cable) – frarugi87 Mar 15 '16 at 23:42

Looking at the schematic design, you need atmega8 to make a usb programming connection. Design your circuit exactly like in the schematic.You will also need bootloader for it, so use any programmer like usbasp, connect its pins to mosi, miso sck, rst,vcc,gnd and click on burn boot loader in arduino ide

If you wanted a more permanent option on the board, you could also add a USB to FTDI chip like this: http://www.mouser.com/Search/m_ProductDetail.aspx?FTDI%2fFT232RL-REEL%2f&qs=D1%2fPMqvA103RC6OU6bKtoA%3d%3d&gclid=CNmDjr7dvssCFYZefgod9jgPeQ

  • 1
    Again, this requires you to already have a Atmega328P with bootloader – frarugi87 Mar 15 '16 at 12:16

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.