ebarash:
Your code has also one second delay to write pulses and without that is not working.
That is not an important part of my program. I just did it like that so the info appears at a rate that makes sense for the human viewing the screen. There is no need to display the data and you can update things every time there is a pulse if you wish.
I don't know what you mean by "without that is not working"
...R