1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Arduino only programming via usb once

Discussion in 'Arduino' started by dr pepper, Feb 15, 2017.

  1. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,757
    Likes:
    258
    Location:
    North west UK
    I'm sure this has allready been mentioned.
    I can program my arduino once via usb, then it doesnt want to know again, if i then program it using an isp that uses the reset line I can program the bootloader and I get get another one time program.
    After researching a little on line I found some posts about a reset problem on the target board, but no specific info.
    If I hold reset on the 'duino, click program in the ide then let go of the reset button when the ide goes to 'programming' it works every time for as many times as I like.
    I'll do this for now, but its there a more permanent solution?
     
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,310
    Likes:
    914
    Location:
    Rochdale UK
    How big is your program??? Are you so big you are over writing the bootloader??
     
  3. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,757
    Likes:
    258
    Location:
    North west UK
    60% of progmem and 60% of data mem.
    I had to switch to a mega as I needed more data mem.
    Doesnt the 'duino set write protect for the bootloader?
    I'm beginning to think summat's up with this 'duino, opening the serial terminal usually resets the 'duino, with this one it doesnt, plus some of the time powering up the board it doesnt reset it just sits there, then pressing the reset button makes it fire up, I think theres a dicky connection from the dtr connection on the ch340 to the reset line, or a bad cap or something, the reset button works but the serial terminal reset doesnt.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn

    Without knowing which board your using there not much way it figure whats going on.
    Theres lot's of so called duino
     
  6. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,757
    Likes:
    258
    Location:
    North west UK
    Sorry Burt, its a mega 2560.
     
    Last edited by a moderator: Feb 20, 2017
  7. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,869
    Likes:
    144
    Location:
    morristown,tn
    Have a look here http://forum.arduino.cc/index.php?topic=381462.0

     
  8. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,718
    Likes:
    37
    maybe a serial terminal(built in with programmer) tying up the programming port?
     
  9. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,757
    Likes:
    258
    Location:
    North west UK
    The op didnt fix it.
    Sounds like I'd better get a couple of non knock offones and program this one for the final application.
    Dr dog I tried several instances on a couple of computers, its the same, besides the thing will actually program if I hold the reset button so comms does happen.
     
  10. Dr_Doggy

    Dr_Doggy Well-Known Member

    Joined:
    Aug 11, 2007
    Messages:
    1,718
    Likes:
    37
    this problem sounds familiar to me, are you using any additional shields?
    I cant remember specifically what the problem was or which fix was for which but it was something like:
    1) a bluetooth serial peripheral that caused a conflict on serial0
    2)a problem with a reset button on a separate shield that seemed to be wired upside down

    a)isolated serial0 to PCusb only, beware of "blueno" and other shields using serial0:
    https://www.dfrobot.com/bluno?gclid=COvF2ey6tNICFZS2wAodJEcJdw
    b)traced and cut out the faulty reset button circuitry that was on a separate shield
     
    Last edited: Feb 28, 2017
  11. dr pepper

    dr pepper Well-Known Member Most Helpful Member

    Joined:
    Oct 6, 2008
    Messages:
    4,757
    Likes:
    258
    Location:
    North west UK
    Nope I'm not using any shields, I've even tried just burning the blinky code and thats the same.
    I might try using my component tester octipus thing and see if theres any sign of capacitance from the dtr on the CH340 to the reset terminal, it probably isnt worth spending a lot of time on.
    The arduino itself is useless, as it doesnt reliably reset on power up.
     

Share This Page