MeLabs has a nice intro to longs here: http://www.microengineeringlabs.com/...cles/longs.pdf
Ok , Thanks Bruce I will have a look to longs as suggested.
I am writing a program in order to control the Analog Device AD9912 DDS: this device will be used as a RF signal generator for radio ham use. The point is that I have to multiply a number as like as
2^48/1000000000 ( 281474.976711) by another number that is the readout of the real output frequency ( from 1 Hz to 400 MHz ) . At the moment the Melabs FP works well and gives me the correct output frequency.
Unfortunately i can not put the " DDS" piece of program in a subroutine : in this case i do have no errors after compiling but the 16F877 does not work.
And, if I recall the "DDS" piece of program more than three times in my program i do have the same result.
>> question: how can i set the HS oscillator using the Mpasm and pic16f877 with no problem ?
Thanks a lot.
Ambrogio
IW2FVO
Would've been a lot handier to have that information awhile back ya think?
Now I see what you're trying to do. I suppose it's a matter of how you look at it. You need the ability to handle large numbers more than you need floating point specifically...and to be able to handle those numbers with some precision. If I remember right, PBP can handle some 48 bit math (more specifically, I think you can retrieve some of the overflow from a 32x32 multiply). I don't have the manual handy, so I don't want to comment on it at the moment.
I want to set up the HS oscillator mode for the pic 16f877 using Mpasm.
I did use the following for the PM:
@ device PIC16F877,HS_OSC,LVP_OFF, PROTECT_OFF ' use for PM only
What shoul I write for the Mpasm use without having the overwrite error message?
What .INC file should I have to modify ? ( pbp or mpasm ? ), if any.
Thanks a lot
Bye
Ambrogio
IW2FVO
I bought the earlier versione named 2.46 years ago and i do have the manual. If you are so interested this version did cost to me around 230 € here.
A German radio ham gave me a recent version that is the 2.50 but without any manual.
I am waiting to receive manual or instruction from him soon.
Speaking from a more actractive point of view, I am interest in implementing the program using the new "long" capability of the basic. I will try to modify the program.
I stand here!
Any help is appreciated.
Regards,
Ambro
Bookmarks