[fpc-devel] Why is FPC so self-contained ?

Marco van de Voort marcov at stack.nl
Tue Nov 4 11:34:10 CET 2008


In our previous episode, Felipe Monteiro de Carvalho said:
> > Well, I gave up PIC24 since they don't contain motorcontrol,
> 
> I've always wanted to know what does a microcontroller with
> motorcontrol is supposed to do different from a normal microcontroler?
> 
> I mean, to drive a stepper motor, for example, you just need 4 or 5
> output pins from any microcontroller and a darlington driver to
> deacoplate and power up.

True. 
Note: that we typically use a PIC print as a realtime device between
our vision PC, and the clients systems (PLC's and I/O signals). This because
most of the customers PLCs are old and/or have high cycle times, but came
with the machinery, so can't be replaced easily. 

If you uc only has one function, you could try to do that. But we have
multiple functions, and several might need a quite high speed IRQ.
(currently up to 50KHz), and still do other stuff. Reliability is also a
point.

Using the motorcontrol (and other on PIC hw) saves on high speed IRQ and/or
load in the uc's main loop, making those free for other, more custom
purposes.

We don't typically use the motor control to control motors, but to get
quadrature encoder input. Typically 10-25KHz, but higher values have
happened. Sometimes we have additional quadrature encoders on ordinary pins
(after exhausting the one or two hw ones)

So the main reason for using HW as much as possible is to keep the actual uc
free as much as possible for other tasks. It is not that much that you
couldn't stuff it all on a slower one manually, but more the validation
required for that if something is added, which often can only be done when
hooked up to the customers hardware etc etc.

And we only deliver one uc per machine, and the BOM lists among others
several 2000 euro cameras. So 3 or 4 euro more to go from a basic PIC24 to
the topmodel dspic doesn't really hurt. The pain is more in making the
prints and adding the components to them.

Besides (sometimes several) motorcontrols, the dspics are also faster, up to
40MHz (at least before the most recent roadmap)



More information about the fpc-devel mailing list