please add a jumper to disable auto reset

Not sure this is relevant, but was able to prevent this reset by setting the DTR within a perl script I was using. Hopefully this will help somebody with a similar problem talking to the Arduino with perl.

-Dave

#!/usr/bin/perl

use strict;
use Device::SerialPort;

my $port = Device::SerialPort->new("/dev/ttyUSB0");
$port->databits(8);
$port->baudrate(9600);
$port->parity("none");
$port->stopbits(1);
$port->dtr_active(0);

sleep(1);

...

Also, regardless of the solution we find, does anyone want to write up a tutorial on unsoldering the auto-reset capacitor? It could fit nicely in the board setup and configuration section of the playground, and then I can move it over to the hacking page on the main site.

I could rig something up, as I removed it recently on my board.
Also it's still quite easy to get code uploaded onto the arduino, at least with the bootloader flashed to my chips.
I wrote a manual for the device I built, so there's a working procedure for that.

We should also add all the other known options to disable DTR that currently work, like the perl code mentioned here and stty settings in linux.

Edit: just started a stub: ( Building and Modifying Arduino type boards ... )

ladyada: have you used libftdi? Does it run under Windows? Do you know if the bit bang pins default to inputs or outputs (or if the mode persists through power loss)? It could be a problem if you had to explicitly set the bit bang pin used for reset to an input every time you powered up the board. Also, reading through the documentation, it wasn't clear to me which function actually set the states of the bit bang pins (I didn't spend much time on it); do you know?

Do you know if the bit bang pins default to inputs or outputs (or if the mode persists through power loss)? It could be a problem if you had to explicitly set the bit bang pin used for reset to an input every time you powered up the board. Also, reading through the documentation, it wasn't clear to me which function actually set the states of the bit bang pins (I didn't spend much time on it); do you know?

The pins can be set to bit-bang mode through the FTDI programming tool. It needs to be burned once into eeprom only once through the programming tool.
See MPROG from http://www.ftdichip.com/Resources/Utilities.htm

Right, but the question is whether or not we can toggle an individual bitbang pin on every upload, from the Arduino IDE. And, if you're not using the Arduino IDE whether you'll need to explicitly set the pin to an input, say, to un-reset the ATmega. Anyone know any more?

Any thoughts about Serial boards?

What about onboard USB->ISP?

ladyada: have you used libftdi?

no

Does it run under Windows?

it doesn't have to, for windows theres already a library

Do you know if the bit bang pins default to inputs or outputs (or if the mode persists through power loss)?

no, i haven't used it so i dont know. According to the app note for bit bang mode:

when the bitbang mode is enabled thru the driver, the direction is also set.

Also, reading through the documentation, it wasn't clear to me which function actually set the states of the bit bang pins (I didn't spend much time on it); do you know?

According to the app note for bit bang mode:

and D2XX driver app note
http://www.ftdichip.com/Documents/ProgramGuides/D2XXPG34.pdf

FT_SetBitMode CBUS Bit Bang mode is enabled using the FT_SetBitMode command. A
value of 0x20 will enable it and a value of 0x00 will reset the device mode.
Note that the CBUS pins must also be configured for CBUS Bit Bang in the
FT232R EEPROM.
FT_SetBitMode also provides the means to write data to the CBUS pins.
The upper nibble of the Mask parameter controls which pins are inputs or
outputs, while the lower nibble controls which of the outputs are high or low.
FT_GetBitMode FT_GetBitMode returns the instantaneous value of the pins. A single byte
will be returned where the lower nibble contains the current values of the
pins, both those which are inputs and those which are outputs.
For example:
Set all pins to output with bit 0 high: FT_SetBitMode(Handle, 0xF1, 0x20)

you can also download a lot of example code & libraries, documentation, etc. on the FTDI site
http://www.ftdichip.com/Projects/CodeExamples.htm
http://www.ftdichip.com/Projects/CodeExamples/OtherPlatforms.htm
http://www.ftdichip.com/Documents/ProgramGuides.htm

if you have any more questions about bitbang mode i'd ask FTDIchip, they have a tech support email addr
http://www.ftdichip.com/FTContact.htm

FYI, I just tried another little experiment (modified)

I took a 110 ohm resistor and connected the arduino 5v pin to the reset pin, jumper style. They are close together.

Guess what? No more com port resets :slight_smile:

Remove the jumper resistor and com port resets resume.

The 110 ohm resistor is just enough to keep the reset pin high (2.38v) when the ftdi chip tries to pull it low, and limits the current through the ftdi pins to 24ma*.

It also limits the current through the reset switch to 45ma.

for reference:

I don't know that I would trust it with an isp conected either. But it seems to be a simple "jumper style" solution, just have to make the jumper out of a 110 ohm resistor with some nice thick leads that fit the in the headers nicely.

*24ma is the limit on the ftdi rts/dtr pins, if I'm reading the datasheet right. Don't go below 110 ohms. I think you can go up to 124 ohms before it will start resetting anyway.

also, a 47 ohm resistor between 3.3v and reset seems to prevent serial resets. It's a more common value and leaves the 5v pin open.

But if you hit the reset switch it it will draw 70 ma from the ftdi 3.3V port while the switch is closed, and the datasheet lists 50ma max. I tapped my reset button a few times with this configuration and the magic smoke stayed put, and upload still worked when I pulled out the resistor, but I can't really recommend the 47 ohm if you are planning on using the reset switch.

After adding the 150 Ohm resistor, I can't upload sketch to board...I have to disconnect the resistor. Any hint to avoid this?

Press the reset button immediately before starting the upload.

So with the resistor mod we come back to previuos versions without autoreset...uhm...I would have both features...autoreset is a smart feature that I'd miss it...

Was wondering if applyng the following mods to bootloader I can have autoreset only on at upload of sketch:

http://www.ladyada.net/library/arduino/bootloader.html

Thanks

I just use the resistor like a jumper. Stick it in the pin sockets when I don't want auto reset, take it out when I do.

P.S., I said 110 ohms, not 150. You have to be precise with the resistors here.

@dcb
I haven't any 110R resistor but with 150R works fine too.

Ok, if it works it works, going below 110 ohms is the real concern.

Did you wind up soldering it in or something?

As not said :frowning: At first upload of a new sketch mod not working...

avrdude: stk500_recv(): programmer is not responding

I press reset just before uploading but nothing to do.

Also tried with a 47R tied to 3.3V but nothing.

Any hint?

Thanks

the point of the resistor is to prevent the arduino from auto-resetting.

if the arduino does not auto-reset, the bootloader will not get a chance to listen for a new sketch without very careful timing.

remove the resistor(s) if you want it to be easy to program. put the resistor back when you want to connect to the arduino without resetting it.

now seems works but...with following sequence:

  1. in arduino ide press upload icon
  2. wait for 2..3 seconds
  3. press reset button

update:

there is no critical time to respect...also 4..5 sec. after pressing upload icon

it's fine to me..