474 karma · joined February 18, 2015
https://twitter.com/jms_embedded
Complexity is evil evil evil (my take on it: http://www.embeddedrelated.com/showarticle/132.php)
<quote from Conway's article>
Incidentally, today’s automobiles share this problem of a massive amount of on-board code and the bugginess that accompanies it. A few years ago, some Mercedes owners found that when they pushed a certain button on the navigation system the driver’s seat moved.
</quote>
I have this sinking feeling that my death is going to occur because of some interaction between software/firmware design and an unexpected situation (e.g. stuck in an elevator between floors because the firmware is expecting internet packets from Twitter or something). Hope I'm wrong, but the complexity of electronics seems to be increasing fast enough for system reliability to decrease.
For microelectronics there are better ways for true digital random number generators, e.g. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.99....
Suggest group theory or linear algebra instead. ;-)
Microchip licenses to you the right to use,
modify, copy and distribute Software only
when embedded on a Microchip microcontroller
or digital signal controller that is integrated
into your product or third party product
(pursuant to the sublicense terms in the
accompanying license agreement).
If there are any other restrictions, I'm not aware of them.Microchip has a number of open-source initiatives. You can use the internal guts of MPLAB X from Java via MDBcore, for example, as a scriptable debugger/simulator.
- It's not as bad as that. Chebyshev approximation + other techniques for evaluating mathematical functions are pretty easy to learn.
- You're absolutely right. Welcome to mathematics! The mountain goes infinitely high. There are tons of technical papers I'll never be able to digest simply because they've compressed lots of thoughts into cryptic-looking but standard notation.
Um. Been there, done that. Well, you see, [: discussion of internal politics deleted :]
Unfortunately just because a language exists, doesn't mean it is usable on a particular embedded system architecture. The processor core and system libraries need support.
So is that essentially sort of like Horner's Rule but for Chebyshev polynomials? e.g. instead of a0 + (a1 * x) + (a2 * x * x) + (a3 * x * x * x) + ... , use a0 + x * (a1 + x * (a2 + x * (a3 + ... so that the coefficients are used in the reverse order, and instead of having to maintain a sum and a value of x^n, we just have a single accumulator; in Clenshaw's algorithm we have the two accumulators bk1 and bk2, but they look similar.
(author here) I should have qualified or corrected that statement in my article. There are a few reasons I rarely use n>5:
- when polynomial approximation is appropriate, high-degree polynomials are usually unnecessary on embedded systems (0.1% accuracy usually sufficient)
- it's usually a sign that polynomial approximation is being misapplied and there are better ways (via range reduction, transformation like 1/f(x), etc.)
- with least-squares, computation of the coefficients can have problems with numerical accuracy. When I've used least-squares fitting polynomials with n>10, I often get a complaint from my numerical tool (MATLAB or Python) that the matrix in question is ill-conditioned. That may be because I used the Vandermonde matrix rather than Chebyshev polynomials, or because I used a large number of points. Chebyshev approximation doesn't have the same problem, I don't think, and I should not have mapped my experience with least-squares fitting onto Chebyshev approximation.
Evaluation of the polynomials themselves should be fine (after all, we can easily compute a 20th-degree Chebyshev polynomial).
When I am trying to teach someone about algorithms, I turn to Python because it is more readable, quicker for me to write, it's platform-independent, and I can incorporate it into an IPython (now Jupyter) Notebook and postprocess that into my blog articles with a minimum of hiccups.