Your welcome Werner.
Werner wrote: Is it that tmr2 is internal to the chip that we have no other way to access it in Flowcode?
Well spotted!
FCV_TMR2_VAL = tmr2;
Just means read value of tmr2 (timer 2 interrupt register) that’s used for internally generating PWM signal. and assign to the Flowcode variable called TMR2_VAL
In C if name is in lower case then it’s an internal register
FCV_ part is how you assign a Flowcode variable (one you added yourself) with the contents of register.
Note: When preceding Flowcode variable with FCV_ then you must use the variable name in upper case. E.g a Flowcode variable is called: My Flowcode variable,
then you will use
FCV_MY FLOWCODE VARIABLE;
As far as I'm aware, there is no other way to access chip register without using C code.
Hope I have explained it Ok.
Martin.