Why is it I can't upload a bootloader to an ATMEGA328 chip that is bare using a UART.
I have no need to do so, I have an arduino isp, but, this is something that is just bothering me that I don't know the answer to. I am sure it has something to do with the method of communication, but I know programming with a UART is super easy, but bootloading seems to be impossible.
Again, this is a question of why I can't and the details involved in the type of communication that obviously has to be different to load a bootloader.
Thanks in advance.
UART doesn't take control of RESET and the pulse the clock line (SCK) while supplying data and reading back data on 2 other lines (MOSI and MISO).
A UART generally just has Rx and Tx, so it's a few control lines short.
I did see a topic recently where a bootloader was installed from the 16U2 on the Uno.
The FTDI chip could do that with the older Duemilanove boards too:
I still have my Duemilanove with pins installed for this method:
http://make.kosakalab.com/arduino/bootloader/index_en.html
Took a while to set up the software and for it to run.
I see more recent hits on google, so possibly the process has been improved
Nowadays I use an Atmel AVR ISP MKii when I'm at my PC, and I have sell standalone programmers that will set the fuses and load a file from an SD card:
http://www.crossroadsfencing.com/BobuinoRev17/Programmer.html
The board I have does not have pins for those things, but does have them as soldier points. It does actually have a DTS pin, and I use it with a .1uf cap to reset (and a 10k pull-up of course). I was doing more reading after I asked the question, and found that some people seem to have luck attaching all those lines, I did, but no result. My particular UART has solder points for DCD DSR RTS CTS RST RI SUS and SUS with a line over it.
So, maybe it would be possible with what I have after all, I used my hands to make connection last time, I probably just moved or something, I should maybe solder some jumpers onto the spots I need?
Again I have no NEED to do this. I want want to know if it CAN be done, and if not WHY it can't. LOL.
Thanks for the response.
Will be reading those links now.
Most PC's don't have a UART that isn't run through a TTL to RS232 level shifter. It is possible to bit-bang (use low-level control of the serial port output pins) enough of an SPI interface to burn a bootloader. AVRDUDE uses the name "ponyser" to reference the PonyProg serial port programmer.
You'll find the schematic here: http://www.lancos.com/e2p/siprog_base.png They used to sell boards and kits via Artek.it but that website no longer exists.
Remember that if you try to install an Arduino UNO bootloader on an ATmega328p chip you will need to supply a clock crystal to complete the operation. Serial (ISP) programming requires a running system clock.
I recommend spending the $4 for a USBasp clone or $5 for a USBtiny clone from China via eBay.