Floating Point using AN974 with MC9S12A256

View: New views
6 Messages — Rating Filter:   Alert me  

Floating Point using AN974 with MC9S12A256

by ga5941 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.


Re: Floating Point using AN974 with MC9S12A256

by davidarmstrong72 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <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]


Re: Floating Point using AN974 with MC9S12A256

by davidarmstrong72 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <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]


Re: Floating Point using AN974 with MC9S12A256

by ga5941 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- In 68HC12@..., David Armstrong <mamoru.tbreesama@...> 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 <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





Re: Floating Point using AN974 with MC9S12A256

by ga5941 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- In 68HC12@..., "ga5941" <ga5941@...> wrote:

>
> --- In 68HC12@..., David Armstrong <mamoru.tbreesama@> 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 <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


Re: Re: Floating Point using AN974 with MC9S12A256

by Rob Milne :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 68HC12@... <mailto:68HC12%40yahoogroups.com>,
> "ga5941" <ga5941@...> wrote:
> >
> > --- In 68HC12@... <mailto:68HC12%40yahoogroups.com>,
> David Armstrong <mamoru.tbreesama@> 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 <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 
> <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 
> <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 
> <http://www.restena.lu/convict/Jeunes/Math/arctan.htm>
>
> Gil
>
>