Arduino Mega 2560 Timer/counter problem

Hi, friends. i am working on arduino mega.

i want to measure the count of 16 bit timer. following is steps.

  1. detects rising edge on ICP pin of arduino i am using Pin 47 of mega.
  2. Timer will start by detecting rising edge. it will counting till falling edge.
    3)as soon as pulse edge fall timer stop counting and, immediately it will store data into inside memory and then upon request it can display via serial or LCD display.

at present i am generating a single pulse from UNO and its width is varying from 5uS to 100uS. this pulse i am planning to give ICP Pin of MEGA.

i need help in coding to get such function.

kindly help, how do i move.
Thanks in advance.

Not only is this a double post, but it seems to have nothing to do with LEDs and Multiplexing