While purchasing the pressure sender in my last post i picked up two " Arduino Pro Mini compatible" boards for a few dollars each.
When they turned up i did the usual print out a copy of a schematic and pin out i found on line... Hmmm... the pin out of the programming header on the end of the board is NOT the same as the standard Arduino Pro Mini. Its more like that of the Mini. So be careful. they are swapped end for end.
OK , power it up.. Yes ! , the led blinks like a bootloader loaded Arduino should.. Buttt.. it was blinking at 4 times per second and not once a second! Someone got the fuses or timer pre-scaler wrong. Bugger.
( I have since found out that some people have been able to talk to the bootloader in this mode by changing the serial baud rate of the programmer.)
After a few hours i managed to get my SparkFun AVR Pocket Programmer to talk to the board using the below command lines.
avrdude -b 19200 -c usbtiny -p m328p -v -e -U efuse:w:0x05:m -U hfuse:w:0xD6:m -U lfuse:w:0xFF:m
avrdude -b19200 -c usbtiny -p m328p -v -e -U flash:w:hexfilename.hex -U lock:w:0x0F:m
(ArduinoIDE 1.0.6 insists on trying to talk to the usbtiny via a com port when the new driver is pure usb. each time i want to use this programmer i have to edit the 'preferences.txt' file that in C:\Users\
( I like others can only upload by selecting 'Upload using programmer' from in the file TAB, the Upload button (>) generates an error at the end of the upload script.)
I connected the programmer to the Pro Mini with jumper leads and pushed out a new bootloader for a 5v, 16meg M328P. All was good again. One second duty cycle on the LED Blink.
Next was to talk to the board with a cheapy CP2102 USB-2-Serial(TTL) board. I did the usual reading up other peoples past experience and got it working by adding a 1 uF cap from the DTR pin on the USB-2-serial board to the reset line on the Ebay Pro Mini.
After a few days i wanted to clean up the 5 mini jumper wires that everyone uses nowadays and make a 5 to 5 or 6 to 6 plug set. While considering how to get the reset trace of the Pro Mini to one of the pins along the end of the board i noticed the end pin on the Pro Mini is labeled "DTR" and not RST. Tracing the board with a meter found a 0.1 uF cap already on the PCB connected to the reset pin of the CPU !!! I think there are a lot of people out there using old info and spending wasted time getting the auto reset working on the newer Pro Mini boards.
Yellow arrow is DTR pin from the CP2102 board extended out inline with the other pins.
The green arrow shows the "DTR" text that indicated the capacitor is already on the board.
The red circle is a reminder that my Pro Mini goes TX, RX, VCC, Gnd from this view.
So, i now have a 5 to 5 header cable that runs between the two tiny boards. The DTR auto reset asserted by the avrdude software and within Arduino IDE works every time now.
Arduino IDE settings when using the CP2102 board:
- Board= "Arduino Pro or Pro mini"
- Serial Port =" Com 11" ( your setting maybe different )
- Programmer= "AVRISP MKII"