The Cyber-Spy.Com Usenet Archive Feeds Directly
From The Open And Publicly Available Newsgroup
This Group And Thousands Of Others Are Available
On Most IS NNTP News Servers On Port 119.
Cyber-Spy.Com Is NOT Responsible For Any Topic,
Opinions Or Content Posted To This Or Any Other
Newsgroup. This Web Archive Of The Newsgroup And
Posts Are For Informational Purposes Only.
From: "John Jardine"
Subject: Re: Trig circuits
Date: Mon, 23 Dec 2002 16:41:34 -0000
References: <firstname.lastname@example.org> <email@example.com>
NNTP-Posting-Date: 23 Dec 2002 16:28:29 GMT
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
Spehro Pefhany wrote in message
> On Mon, 23 Dec 2002 14:11:47 -0000, the renowned "John Jardine"
> Here is the step-by-step procedure:
> 1) BUY a decent COMPILER
> 2) Type in the EQUATIONS- use double and #include math.h for
> trig (if using C)
> 3) RELAX and have a nice cold BEER (or a warm one if you'd
> prefer) It will work just as it worked on your PC.
> There is NO need to devote hardware to this- the chip described is
> a pre-programmed microcontroller aimed at a non-professional
> market IM(NS)HO. A $5 US chip can burn 50% of its bandwidth
> (say 4MIPS) running floating point math in the background
> while walking and chewing gum with every port pin. It's a no-
> brainer, guys.
> Best regards,
> Spehro Pefhany
> "it's the network..." "The Journey is the reward"
> firstname.lastname@example.org Info for manufacturers:
> Embedded software/hardware/analog Info for designers:
Sounds like those compiler things can make life nice and easy ;-) The ones
I've come across (for the smaller micros anyway) always seem to have some
resriction on the precision and range of the maths functions. Eg, floating
point not available, just integer maths and even then only to say 32 bits.
Trig and Log functions are sometimes added just as an afterthought, offering
say 1% integer accuracy (I can do better myself). I agree and would expect
the more expensive compilers (C or Basic) should offer maths routines at
least equiv to a calculator. There is always the downside though that the
compiler may come across say "sin(a)" and all of a sudden an internal 2K of
micro programme memory disappears. (you noted it yourself ;-).
What I'm getting at here, is that yes, for the more full blown larger
projects it becomes worthwhile to buy a larger micro with larger prog'
memory with the intent in the first place of using a rather pricey compiler.
The job is worth it and the development time is reduced greatly.
But, for the smaller, cost sensitive high volume jobs (say an angle sensor
to use a 1k or less PIC)), using a compiler will give impossible space and
efficiency problems and hand coding is still needed. An add-on chip (if
cheap enough) could provide the 'Sin' answers with no overhead on the main
micro and a possible final cost reduction.
Someday I'll experience the pleasure of using a good compiler. I'm a bit of
a hair shirt masochist at the mo' ;-)
Go Back To The Cyber-Spy.Com
Usenet Web Archive Index Of
The sci.electronics.design Newsgroup