Problems with mpasm


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    Jun 2008
    Location
    Varese , Italy
    Posts
    326


    Did you find this post helpful? Yes | No

    Default mpasm and melabs F P

    Hi,
    thanks for the interest:
    this is the peace of program that in my opinion needs a fp:

    'DDS: '------------------------------------------------------------------------

    AARGB0=f0
    AARGB1=f1
    AARGB2=f2
    AARGB3=f3

    ASM
    CALL flo3232
    ENDASM

    debug HEX2 f0," ", HEX2 f1," ", HEX2 f2, " " , HEX2 f3, 13,10




    ' CALCOLO DELLA FTW DA INVIARE AL DDS
    ' 2^48/1.000.000.000= 281474,976710656
    ' USARE IL PROGRAMMA FREP.EXE DELLE ROUTINES FP PER CONVERTIRLO DIRETTAMENTE
    ' ATTENZIONE: USARE $81 INVECE DI 91 PERCHE' I 2 BYTE MENO SIGNUFICATIVI LI LASCIO
    ' A ZERO ( VEDERE MAIL DI i0cg )


    BEXP=$81
    BARGB0=$09
    BARGB1=$70
    BARGB2=$5F

    GOSUB FPMUL

    ASM
    CALL INT3232
    ENDASM

    'debug " start ",dec aargb0," ",dec aargb1," ", dec aargb2," ",dec aargb3,13,10

    LOW DDSCSB
    'SHIFTOUT DDSDAT,DDSCLK,1,[%01100001,%10101011,aargb0,aargb1,aargb2,aargb3,$0 0,$00]
    HIGH DDSCSB
    HIGH DDSUPDT
    LOW DDSUPDT

    -------------------------------------------------------------------------------------
    Have you some differents indication for me ?
    ( I am sorry for my bad English .. I am Italian )
    Sometimes is very hard for me to understand the real meaning of the things !

    Thanks again
    Ambrogio
    IW2FVO






    Quote Originally Posted by skimask View Post
    Nothing interesting about it.
    Where is the program using numbers between 0 and 1? Or fractions for that matter?
    All I see is numbers that go above 16 bit. If that's the case, and you are using an 18Fxxx part, then you can use LONG variables to handle 32 bit (large) numbers.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by iw2fvo View Post
    Hi,
    thanks for the interest:
    this is the peace of program that in my opinion needs a fp:
    Why does it need floating point?
    Just because the program has it there, doesn't mean it has to be there.
    Rewrite the program to NOT use floating point.
    Again, I don't see any decimals points needed here. At most, a 32 bit variable.

Similar Threads

  1. Moved from PM to MPASM and have fuse definition problems
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th November 2008, 23:27
  2. 12F675 MCLR directive MPASM
    By OLDSCHOOL in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th May 2008, 02:29
  3. MPASM 18F4550 getting started
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th September 2007, 00:59
  4. MPASM problems
    By BrianT in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 31st August 2007, 02:29
  5. Converting to MPASM
    By btaylor in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th November 2005, 02:35

Members who have read this thread : 0

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