Dear all,
Thank you very much for the help. This was the first time I posted to the arduino forum and it seems to be a great nice place with a vibrant community.
I will implement the solution and see what happens and will let you know. By the way the board is an Arduino Uno clone.
Thanks
Gayan