Now I got it working using the maths formula (masikng the 7th bit did not work for any reason). Appreciate your kind support!