Page 1 of 1

Reading / Writing registers

Posted: Fri Nov 16, 2007 5:18 pm
by pieradis
Dear sirs,

I m a new entry in this forum and sorry about that ,how can access to a registry like CCP1 or others from flocode

thanks for y patient :roll:

Posted: Fri Nov 16, 2007 5:51 pm
by Benj
Hello

If you wish to write to or read from a register using Flowcode then you will have to use a C code icon.

eg to read/write ccp1 you would do the following.

ccp1 = 0xFF; //Write value to ccp1 register
FCV_MYVAR = ccp1; // Read value from ccp1 register

You also have to keep in mind that the C code will not simulate in Flowcode.

However the ccp1 register controls one of the PWM outputs. This can be controlled via the PWM component in Flowcode.