Go Down

Topic: please add a jumper to disable auto reset (Read 43909 times) previous topic - next topic

dcb

#15
Jul 01, 2008, 03:14 am Last Edit: Jul 01, 2008, 03:37 am by dcb Reason: 1
Umm, can't you just d ike the reset cap?  It would probably be the most rewarding part of someones day :D



edit, or just cut the reset trace, and wipe something green (or blue or whatever) on it if you are really worried about appearances.

madworm

Quote
one thing that would work pretty well would be to use one of the FT233RL bitbang pins instead of the DTR pin...


that sounds like a sensible hardware/software solution.
still it would need a change of the pcb too and adds some (maybe minor) complexity on the configuration side. if the "new" auto reset were included within the ide, users would not have to deal with it themselves, hopefully.
unfortunately I'm not quite sure what this would do to backward compatibility.

I still favour the jumper though, hardware only, no change in software ;-)
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

kg4wsv

I like LadyAda's bitbang pin solution, as it would do nothing in the face of "standard" serial port connections on "typical" systems (whatever those are).  I don't know how portable it would be, though, and in my mind one of the Arduino's biggest selling points is the cross platform support.

The FTDI bitbang solution would require some Arduino PCB support (or some field expedient "ECO upgrades") as well.  If you're going to change the board, might as well just add the jumper and leave the software alone...

Maybe make the jumper small and unobtrusive, like the little solder-bridge type jumpers that don't even require a PTH?

Hmm, on an alternative note, is there some way to disable the handshake pins in the FTDI chip using the FTDI tools?

-j


dcb

#18
Jul 01, 2008, 06:10 pm Last Edit: Jul 01, 2008, 06:24 pm by dcb Reason: 1
Quote
Hmm, on an alternative note, is there some way to disable the handshake pins in the FTDI chip using the FTDI tools?


Hmm... Could probably disable the FTDI rts and/or dtr pins with a little 50 volt tap on it too, wouldn't even leave a mark :)  Might take out pin 1 on the atmega too, but don't know if that matters for this application.  Could ground pin 1 also to keep it safe too.  Depends on the exact board in question.

http://www.arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf

Is that still a software solution?  You are basically sending a signal to the fdti chip to tell those pins "you die now!" ;)


mellis

I like ladyada's FTDI bitbang idea too.  Changes to the software can be good things, since it's much more flexible than the hardware.  

Another idea is a solder bridge, so that it would be relatively easy for advanced users to unsolder the connection, but a beginner would never even need to know it was there.  Thoughts?

akak1656

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);

...

mellis

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.

madworm

#22
Jul 08, 2008, 10:16 pm Last Edit: Jul 08, 2008, 10:50 pm by madworm Reason: 1
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 ... )
• Upload doesn't work? Do a loop-back test.
• There's absolutely NO excuse for not having an ISP!
• Your AVR needs a brain surgery? Use the online FUSE calculator.
My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...
• Microsoft is not the answer. It is the question, and the answer is NO!

mellis

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?

spiffed

Quote
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
iDuino - MaxSerial - [url=http://spi

mellis

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?

dcb

Any thoughts about Serial boards?  

What about onboard USB->ISP?

ladyada

Quote
ladyada: have you used libftdi?  


no

Quote

Does it run under Windows?  


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

Quote

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:
http://www.ftdichip.com/Documents/AppNotes/AN232R-01_FT232RBitBangModes.pdf
when the bitbang mode is enabled thru the driver, the direction is also set.


Quote

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:
http://www.ftdichip.com/Documents/AppNotes/AN232R-01_FT232RBitBangModes.pdf
and D2XX driver app note
http://www.ftdichip.com/Documents/ProgramGuides/D2XXPG34.pdf

Quote

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

dcb

#28
Oct 24, 2008, 05:07 am Last Edit: Oct 24, 2008, 02:35 pm by dcb Reason: 1
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 :)

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:
http://www.arduino.cc/en/uploads/Main/Arduino-Diecimila-schematic.pdf
http://www.ftdichip.com/Documents/DataSheets/DS_FT232R.pdf

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.

dcb

#29
Oct 24, 2008, 06:17 am Last Edit: Oct 24, 2008, 06:22 am by dcb Reason: 1
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.


Go Up