Initializing arduino - How to Read External Interrupt in the init

Hello Everyone!

I have a project to receive a serial signal from a KENWOOD radio and plot this message in the display OLED.

The project it is simple. I receive de serial message via external interruption. Works fine.

The problem is: When I turn on the radio, imediately is send a serial signal message to plot the values in the display.

The first message I cant read because the Microcontroller dont start as fast like the radio send the message then the display don`t plot the message. The display stay without any data.

Someone knows what I can try to take this first message when the radio is on?

The microcontroller use the same VCC of radio. So, when turn on, microcontroller take the voltage in the same time.

I tried burn the hex program without bootloader, but don`t work.

Briefly, the loop waits for the external interrupt of the signal to receive the message and plot in the display using a u8g2 lib. I'm putting only the SETUP part and the message reading function. It works after boot but don`t work when turn on the radio.

ISR (INT0_vect) // INTERRUPTION - EDGE RISING
{
  SerialDatal[i] = (PIND & (1 << PIND4));
  i++;
  //LendoDado = true;
} // FINAL

void setup() {

  DDRD &= ~(1 << DDD2);         // PORT2 WITH INPUT WITHOUT
  PORTD = PORTD & ~ (1 << PD2);

  DDRD &= ~(1 << DDD3);         // PORT3 WITH INPUT
  PORTD = PORTD & ~ (1 << PD3);

  DDRD &= ~(1 << DDD4);
  PORTD = PORTD & ~ (1 << PD4); // PORT4 WITH INPUT


  EICRA |= (1 << ISC01) | (1 << ISC00);     // EXTERNAL INTERRUPT 
  EICRA |= (1 << ISC10) | (1 << ISC11);     // EXTERNAL INTERRUPT
  EIMSK |= (1 << INT0);                     //  EXTERNAL INTERRUPT
  EIMSK |= (1 << INT1);                     //  EXTERNAL INTERRUPT
  sei();
  u8g2.begin();  // START OLED SH1107 64X128 LIB

}

void loop() {

// WAITING THE INTERRUPT SIGNAL TO GET THE SERIALDATA AND PLOT....

}

Thanks all!

Could you have the Arduino control power for the radio?

Have the power switch turn on the Arduino and then have the Arduino turn on the radio.

add a delayed start to the radio

Hello everyone!

To use a delay to start the radio it complicated. I need create a lot of modification. Use a relay and change the on/off button. I use the same regulated VCC of the radio to supply my microcontroller.

I had the solution analysing the schemattic of radio. The microcontroller of radio have a battery to keep the memory always working in the Vdd. When the radio is turned on, the microcontroller have a external interrupt to send the first data storage in the memory. The last configurantion ploted in the display.
This external interrupt is a 5V.
I use a NPN transistor to put this PIN in GND (0V) and release.
When the transistor open, the microcontroller of radio send again the first data. Is the same data when I turn on the radio but with my microcontroller ready to read.
I have the display with the first data in less than 50ms
Wortks fine!

Thanks all!