Pulsing a HIGH then LOW to pin while blinking LED

I need to properly iterate an LCD number board in time with my program. I am using the millis(); command to iterate a counter, but at the same time the LCD board needs a 10ms HIGH pulse on its pin and then have the pin go LOW. I dont start having too much issue until I start also blinking an led from high to low. Having both run at the same time makes the LCD not receive a proper signal and it loses an accurate count. Is this perhaps a power issue? My thought is that perhaps when the arduino (I am using a mega 2560 btw) writes to the led pin and the LCD pin at the same time the voltage on the LCD is not high enough to give it a readable signal. I suppose what i need to know is if there is a programming issue before i go perusing a hardware issue.

Here is the code in question

void loop()
 buttonState = digitalRead(buttonPin);// this will be replaced with a spray start indicator...

  if (buttonState == HIGH)
  {
    unsigned long thumpCTimer = millis();
    cleanFlag = true;
    
    if (thumpCTimer - thumpPTimer > thumpInterval) //if another thump has been detected...
    {
      thumpPTimer = thumpCTimer;// reset interval timer so another thump can be detected
      thumpCCounter++;// a resetable value
      thumpCData++;// the daily thumps tally (may set overflow value to 999)
      if (thumpCCounter - thumpPCounter == 1)
      {
        thumpPCounter = thumpCCounter;
        Serial.print("Thump ");
        Serial.println(thumpCCounter);
        //ledPlus();
        PORTA |= _BV(PA4);//led to HIGH
        delay(15);
        
      }
      PORTA &= ~_BV(PA4);//led to LOW
    }
  }
  else if (cleanFlag == true){
    cleanUp();
  }

  //     Lights Control
  //--------------------------
  if (thumpCCounter == 1)
  {
    PORTH &= ~_BV(PH6);//ledR to LOW
    PORTH |= _BV(PH5);//ledY to HIGH
  }

  if (thumpCCounter == 6)
  {
    PORTH &= ~_BV(PH5);//ledY to LOW
    PORTH |= _BV(PH4);//ledG to HIGH
  } 
  if (thumpCCounter > 11)
  {
    unsigned long flashCTimer = millis();
    if ((flashCTimer - flashPTimer) > flashInterval)
    {
      flashPTimer = flashCTimer;
      if (ledGS == LOW){
        ledGS = HIGH;
      }
      else{
        ledGS = LOW;
      }
      if (ledGS == LOW)
      {
      PORTH &= ~_BV(PH4);//ledG to LOW
      overSpray++;
      }
      else
      {
       PORTH |= _BV(PH4);//ledG to HIGH
      }
    }
  }


}// ---------End Of Loop-----------

Would the quickest way to determine this be to measure the voltage at the various devices with a multimeter to see if it is enough?

Extend the timing signals to a few seconds instead of milliseconds and you should be able to read the values.

in re.
PORTH &= ~BV(PH5); // CLR bit
PORTH |= BV(PH4); // SET bit

So, the part set off in parentheses is how to deal with one bit in that register?
They didn't cover that in "Port Manipulation".

It’s just this:

#define BV(x) (1<<x)

eg. BV(4) is 0x10, BV(5) is 0x20, etc

marco_c:
Would the quickest way to determine this be to measure the voltage at the various devices with a multimeter to see if it is enough?

Extend the timing signals to a few seconds instead of milliseconds and you should be able to read the values.

If I understand you correctly, the problem with that is, if i bump the LCD to any more than 10 ms it will count more than one number. It will race up to its max value if you just leave power to the pin. Kinda a crummy way to work the hardware i think but I have to work with what i am given.

I am thinking of making the variable that flashes the led the same one that works the thump counter. I think it might force the sync and i can just have the counter only get a pulse every other hit or something. Do I have any consensus on this theory ?