Any way to tell if the programming cable is attached?

I'm working with an arduino pro mini. Is there any way to tell that the FTDI adapter is connected to the board? I'd like to be able to put the board into "debug" mode whenever the cable is attached and dump data out the serial port - but not take the performance hit when the cable is not connected.

cptdondo:
I'm working with an arduino pro mini. Is there any way to tell that the FTDI adapter is connected to the board? I'd like to be able to put the board into "debug" mode whenever the cable is attached and dump data out the serial port - but not take the performance hit when the cable is not connected.

Not with just software. However if you were to wire say a 10K pull-down resistor to the arduino Rec pin (arduino digital pin 0) it should read a logic low if the FTDI adapter is not hooked up, and read logic high if the adapter is hooked up and the serial link was idle.

Lefty

OK, thanks, that's easy to test. I take it the value of the resistor is not critical; I don't have any 10K handy but I have some 4K7 laying around.

cptdondo:
OK, thanks, that's easy to test. I take it the value of the resistor is not critical; I don't have any 10K handy but I have some 4K7 laying around.

Should be ok with 4K7, but be sure to test it to see if the FTDI still works when attached.

Lefty