"Serial 'COM5' not found. Did you select the right one from the tools > Serial

Hello,

I have compiled and uploaded my code to the Arduino Micro using COM5 and it uploads the file but now that I press on Serial Monitor and want to see the results, it says: "Serial 'COM5' not found. Did you select the right one from the tools > Serial Port menu" ? .

Any idea what is the possible problem.

Regards,

What arduino are you using what code are you using?

Aruino Micro. It is simple interrupt counter. The funny thing is that with the same code it was working an hour ago.

Following is my code, I just tested another code and that one is working fine. Perhaps there is something wrong with this code?

#define icpPin            8         // this interrupt handler must use pin 8
volatile unsigned int Pulses[2000]; // array holding number of ticks
volatile uint8_t over_flow_count;
volatile uint8_t  PulseCount;             // number of pulses received in current frame

                   
ISR(TIMER1_CAPT_vect)
{
  //Serial.println("Hello");
   if(bit_is_set(TCCR1B ,ICES1)==0) // If rising edge is detected
   {         
     
     TCNT1 = 0;               // reset the counter - 16 bit counter   
     Pulses[PulseCount++] = ICR1;
       
     Serial.print("Overflow=");
     Serial.println(over_flow_count);
     Serial.println("count=");
     Serial.print(Pulses[PulseCount]);
   }
}

void setup()                    // run once, when the sketch starts
{
  Serial.begin(9600);
  pinMode(icpPin,INPUT);
  PulseCount = 0;
  over_flow_count=0;
  TCCR1A = 0x00;       
  TCCR1B = 0x01;         
  TIMSK1 = _BV(ICIE1);   // enable input capture interrupt for timer 1
}


void loop()                     // run over and over again
{
if (ICR1==65536)
     {
     over_flow_count=over_flow_count+1;
     }     
}

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

smd_10:
Aruino Micro. It is simple interrupt counter. The funny thing is that with the same code it was working an hour ago.

That chip has no seprate USB to serial chip it is done by processor. When you press the reset it takes time to establish the USB HID serial emulator and you HAVE NOT aloud for this in your code. There needs to be a while ( !Serial ) { } in your setup like it said in the instructions to this board and the Learnardo.

volatile unsigned int Pulses[2000]; // array holding number of ticks

That's using 2000 of the 2048 bytes of SRAM that you have. Does that seem reasonable?

Even more than that, I think.

Even more than that, I think.

Damned dirty contacts. I read that as 1000. 2000 is way beyond the capabilities of any Arduino except the Mega or Due.

PaulS:
...
Damned dirty contacts.
...

That leak your age range? Can I call you young guy? :stuck_out_tongue:

Can I call you young guy?

You can. You'd be wrong, but I wouldn't mind.

smd_10:
Hello,

I have compiled and uploaded my code to the Arduino Micro using COM5 and it uploads the file but now that I press on Serial Monitor and want to see the results, it says: "Serial 'COM5' not found. Did you select the right one from the tools > Serial Port menu" ? .

Any idea what is the possible problem.

Regards,

Is the com5 being used by another instance of the arduino IDE you've started?