5

Can I program a factory fresh ATMega328P using the UART pins without burning a bootloader? These pins are TX, RX, VCC, GND, and DTR pins in the schematic below. They are not the ISP/SPI pins 10-13.

Arduino Pro Mini schematic

For example, if you program an Arduino Pro Mini (which requires an ICSP programmer) with a programmer, you're not connected to the ISP pins (basically the SPI interface: MOSI, MISO, SCLK, SS), but rather to the serial i/o and reset pins.

My understanding is that a bootloader is required if you want to program through these pins, because the Arduino bootloader looks for UART traffic at these pins upon startup and hands off operation to the user's code if no attempt at programming happens during this time.

That said, I also understand burning a bootloader is done through the ISP/SPI pins, and my PCB is already manufactured, which makes burning a boatloader somewhat of a hassle. So...

Can I program an ATMega328P through the UART pins fresh off the reel, or will I need rig up a way to burn a bootloader through the ISP pins first?

migrated from electronics.stackexchange.com May 3 at 17:21

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

  • 1
    "... using the ICSP pins without burning a bootloader? These pins are TX, RX, VCC, GND, and DTR pins ... They are not the ISP/SPI pins ..." - ICSP is commonly used as a synonym of ISP, so for the 328P, that means through the SPI pins. Yes, you can do this to a factory-fresh 328P, but not through the pins you have in mind. – marcelm May 3 at 16:15
  • 3
    "if you program an Arduino Pro Mini (which requires an ICSP programmer) with a programmer," no, for Mini Pro you need an USB to TTL Serial adapter for programming over UART and bootloader – Juraj May 3 at 18:56
9

No, the ATmega's ISP does not operate over the UART pins but only the ISP pins.

To program it via a UART, you need to first load a bootloader, unless your chip was pre-programmed by the vendor, something some offer as a value-added service (or even as an essential stock item, with an Arduino type bootloader)

  • Thanks for confirming.... Whenever I think I've done enough research, I find out that, nope, I don't know anything. It's good to have experts around. – schadjo May 3 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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