I wanted to re-purpose an Arduino Pro Mini that I hadn't used for a while, so - as I do with all the Arduinos I re-use - I tried to upload the Blink sketch to return it to a sort of 'default' state and to prove to myself that it is still working. This failed miserably, and led to a fair bit of wasted time checking connections, the voltage of the Pro Mini and using a couple of different programmers, and so on.So I thought it may be useful to someone if I briefly explained what I did to fix the issue I had, and return the Pro Mini to a working state. It may also be of use if your Pro Mini has arrived without a bootloader. I normally upload sketches to to a Pro Mini using a USB-Serial FTDI programmer, and plug the Pro Mini opposite it on a breadboard.
This way, the pins match up and it does away with any messy cabling. There are a number of ways to burn a bootloader to an Arduino device, but the one I used (for convenience and speed) was to use an Arduino Uno as an ISP (In-System Programmer). Thanks to this 'I did remember (it works sometimes) that I had an ESP8266 arrive with a corrupted bootloader and had similar issues', I've understood why one of my Arduino Pro Mini refuses to upload sketchs. So I have flashed the bootloader, with an usbasp in my case. After that it worked.
But at next upload, I had the same error. In fact, after flashing the bootloader, I can upload a sketch only once! I always need to reflash the bootloader before. I use IDE option 'Burn bootloader'. It uses the 2 following commands: /Applications/ -C/Applications/ -v -patmega328p -cusbasp -Pusb -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m /Applications/ -C/Applications/ -v -patmega328p -cusbasp -Pusb -Uflash:w:/Applications/ -Ulock:w:0x0F:m Any idea? I solved the Pin 11 = MOSI, Pin12 = MISO and Pin 13 - SCLK I think but now I get this error on the upload. Sorry for the loooonnnngg delay in response, been busy with other things.
Getting back to this, I've played with a couple of these with some baffling results. I purchased some 3.3v modules for specialized use, to interface with an ESP 8266 12E.
Since the ESP's use 3.3V I figured it would be easier to stay with one voltage instead of using level conversion circuitry. However if using the Uno to upload a bootloader, level conversion would be necessary at that point anyway.For those who asked, no I really haven't found a definitave answer to the issue of hitting the reset in order to upload. Infact at this time I have been unable to upload at all. I need to retrace my steps and refamiliarize my self with the pro mini.
Arduino Nano Bootloader
I'll try to post something when I make any discoveries. One thing is clear at the start.
There are a lot of different clones out there, and there may be just enough differences to cause issues with given instructions. It would be a good idea for instructional authors to explain what a step is doing to help those who have problems. IE: Connect a to b.(in order to.'
Bootloader for Arduino Mega2560 Bootloader for Arduino Mega2560The standard Arduino bootloader uses STK500 version 1 protocol. This protocol works fine up to chips that have 128 bytes of Flash.After that it does not understand the extended addressing.
Fortunately there is STK500v2 protcol that can handle larger memory footprints.I started with the wiring project stk500 v2 bootloader and modified it to work with the 2560.This bootloader has been tested on CPUBOARDWeb siteatmega2560Arduino megaatmega1280Arduino megaatmega128Amber128Androidshould be able to be made to work with any larger atmega cpu by modifiying the make file which is included with the source.How to use the 2560 and others in Arduino. Download new Arduino core filesNOTE: This ONLY applies to version 0019 and earlier. If you have 0020 you DO NOT NEED TO DO THIS. Update eeprom.hIt must be placed in hardware/tools/avr/avr/include/avr.On the MacOSX, the full path is /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/avr/include/avrThis is STILL NEEDED for 0020. Restart Arduino softwareFull source and make files can be found hereThe current bootloader in the Arduino mega board has a little known fact that it has a monitor built in. It is not very usable in that it has to be done with a program and cannot be used via a terminal because it uses binary commands. In orderto access this 'monitor' you have to open the serial port at 57600 baud and type '!!!'
Before it jumps to the main program.I have done the same thing in the new bootloader but it is a command prompt to allow you to look at the hardware and memory.To access this monitor open up a serial port at 115200 and type '!!!' Within 3 seconds.The commands are. 0=Zero address counters.?=CPU stats. @=EEPROM test.
B=Blink LED. E=Dump EEPROM.
F=Dump FLASH. H=Help. L=List available Ports.
Arduino Hex File
Q=Quit and jump to user program. R=Dump RAM.
Arduino Bootloader Code
V=show interrupt Vectors. Y=Port blinkThis bootloader takes 8K memory and I have used almost every available byte.
The monitor can be turned of but this was designed for the atmega2560, atmega1280, and atmega128, all of which have plenty of flash memory space.The monitor is VERY useful to test hardware. For example you can blink any port, you can look at flash, ram and eeprom.
Sample output Arduino Bootloader? All eyez on me torrent download.