N-Bit_MATH


Closed Thread
Results 1 to 39 of 39

Thread: N-Bit_MATH

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hopefully, more info and examples forthcoming.
    <br>

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Very cool! I've got to try these out. Thanks Alexander and Darrel!

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default

    As always, a great Darrel Taylor's project!

    Thanks!

    Ioannis

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default

    Wow, this is going to be very cool Darrel!
    I know you said to keep trying if it wouldn't compile but I can't seem to get it to "go thru" when using it in the same program as DT-Ints... Boiled down example, this compiles:
    Code:
    PRECISION CON 4 SYSTEM
    INCLUDE "N-Bit_Math.pbp"
    
    Setpoint VAR BYTE[PRECISION]
    Position VAR BYTE[PRECISION]
    Error VAR BYTE[PRECISION]
    
    Start:
    Pause 10
    Goto Start
    This does not compile (or assemble):
    Code:
    PRECISION CON 4 SYSTEM
    INCLUDE "N-Bit_Math.pbp"
    INCLUDE "DT_INTS-18.pbp"             'Include the interrupt system files.
    INCLUDE "ReEnterPBP-18.pbp"
    
    ASM
    INT_LIST    macro   ;IntSource    Label   Type   ResetFlag
           INT_Handler INT2_INT,    _DoStep,   PBP,     yes                                
                endm
        INT_CREATE
    ENDASM
    
    @ INT_ENABLE INT2_INT
    
    Setpoint VAR BYTE[PRECISION]
    Position VAR BYTE[PRECISION]
    Error VAR BYTE[PRECISION]
    
    Start:
    Pause 10
    Goto Start
    
    DoStep:
    Toggle PortB.7
    @ INT_RETURN
    I get a whole bunch of Symbol not previously defined FSR0L0L and so on.

    Similarily, same code as above but simply removing the INCLUDE "N-Bit_Math.pbp"-line also compiles fine so there seems to be some incompatibillity there.I'm using 18F2431 but the device selected in MCS+ doesn't seem to matter.

    Any ideas what might be the issue?
    Thanks!
    /Henrik.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hmmm, apparently it's laughing at my use of FSR's "FSR0L0L".

    You are correct, there is a conflict when used with DT_INTS-18.
    DT-INTS-14 is OK.

    I must find a way around it.

    Thanks Henrik.
    DT

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Thanks again Henrick.
    The FSR problem should be fixed.

    The file has been updated to version 1.1 Alpha.
    And should now work with DT-INTS-18.

    http://www.picbasic.co.uk/forum/atta...4&d=1262930635

    Cheers,
    DT

  7. #7
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Hey Darrel,

    Only works for me with MPASM assembler case sensitive option enabled.

    In DT_INTS-18;
    SaveFSR macro F, Pr
    RestFSR macro F, Pr

    And in N-Bit_Math:
    SAVEFSR macro
    RESTFSR macro

    Edit:
    Code:
    MOVE?PP  macro BeerIN, Pout ; copy an N-bit variable to an N-bit variable
    BeerCount = 0
        while BeerCount < PRECISION
          MOVE?BB BeerIN + BeerCount, Pout + BeerCount
    BeerCount = BeerCount + 1         
        endw
      endm
    Too cool --- Classic Darrel...;o)
    Last edited by Bruce; - 4th January 2010 at 23:24. Reason: OMG
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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