Tuesday, January 14, 2014

Programming the Arduino Pro Mini 16MHz 5V using a USB serial adaptor


Yesterday I soldered up my Arduino Pro Mini compatible board - http://winkleink.blogspot.co.uk/2014/01/soldering-up-pro-mini-arduino.html

Today I wanted to figure out how to program it.

As I have made some bare bones Arduino compatibles using the Shrimp details from Morecombe Makers http://shrimping.it/blog/shrimp/ I've done some programming using serial and I know the USB serial adaptor I have works for raw programming.It's uses on the CP2102 chip.

A really useful thing with the board I have is that it has the DTR pin which can used to reset the Arduino and put it into programming mode.

USB Serial - pin out the side is DTR (essential)

I also know the USB board I have being a very cheap board has the TX and RX labelled wrongly as the standard is to cross over the wires. TX-RX and RX-TX but my one is a direct connection TX-TX and RX-RX.

With great confidence and knowing to wire from USB to Arduino as TX to TX and RX to RX, GND to GND, 5V to VCC and DTR to RST (to do the reset needed)

In the IDE I selected Arduino Duemilanove w/ ATmega328 as per the Arduino site http://arduino.cc/en/Guide/ArduinoProMini

With everything correctly setup I uploaded a modified version of Blink so I can see the difference between the pre-programmed Blink.

It failed. No error message, it just didn't upload.

So, began the usual Google hunt and after looking at a bunch of pages detailing programming the boards using another Arduino I came across this YouTube video with the essential nugget of information that on the Arduino Pro Mini there is a pin on the right angle header labelled GRN in the corner next to the TX pin. I had no idea what it was so in the true hacker tradition I ignored it.  Ends up it's essential as this is where DTR needs to be connected as it is a Reset line but with the required capacitor to hold the reset long enough for the programmer to engage.  The video also gives extra details on different programmers and is well worth a watch..
Note: The video mentions that you could use the DTR or RST lines on the USB adaptor connected to GRN.  For me with my serial adaptor only DTR worked. RST on the USB adaptor did not work for putting the Arduino into programming mode.


Once the DTR line was connected to the GRN pin on the Arduino Pro Mini it programmed perfectly.

All wired up and working. The big breadboard is only
there to make it king of level

Now I have the board all soldered up I have to figure out something to do with it.maybe involving the capacitive touch pads I bought recently.




No comments:

Post a Comment

Note: Only a member of this blog may post a comment.