It's not my forum. I just make sure folks don't abuse it (or each other) too much...

From your first post, I gather this is a serious project with a serious problem... unfortunately I only answer the frivolous ones - serious I leave to other people - unless there's money involved.

But really, to join a forum just in order to ask folks to drop what they're doing and IMMEDIATELY write code for you because you need it URGENTLY is really the height of bad manners - and you should expect a little fun to be made from it.

My original post pointed you to the fact that you CANNOT have fractions with PICBasic... ONLY INTEGERS. If you are capable of doing the circuit you describe, then you are also capable of a little high-school mathematics in converting degrees to radians. Then feeding that figure into the provided COS function and converting the resultant into the required COSINE but scaled-up because we must always work in INTEGERS.

You have been shown how to convert degrees to radians and how to get your Cosine function... a little bit of experimentation on your part will complete the code and you will have a working program. So make an effort, try to understand what's been written (thank you BigW), and don't expect everyone else to do it all for you...

See... this is why we're not getting rich on this forum... somebody always does it for free... *sob*