avatar

genexerc

Member Since: November 22, 2015

Country: United States

  • There is some problem with USB serial! I have Arduino IDE v1.6.5 and trying to convert my micro to ArduinoISP with sketch from examples. It compiles well but isn’t work with avrdude!

    $ avrdude -C c:/temp/avrdude.conf -patmega328p -b19200 -cavrisp -Pcom22 -U flash:r:test.hex -v -v
    avrdude.exe: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
        Copyright (c) 2007-2009 Joerg Wunsch
    
        System wide configuration file is "c:/temp/avrdude.conf"
    
        Using Port                    : com22
        Using Programmer              : avrisp
        Overriding Baud Rate          : 19200
    avrdude.exe: ser_recv(): programmer is not responding
    avrdude.exe: stk500_recv(): programmer is not responding
    avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x03
    

    I cheked it with PuTTy and “Serial Monitor” by sending “1 ”(one and space). It respond with “AVR ISP” and this looks nice but then I tried to do the same using HTerm and it gave no reply! I checked what happened with SysInternals PortMon and discovered that neither HTerm nor avrdude sets SERIAL_DTR_CONTROL. So I downloaded source of avrdude:

    $ svn co svn://svn.savannah.nongnu.org/avrdude/trunk
    

    and changed line in avrdude/trunk/ser_win32.c:

    -dcb.fDtrControl = DTR_CONTROL_DISABLE;
    +dcb.fDtrControl = DTR_CONTROL_ENABLE;
    

    recompiled and it works like a charm!

No public wish lists :(