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.
Am I right to say that I first need to burn the bootloader, and than followed by my code?
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:
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.
Am I right to say that I first need to burn the bootloader, and than followed by my code?
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.
Right... I was refering to a situation I had once where I had a relay connected to MOSI and during programming, the relay kept clicking like mad. Hence were I got the berserk adjective. The buttons are normal push to make buttons which do not have to be pressed during programming. It is understood that by doing so, I would be interfering with the programming but this is better than having a relay or some output connected to them and during programming you would be risking damaging or controlling something.
So, is that means it is better not to connect any input/output device at the MOSI, MISO and SCK pins ? Are you programming using USBasp/usbtiny right ? If you are using ftdi programmer, then it will only involve Tx and Rx
It depends what you are doing. On the Uno the Tx/Rx pins are connected to the USB chip and have pull-ups on them, making them not particularly useful as input pins.
Also if you put a load on them you may not be able to upload a new sketch until you disconnect it. This may or may not bother you.