Sorted, a few tweaks and i am there, i had to replace the == operator at the top of the loop with a single = operator as it was running a comparison and getting stuck,
will follow up with some updates when i have meged the PWM colour code and CAN recieve and transmit code into the main code.
Thanks again
Rich