Go Down

Topic: Uploading Sketch to +5v Pro-Mini problems (Read 504 times) previous topic - next topic

xl97

Mar 16, 2018, 04:26 am Last Edit: Mar 16, 2018, 05:40 am by xl97
Hey gang-

I have a few +5v Pro-Mini, that have been sitting in a drawer for quite some time now..

I finally had a need to use one.. and I cant seem to upload a sketch to it.

I power it up.. and it looks to have the default blink sketch on it already...

After several attempt at NOT getting a sketch to upload....  I tried to re-bootload it using an old Arduino Deumilanove.. The verbose messages led me to believe it was successful... however after un-connecting things and powering up the Pro-Mini again.. the same blink sketch is still there?


And I still can-not upload a sketch using any of my FTDI programmers (CP2102 to be clear)

I have also tried swapping the RX/TX lines.. still wont work..

here is the current error output:


IDE 1.6.7
Arduino Pro/Pro-Mini
+5v/16MHz

Code: [Select]

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe6
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe6

avrdude done.  Thank you.



gets to 10 attempts.. and stops.


The blinking light on the Pro-Mini stops while the upload attempt is happening.. bt once it fails.. it goes back to the default blink sketch/behavior.

What am I missing here?

Thanks!



Quick Update:

ok.. so I took my old Duemilanove board.. popped out the DIP 328p ship.. and tried to use that as a 'programmer'...

Worked fine.

So the problem is with the CP2102 programmer?

I have had these for a LONG time.. and used them many times over.. on different machines!!?

In device manager.. I see Silicon Labs CP210x USB to UART Bridge (COM5).. so I believe the drivers are installed correctly!!??

Thanks for any advice/feedback.. not sure where to go from here?



ChrisTenone

Try this - I was having the same problem just tonight, and this worked for me:

Attach your pro-mini to your computer via a ftdi cable or device. Press and hold the reset button and begin the upload. As soon as the compile part ends, release the reset button (just as uploading begins.) Boom! It should program away.
I don't got to show you no stinkin' signature.

septillion

I can't say for sure burning the bootloading will erase the blink... But I would not be to concerned.

You can check a couple of things:
- Do the loopback test! Only that way you know for sure the USB-Serial converter is working.
- Check the order of the pins. I have some Pro Mini's with the header mirrored ::) What can I say, China...
- Did you connect all pins? So also DTR(/RST) and GND?
- If you try to upload, does the board reset? You can see this with the onboard led which should flash fast a couple of times. Same as if you push the reset button.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

xl97

#3
Mar 16, 2018, 01:12 pm Last Edit: Mar 16, 2018, 01:16 pm by xl97
@ChrisTenone

- I tried the reset button trick a couple of times.. (used to have to do this all the time with an UART programmer that didnt have DTR pin broken out on it)

I'll give it a few more tries though... see if my timing was off (but I doubt it)..  :)

@seltilion

- good idea on the loopback test..

I have tried the header pins as well as the regular broken out pins along the edges..

Yes.. the programmer has the rest (DTR) broken out...
I have VCC, GND RX, TX and RESET all connected to the programmer  (VCC, GND, RX, TX, DTR)  pins..

I guess I 'do not' see the board reset...

however.. the current 'blink sketch' on there, -does- stop blinking.. when I attempt to upload.  (if I do NOT have the rest pin attached, it blinks forever.. never stops when attempting an upload..



ok.. UPDATE:

@ChrisTenone

you were correct sir... I guess I just wasnt holding it down long enough or letting go at the right time.

But that works.

So no I'm wondering why my programmer doesnt reset things correctly?
(and how do I fix it?)

uxomm

Does the pro mini have a cap in the DTR/reset line or is it just the broken out reset pin?

With some pro minis I had to add a cap from DTR (coming from USB to serial converter) to reset pin (100nF).
Always decouple electronic circuitry.

xl97

Thats a good question...

I believe this is the same version I have in hand:

https://www.ebay.com/itm/Pro-Mini-Enhancement-ATMEGA328P-5V-16MHz-Compatible-to-Arduino-PRO-mini/191679508570?hash=item2ca0fd305a:g:AxIAAOSwT6pV5YIu

(I wonder if the +3.3v/8MHz ones also have this problem as well!!???)

So you just added a 100uF cap (in-line)?  Between the DTR pin on the programmer and the RST pin on the Pro-Mini?

Are there specific variants one SHOULD get that -do- have the cap?

Actually..I think its like this version:
https://www.sparkfun.com/products/retired/9218

Which says its retired?  (not clear why though)...

Schematic looks to have a cap on the REST pin though?

https://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Arduino-Pro-Mini-v12.pdf




DrAzzy

#6
Mar 16, 2018, 10:39 pm Last Edit: Mar 16, 2018, 10:41 pm by DrAzzy
You have connected the DTR line incorrectly - it needs to go to the pin on the opposite side of the 6-pin header on the end of the pro mini (markings on that pin are not consistent between manufacturers - some mark it DTR, some mark it "GRN" because the DTR line on some specific model of FTDI cable that was very popular when the pro mini was first released used a green wire for DTR) - that has the cap in between the pin and the reset pin.

If you connect it direct to reset, there's no cap, so it will just be held in reset while trying to upload, when you need a brief pulse on reset (which is what the cap is for - it converts the transition to a pulse, with the cap forming the C of an RC circuit), so that the chip will be reset, but not held in reset (the bootloader only runs after reset is released). Which is what you're seeing.


The LED will blink when there's the bootloader, but no sketch on it - the bootloader blinks the LED, and if no sketch is present, the bootloader will run repeatedly.
ATtiny core for 841+1634+828 and x313/x4/x5/x61/x7/x8 series Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts (some assembled), mosfets and awesome prototyping board in my store http://tindie.com/stores/DrAzzy

xl97

You have connected the DTR line incorrectly - it needs to go to the pin on the opposite side of the 6-pin header on the end of the pro mini (markings on that pin are not consistent between manufacturers - some mark it DTR, some mark it "GRN" because the DTR line on some specific model of FTDI cable that was very popular when the pro mini was first released used a green wire for DTR) - that has the cap in between the pin and the reset pin.

If you connect it direct to reset, there's no cap, so it will just be held in reset while trying to upload, when you need a brief pulse on reset (which is what the cap is for - it converts the transition to a pulse, with the cap forming the C of an RC circuit), so that the chip will be reset, but not held in reset (the bootloader only runs after reset is released). Which is what you're seeing.


The LED will blink when there's the bootloader, but no sketch on it - the bootloader blinks the LED, and if no sketch is present, the bootloader will run repeatedly.
DOH!!..
Thank you for this!!
You are 100% correct..  I moved the DTR line from the programmer from RST to GRN..  BOOM!..
no need to manually press the rest button!
Awesome!..
Thank you (again)

ChrisTenone

I don't got to show you no stinkin' signature.

xl97

Not that I use Pro-mini's often....  but I'm surprised I have never seen that little tid-bit of knowledge posted before?

It has been a life saver so far!

Thanks @DrAzzy

septillion

@ xl97, you mean where to connect the DTR? That's because everybody just uses the header at the small side that's designed for the USB-Serial adapter :D
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

xl97

@septillion -

Yep..  I was under the impression it needed to connect to the RST pin(s)..  either on the header.. or either of the RST pins along either edge of the Pro-Mini..

I 'was' using the header side... but my programmer only gives 5 pins..  (GND, +5v, RX, TX...and with a slight mod.. the DTR pin)..

No clue it was supposed to connect to 'GRN' on the Pro-Mini header!  LOL

Good to know!  (seems like others werent aware of this either)  :)


septillion

Hehe, good it works now. But it isn't for nothing it's called the programming header sometimes ;) (Not to confuse with the ISP header.) Everything is there :D
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Go Up