Today's Deals (in Amazon.com)

 Question:

pic - Microchip PIC18 matrix routines
  • stef

    I'm using a Microchip PIC18 and I need to use matrices in my code. I know DSPIC do have matrix libraries, that simplifies the implementation. Does anybody know whether any is available also for the 18 family (my present PIC18 embeds an hw multiplier)?

    Thank you all!

  •  Answers:

  • Thomas O

    If you're just using simple, fixed size matrices like 2x2 or 3x3 affine transforms, it's not very difficult to implement them yourself. That link shows how to compute the determinant and inverse of a matrix. Multiplication, addition, etc. are much easier. In fact, the Cairo source code, a drawing library, has GPL/LGPL/MPL licensed code for dealing with matrices (2D affine only): cairo-matrix.c

  • Leon Heller

    Microchip themselves doesn't have any suitable libraries for the PIC18. Someone on the Microchip forums might have written some routines you can use, though.

    I'd be inclined to use a 16-bit PIC, it would make things much easier.