Reading / Writing registers

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
pieradis
Posts: 2
Joined: Fri Nov 16, 2007 5:07 pm

Reading / Writing registers

Post 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:

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post 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.

Post Reply