Can really mess up a few days...

Thanks to all for the support. I guess the fact that when written with binary logic the program worked fine - it threw me for a loop and took focus off the hardware. My apologies ...