Code won't compile
I'm a total beginner when it comes to this stuff. I was given code for a project I'm doing but for some reason it won't compile for me but it compiled for the person that gave it to me. I'm using MPLAB and I get an error message saying 'can't generate code for this expression" and this is the line of code it points to
I was reading up on it and I think it may have something to do with this line being too complicated for the code generator to compile but iI have no idea how to simplify it.
if (RA1 ==1 & dutycycle >0)
Any help is greatly appreciated.
Try using && instead of &.
Thanks for replying so quickly. It didn't like that at all at all!!!
Error  ; 0. can't find 0x70 words (0x70 withtotal) for psect "text80" in segment "CODE" (largest unused contiguous range 0x4A)
is a well-formed C statement, providing RA1 and dutycycle are either variables or constants. So it should be fine if MPLAB uses the C language.
if (RA1 == 1 && dutycycle > 0)