Henrik, thanks again for the reply.
Using the code in my last post (#5) the LED on channel 1 of the PCA chip fades up, all the way until pcaPwmValue reached 4096. At 4097 it went off, and as it increased (now at 6745) the LED on channel 1 has lit up but not on full brightness. What I can't understand is I have a B_MAX variable which has a value of 4095, with an "If B_PWM=B_MAX then doe something else statement which seems to be ignored. I was reading up on the variable statement and the manual comments that there is a size statement, with the use of additional modifiers, but I couldn't find any decent examples. Is there a way of simply limiting the word to 4095 something like B_PWM VAR Word size 4095 ??
Bookmarks