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


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2014
    Location
    France 35-Bretagne
    Posts
    2

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

    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
    Last edited by asegui; - 10th November 2014 at 16:52.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,520


    Did you find this post helpful? Yes | No

    Default Re: Variables name in PBP and same variables name in ASM or macro listed in pbp xxx.l

    Hi,
    If you declare a variable in PBP then you need to preceed it with an underscore in order to access it in ASM. myPBPVariable in PBP will be _MyPBPVariable in ASM
    If you declare a variable in ASM then you need to inform PBP of that variables existance using EXT. myASMVariable in ASM will be myASMVariable in PBP.

    I'm sure you've see the thread The EXT (external) modifer....

    /Henrik.

  3. #3
    Join Date
    Nov 2014
    Location
    France 35-Bretagne
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Variables name in PBP and same variables name in ASM or macro listed in pbp xxx.l

    Thanks Henrik for your indications and explanations ; No, I have not read the link you gave about EXT and this one completes my goal.
    Have you any other links on this topic ?
    Alain

Similar Threads

  1. PBP and storing variables
    By Charlie in forum FAQ - Frequently Asked Questions
    Replies: 1
    Last Post: - 28th January 2012, 11:10
  2. Using ASM with PBP variables.
    By BobEdge in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th August 2011, 11:28
  3. Extensions to PBP variables
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd October 2009, 05:21
  4. Fatal xxx.ASM 527: [308] macro buffer overflow
    By TerdRatchett in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th March 2009, 17:51
  5. pbp and signed variables
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd June 2004, 10:07

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts