Hello All

I need to calculate this example:

varWord = (varByteA*365) + (varByteB*30) + (varByteC/2) + varByteD

The PIC calculate always varWord = 0

How can I write this, or must I before calculate copy the var's byte's in word's, like so

varWordA = varByteA:varWordB = varByteB:varWordC = varByteC:varWordD = varByteD

varWord = (varWordA*365) + (varWordB*30) + (varWordBC/2) + varWordD



Thank for any help

Best Regards

Pedro