avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] Reset function for arduino


From: David A. Mellis
Subject: Re: [avrdude-dev] Reset function for arduino
Date: Tue, 24 Aug 2010 20:40:18 +0200

Hi,

All of the Arduino boards we've shipped with auto-reset have used a
capacitor, not a resistor, to connect RTS/DTR to the microcontroller's
reset pin, so I'm not sure this is necessary.

Also, which operating systems have you tested this on?  Do they all
allow raising and lowering of the line once the serial device is open?

David

On Tue, Aug 24, 2010 at 5:17 PM, Josef Wolf <address@hidden> wrote:
> 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
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/avrdude-dev
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]