Hi kasun, welcome to the forums.
We would need a bit more information to even begin to help you, like what is this serial out? What format?
Reading ports is easy, there are a few tricks like you need to turn off any associated analog functions which are on by default.
A dumb delay is simple as long as you have nothing else to do in the meantime.
Last, we don't write code for you. We will help guide you to your solution.
Hope to hear back from you!
by Aaron Carman
by Duane Benson
by Aaron Carman