Sign in

username:

password:



Not a member?

Search m68hc11



Search tips

Subscribe to m68hc11



m68hc11 by Keywords

27c256 | 4K81H | 68HC11A1 | 68HC11P1 | 68hc24 | 68HC711E9 | 68HC811 | 8255 | A2D | ADC | ADC12138 | Am85C30 | BRCLR | Buffalo | CMOS | EEPROM | EPROM | Ethernet | EVB | EVBU | HC11E1 | HC11E9 | HC711E9 | Horray | ImageCraft | IRQ | Keypad | LCD | MC68HC11D0FN | MC68HC11E1CFU3 | MC68HC11F1 | MC68HC711E9 | MC68HC711E9CFN2 | Microcore11 | Microstamp11 | Minikit | NVRAM | PSD | PSD8xx | PSD9xx | PT1000 | RS232 | RTS | RXD | SPI | SRAM | TXD | Watchdogs | XIRQ

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | | HC11 floating point library and non integer exponentials


Advertise Here

HC11 floating point library and non integer exponentials - Utsava - Nov 21 17:11:00 2002

Hi, I am currently working on a project that requires the calculation
of non integer exponentials such as x^0.35 As suggested by some
members of this board I am trying to use the HC11FP MATH11 floating
point library that was supposedly at some time or another created by
Motorola. This is the library that converts the floating point values
into an "internal" format that consists of 3 integer variables that
contain the sign, exponent and mantissa respectively.

My problem is that the function FLTXTOY which should calculate X^Y is
returning incorrect results. For example when calculating
55.59070587^0.2 the result returned is 1.000000238418 instead of the
correct result 2.233568802

Does anyone have any experience in using this library? Any info you
may be able to shed on this would be greatly appreciated. Below is an
example of how I am using the library:

LDX #VAR_X *point to "x"
JSR GETFPAC1 put it in FPACC1 **HC11MathLib func**
LDX #VAR_Y *point to "y"
JSR GETFPAC2 put it in FPACC2 **HC11MathLib func**
JSR FLTXTOY calculate x^y **HC11MathLib func**
LDX #V_TEMPA point to TEMP
JSR PUTFPAC1 FPACC1 -> TEMPA = x^y **HC11MathLib func**






(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )


Re: HC11 floating point library and non integer exponentials - Author Unknown - Nov 21 17:37:00 2002

In a message dated 11/21/02 5:14:21 PM Eastern Standard Time,
writes:

> Hi, I am currently working on a project that requires the calculation
> of non integer exponentials such as x^0.35 As suggested by some
> members of this board I am trying to use the HC11FP MATH11 floating
> point library that was supposedly at some time or another created by
> Motorola.

I know this isnt the answer you want, but if you wrote the prog in c, and
used pow()
I bet the right answer would pop out, and if it didnt, and you used icc11,
the guy that wrote the compiler would fix it in a day or two.... [Non-text portions of this message have been removed]





(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )

Re: HC11 floating point library and non integer exponentials - Frank Valkenborgh - Nov 22 5:09:00 2002

Hi all,

Is it possible to use the same code from MC68HC11A1-CFN2 on the MC68HC711E9CFN2?
Our programsize is only 500bytes and is located in the EEPROM.
We start the device in bootstrap mode and download the program code to eeprom.

Because both devices have the same eeprom size, sam RAM size, same location of eeprom.
Only the config register differs.

Any suggestions?

Thanks in advance,

Frank [Non-text portions of this message have been removed]




(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )

Re: HC11 floating point library and non integer exponentials - Utsava - Nov 22 8:49:00 2002

--- In m68HC11@y..., BobGardner@a... wrote:
> I know this isnt the answer you want, but if you wrote the prog in
c, and
> used pow()

Unfortunately this code is being added to a much larger project that
is entirely in assembly. I'm also stuck with an antiquated DOS
Archmedes compiler and linker. > I bet the right answer would pop out, and if it didnt, and you used
icc11,
> the guy that wrote the compiler would fix it in a day or two....

What are you referring to with icc11? I'm not following you here. Does anyone have a compiled pow() function for the HC11? Maybe I
could go the cheesy route and copy the compiled code?

Thanks for the reply.

Chris




(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )

Re: Re: HC11 floating point library and non integer exponentials - Author Unknown - Nov 22 10:17:00 2002

In a message dated 11/22/02 8:51:03 AM Eastern Standard Time,
writes:

> Unfortunately this code is being added to a much larger project that
> is entirely in assembly. I'm also stuck with an antiquated DOS
> Archmedes compiler and linker. Hey... legacy code maintence is what sw engineering is all about. Tell your
boss I'll port the whole hoary old thing to c for $100 an hr.. don't pay
unless it compiles and runs... [Non-text portions of this message have been removed]


______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of m68hc11 -- send a blank email to m68hc11-subscribe@yahoogroups.com )