Code to detect pulses (or lack of)

My programming skills are limited to simple stuff but now I need to monitor a line for when it is steady.
I am using a Nano.

I am using a pre programmed pic chip which gives three frequency's out, which frequency it is outputting is indicated by another line pulsing or not and is either a 6hz pulse, a 1.5hz pulse or a steady high output ( pulses are 50% markspace ratio ).
I can change which mode it is in by pulsing a change line low.

Problem is how do I check if the line is steady and therefore needs no mode change and if not then I need to pulse the mode line 500m/s low then check if steady, if not pulse it again until it is steady so indicating I am at the required mode. (doing the pulsing bit I am OK with)
The mode is cyclic so after pulsing the three modes it starts again.

I need the rest of the program to make sure it always starts with this pic chip in the steady mode.

Any idea's guy's?

I forgot to say I am using the two int lines of the Nano for other things

regards John

OK. If the alternatives are 6hz pulse, a 1.5hz pulse (50% duty cycle) or a steady high output, then if you detect a low within 1 second of watching, it is clearly not in the steady state. For example:

setup() {
   . . . 
   bool steadyState = true ;
   ms = millis() ;
   while ( millis() - ms < 1000 ) {
       if ( digitalRead( pulsePin ) == LOW ) steadyState = false ;
   }
   // steadyState is now either true of false
   . . .
}

So you have three modes, and need to know whether it's steady high, if not, do the pulse, until you are in the steady high mode. That's how I understand it. To do so, you have to build a little on #1.

setup() {
  . . .
  bool steadyState = false;
  while (steadyState == false) {
    ms = millis() ;
    steadyState = true;
    while ( millis() - ms < 1000 ) {
      if ( digitalRead( pulsePin ) == LOW ) steadyState = false ;
    }
    if (steadyState == false) {
      // do pulse to go to the next mode.
    }
  }
  . . .
}