Yes, R2 is one of PBP's internal "System Registers" and if not used immediately the value would be changed.
Floating point is overrated, and not normally required.
Decimal places can usually be dealt with using integer math.
If fctr is a variable and the value is *1000 (2266 = 2.266), then you can just multiply the pulses by the same amount and use DIV32.
This one takes longer to execute and uses more code space than the previous example.Code:circ = puls * 1000 circ = DIV32 fctr
Bookmarks