Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4794

Variables name in PBP and same variables name in ASM or macro listed in pbp xxx.lib

$
0
0
I try to find clear explanations about variables name used in PBP and variables name in ASM or PBP macros (listed in files *.lib of PBP3 directory
For example
DutyCount var byte : in PBP : no problem
Count var byte EXT : in asm subroutine
I guess it is a variable "Extern" which would be similar to main PBP program variable déclaration "Count var byte" as the previous line DutyCount var byte

_DutyCount ; used in asm lines routine as for instance "incf _DutyCount, F"
_DutyCount, is it the variable DutyCount address or the readed value of variable DutyCount used in asm routine ?

I discover asm procedures with the very well done program DT_INTS-14.bas from Darrel Taylor in which I would want to modify asm program in vue to mask for instance 3 pulses on 4.

To fix ideas with my goal :
if the pulse period is 5ms and duty cycle is 256 steps, the accuracy of duty cycle is 50ms/256 steps = 0.19ms per step.

If I succed to mask the 3 following pulses (avoiding to put "1" on the out pulse port in the asm routine), this manner would lead to a precise pulse every 20 ms. Then, this would lead to a pulse with 0.19ms resolution with a 20ms period (and so on if the number of masked pulses increase). <BR>The future use of this function is to buid a PID speed rpm with a brushless motor knowing that this last one&nbsp;is drived by an ESC for which command is like a servo command.

I use PBP3 and 16F690

Viewing all articles
Browse latest Browse all 4794

Latest Images

Trending Articles



Latest Images