Go Down

Topic: Burning Code in a DIY Arduino (Read 2 times) previous topic - next topic

Xenobius

Hi all,

Ok so I've been searching for days now but either I cannot get it, or I cannot find a clear tutorial on WHAT (not how) to do.

Ok so lets say I bought an ATmega328P (SMD version) and created my own PCB and it's time to burn the code that I have written. Code that works well on an Arduino Uno. Its just that I decided to build my own PCB.

1. Am I right to say that I first need to burn the bootloader, and than followed by my code?
2. I have an FT232RL (https://www.sparkfun.com/products/718) and also a USBtinyISP (http://www.ladyada.net/make/usbtinyisp/). I found tutorials on how to connect these so this is not the issue, but I need to understand better, Which one do I need? What do I program what with?

For example, as I see this at the moment, I need to use the FT232RL to burn the bootloader once for the very first time and than I need to continue using the USBtinyISP to burn my code but this is just vague... I'm not sure.

Thanks reading and appreciate any thoughts even if you don't know how to answer all questions.
Thanks a lot
Clinton

Xenobius

Oh... guess this finally answers it. Don't you hate it that when you quit trying and you post in a forum, you immediately find you answer >.<

http://www.ladyada.net/learn/breakoutplus/ftdifriend.html


Cheers all

Nick Gammon

If you can burn a bootloader, you can burn your code instead. You don't need both, unless you happen to want to use the bootloader in future.

I have a bit of a walk-through here:

http://www.gammon.com.au/forum/?id=11637

dc42


Ok so lets say I bought an ATmega328P (SMD version) and created my own PCB and it's time to burn the code that I have written. Code that works well on an Arduino Uno. Its just that I decided to build my own PCB.

1. Am I right to say that I first need to burn the bootloader, and than followed by my code?
2. I have an FT232RL (https://www.sparkfun.com/products/718) and also a USBtinyISP (http://www.ladyada.net/make/usbtinyisp/). I found tutorials on how to connect these so this is not the issue, but I need to understand better, Which one do I need? What do I program what with?


Include a 6-pin ICSP header on your PCB, then you can program the atmega328p in-situ using the usbtinyisp. You don't need to FT232RL or a bootloader. You do need to be careful what else you connect to the MOSI, MISO and SCLK pins of the atmega328p in your design, to make sure that the usbtinyisp can take control of those pins during programming.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Xenobius

Hey thanks for your replies.
Yes I know MOSI and MISO goes berserk when programming so I set them up as inputs with buttons to be safe.

Can I use the USBtinyISP with Arduino IDE?

Thanks for the tutorial too :D
X

Go Up