Arduino Pro Mini port not recognized under specific (consistent) circumstances

I have been running into very strange problems with an Arduino Pro Mini 5V 16Mhz Atmega328 connected to the computer with an USB FTDI TTL cable.

When uploaded with certain code, when I disconnect and reconnect the USB cable it doesn't show up under serial ports anymore (or with a 'ls -l /dev/cu.*' for that matter).

I have been able to reproduce the problem on all three computers I tried it on (2x MacBook Pro running Lion, 1x Windows Vista), and across 4 different arduino pro mini's (all 5V 16Mhz Atmega328's). The problem does not occur with any of the other Arduino's I own (Duemilanove, Uno, Mega1280). To reproduce:

  • Upload an empty program with only Serial.begin(9600) in setup().
  • Do not open the serial monitor.
  • Disconnect the arduino (pull out the USB cable from the computer).
  • When I reconnect it, it does not show up under Serial Ports (no matter how many times I try).

To fix it:

  • Pull the USB cable out of the computer, then put it back in.
  • Quickly afterwards pull the TTL connector out of the arduino.
  • Put it back in, and it will once again show up under Serial Ports.

The problem does not occur without the Serial.begin in the setup.

Can anyone at least reproduce the error?

http://www.sparkfun.com/tutorials/245