Hello, The reset function for the arduino board seems not to be quite correct, IMHO.
The arduino_open() function, as implemented, leaves the *DTR and *RTS lines on the TTL side in low level, causing the board to be in reset state permanently if the board contains only the resistor without a capacitor (for example arduino NG or Diecimila) http://arduino.cc/en/uploads/Main/arduino_NG_schematic.png http://arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf I would suggest to let the *RTS and *DTR lines go to high again after reset, so the chip can actually run regardless whether there is a capacitor or a resistor used to attach to the *RESET input. The attached patch works for me with both types of boards, no matter whether a resistor is used or a capacitor. Opinions? Index: arduino.c =================================================================== --- arduino.c (Revision 947) +++ arduino.c (Arbeitskopie) @@ -92,8 +92,15 @@ * (for example in Arduino) */ serial_set_dtr_rts(&pgm->fd, 0); usleep(50*1000); - /* Set DTR and RTS back to high */ + + /* Set DTR and RTS back to high to assert RESET */ serial_set_dtr_rts(&pgm->fd, 1); + usleep(5*1000); + + /* Clear DTR and RTS again, so the chip can run even when a resistor is + used instead of a capacitor + */ + serial_set_dtr_rts(&pgm->fd, 0); usleep(50*1000); /* _______________________________________________ avrdude-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avrdude-dev
