Sign in

username:

password:



Not a member?

Search 68hc12



Search tips

Subscribe to 68hc12



68hc12 by Keywords

68HC1 | 812A4 | 9S12DP256 | Bootloader | CodeWarrior | D60A | Debugger | DP256 | ECT | EEPROM | EVB | Flash | HC1 | HCS12 | I2C | IAR | ICC1 | Interrupts | LCD | M68KIT912DP256 | MC9S12DP256 | MC9S12DP256B | Metrowerks | Motor | MSCAN | Multilink | PLL | Quadrature | SDI | SPI | Transceiver | XFC


Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | 68HC12 | Floating Point using AN974 with MC9S12A256


Advertise Here

Join our technical discussions about Freescale Microcontrollers: M68HC12. (Freescale Semiconductor is a Subsidiary of Motorola).

Floating Point using AN974 with MC9S12A256 - ga5941 - Apr 30 18:49:41 2009

Earlier I reported a problem(16296)using AN974, MC68HC11 Floating Point Package by Gordon Doughman. I'm now happy to report that I have resolved the problem and it wasn't with AN974. My floating point calculations in assembly code are working correctly including trig functions. The package, however, does not include an Arctan function. I have written my own, in assembly of course, using the Cordic algorithm. The Arctan function is necessary for converting celestial coordinates RA and DEC to earth based coordinates ALT and AZ.

A reply to my original note suggested a possible difference between HC11 and HC12 regarding stack operations but I have found none when using AN974.

Thanks to all that replied.

------------------------------------



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


Re: Floating Point using AN974 with MC9S12A256 - David Armstrong - May 1 0:21:00 2009

If you have a working version of the AN974 Floating point code, why not
share it with the rest of the community here? I'm sure there are several
individuals that would like to see and use it.

Dave

On Thu, Apr 30, 2009 at 4:48 PM, ga5941 wrote:

> Earlier I reported a problem(16296)using AN974, MC68HC11 Floating Point
> Package by Gordon Doughman. I'm now happy to report that I have resolved the
> problem and it wasn't with AN974. My floating point calculations in assembly
> code are working correctly including trig functions. The package, however,
> does not include an Arctan function. I have written my own, in assembly of
> course, using the Cordic algorithm. The Arctan function is necessary for
> converting celestial coordinates RA and DEC to earth based coordinates ALT
> and AZ.
>
> A reply to my original note suggested a possible difference between HC11
> and HC12 regarding stack operations but I have found none when using AN974.
>
> Thanks to all that replied.
>
[Non-text portions of this message have been removed]

------------------------------------



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

Re: Floating Point using AN974 with MC9S12A256 - David Armstrong - May 1 0:40:15 2009

If you have a working version of the AN974 Floating point code, why not
share it with the rest of the community here? I'm sure there are several
individuals that would like to see and use it.

Dave

On Thu, Apr 30, 2009 at 4:48 PM, ga5941 wrote:

> Earlier I reported a problem(16296)using AN974, MC68HC11 Floating Point
> Package by Gordon Doughman. I'm now happy to report that I have resolved the
> problem and it wasn't with AN974. My floating point calculations in assembly
> code are working correctly including trig functions. The package, however,
> does not include an Arctan function. I have written my own, in assembly of
> course, using the Cordic algorithm. The Arctan function is necessary for
> converting celestial coordinates RA and DEC to earth based coordinates ALT
> and AZ.
>
> A reply to my original note suggested a possible difference between HC11
> and HC12 regarding stack operations but I have found none when using AN974.
>
> Thanks to all that replied.
>
[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 68hc12 -- send a blank email to 68hc12-subscribe@yahoogroups.com )

Re: Floating Point using AN974 with MC9S12A256 - ga5941 - May 3 19:47:49 2009

--- In 6...@yahoogroups.com, David Armstrong wrote:
>
> If you have a working version of the AN974 Floating point code, why not
> share it with the rest of the community here? I'm sure there are several
> individuals that would like to see and use it.
>
> Dave
>
> On Thu, Apr 30, 2009 at 4:48 PM, ga5941 wrote:
>
> >
> >
> > Earlier I reported a problem(16296)using AN974, MC68HC11 Floating Point
> > Package by Gordon Doughman. I'm now happy to report that I have resolved the
> > problem and it wasn't with AN974. My floating point calculations in assembly
> > code are working correctly including trig functions. The package, however,
> > does not include an Arctan function. I have written my own, in assembly of
> > course, using the Cordic algorithm. The Arctan function is necessary for
> > converting celestial coordinates RA and DEC to earth based coordinates ALT
> > and AZ.
> >
> > A reply to my original note suggested a possible difference between HC11
> > and HC12 regarding stack operations but I have found none when using AN974.
> >
> > Thanks to all that replied.
> >
> >
> >
> [Non-text portions of this message have been removed]
>
After extensive search of Freescale files, I found the AN974/D document. It is type .pdf, 745 KB. You can download it from:

http://www.freescale.com/files/microcontrollers/doc/app_note/AN974.pdf?fpsp=1&WT_TYPE=Application%20Notes&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation

It was located with the application notes for the MC68HC11 micros. I did not find the actual software file itself though it is listed in the AN974/D document. The actual code file is about 2 KB. I do not have my own website but can send it in an e-mail as a file attachment to someone who maintains a website. Any volunteers?

The routine for Arctan(X) that I wrote in assembly code also includes Arcsin(X) and Arccos(X) and runs 249 bytes. To obtain a proper understanding of it one should also read this paper:

http://www.andraka.com/files/crdcsrvy.pdf

and another that I downloaded from the internet but is no longer accessible. This one runs about 48 Kb.

I would be happy to help anyone who needs this material. Perhaps it could be done through this 68HC12 Yahoo group through the file system.
I don't know how to use the file system, perhaps someone could walk me through it. My email addr is g...@yahoo.com

Gil

------------------------------------



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

Re: Floating Point using AN974 with MC9S12A256 - ga5941 - May 4 10:14:54 2009

--- In 6...@yahoogroups.com, "ga5941" wrote:
>
> --- In 6...@yahoogroups.com, David Armstrong wrote:
> >
> > If you have a working version of the AN974 Floating point code, why not
> > share it with the rest of the community here? I'm sure there are several
> > individuals that would like to see and use it.
> >
> > Dave
> >
> > On Thu, Apr 30, 2009 at 4:48 PM, ga5941 wrote:
> >
> > >
> > >
> > > Earlier I reported a problem(16296)using AN974, MC68HC11 Floating Point
> > > Package by Gordon Doughman. I'm now happy to report that I have resolved the
> > > problem and it wasn't with AN974. My floating point calculations in assembly
> > > code are working correctly including trig functions. The package, however,
> > > does not include an Arctan function. I have written my own, in assembly of
> > > course, using the Cordic algorithm. The Arctan function is necessary for
> > > converting celestial coordinates RA and DEC to earth based coordinates ALT
> > > and AZ.
> > >
> > > A reply to my original note suggested a possible difference between HC11
> > > and HC12 regarding stack operations but I have found none when using AN974.
> > >
> > > Thanks to all that replied.
> > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> After extensive search of Freescale files, I found the AN974/D document. It is type .pdf, 745 KB. You can download it from:
>
> http://www.freescale.com/files/microcontrollers/doc/app_note/AN974.pdf?fpsp=1&WT_TYPE=Application%20Notes&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
>
> It was located with the application notes for the MC68HC11 micros. I did not find the actual software file itself though it is listed in the AN974/D document. The actual code file is about 2 KB. I do not have my own website but can send it in an e-mail as a file attachment to someone who maintains a website. Any volunteers?
>
> The routine for Arctan(X) that I wrote in assembly code also includes Arcsin(X) and Arccos(X) and runs 249 bytes. To obtain a proper understanding of it one should also read this paper:
>
> http://www.andraka.com/files/crdcsrvy.pdf
>
> and another that I downloaded from the internet but is no longer accessible. This one runs about 48 Kb.
>
> I would be happy to help anyone who needs this material. Perhaps it could be done through this 68HC12 Yahoo group through the file system.
> I don't know how to use the file system, perhaps someone could walk me through it. My email addr is ga5941@...
>
> Gil
>
I've found the URL for this last paper; it is the most important for understanding how to implement the Cordic algorithm for the Arctan function:

http://www.restena.lu/convict/Jeunes/Math/arctan.htm

Gil

------------------------------------



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

Re: Re: Floating Point using AN974 with MC9S12A256 - Rob Milne - May 4 11:07:58 2009

Another very good resource is the "CORDIC Algorithm Simulation Code"
from Dr. Dobbs Journal issue #ddj9010 which is copied in many places on
the net. It is an excellent ansi C implementation of cordic written
back in 92 by P. Knoppers.

-rob

ga5941 wrote:
> --- In 6...@yahoogroups.com ,
> "ga5941" wrote:
> >
> > --- In 6...@yahoogroups.com ,
> David Armstrong wrote:
> > >
> > > If you have a working version of the AN974 Floating point code,
> why not
> > > share it with the rest of the community here? I'm sure there are
> several
> > > individuals that would like to see and use it.
> > >
> > > Dave
> > >
> > > On Thu, Apr 30, 2009 at 4:48 PM, ga5941 wrote:
> > >
> > > >
> > > >
> > > > Earlier I reported a problem(16296)using AN974, MC68HC11
> Floating Point
> > > > Package by Gordon Doughman. I'm now happy to report that I have
> resolved the
> > > > problem and it wasn't with AN974. My floating point calculations
> in assembly
> > > > code are working correctly including trig functions. The
> package, however,
> > > > does not include an Arctan function. I have written my own, in
> assembly of
> > > > course, using the Cordic algorithm. The Arctan function is
> necessary for
> > > > converting celestial coordinates RA and DEC to earth based
> coordinates ALT
> > > > and AZ.
> > > >
> > > > A reply to my original note suggested a possible difference
> between HC11
> > > > and HC12 regarding stack operations but I have found none when
> using AN974.
> > > >
> > > > Thanks to all that replied.
> > > >
> > > >
> > > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > After extensive search of Freescale files, I found the AN974/D
> document. It is type .pdf, 745 KB. You can download it from:
> >
> >
> http://www.freescale.com/files/microcontrollers/doc/app_note/AN974.pdf?fpsp=1&WT_TYPE=Application%20Notes&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
>
> >
> > It was located with the application notes for the MC68HC11 micros. I
> did not find the actual software file itself though it is listed in
> the AN974/D document. The actual code file is about 2 KB. I do not
> have my own website but can send it in an e-mail as a file attachment
> to someone who maintains a website. Any volunteers?
> >
> > The routine for Arctan(X) that I wrote in assembly code also
> includes Arcsin(X) and Arccos(X) and runs 249 bytes. To obtain a
> proper understanding of it one should also read this paper:
> >
> > http://www.andraka.com/files/crdcsrvy.pdf
>
> >
> > and another that I downloaded from the internet but is no longer
> accessible. This one runs about 48 Kb.
> >
> > I would be happy to help anyone who needs this material. Perhaps it
> could be done through this 68HC12 Yahoo group through the file system.
> > I don't know how to use the file system, perhaps someone could walk
> me through it. My email addr is ga5941@...
> >
> > Gil
> >
> I've found the URL for this last paper; it is the most important for
> understanding how to implement the Cordic algorithm for the Arctan
> function:
>
> http://www.restena.lu/convict/Jeunes/Math/arctan.htm
> Gil
------------------------------------



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