This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions,
flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.
Hello,
I'm working on a project based on an RCM4100 running at 60 MHz. It has
three PIDs: each one has a setpoint, an analog input as feedback and
all of them output to an array. This one will update an external
8-channel DAC.
I have no problem to implement such a PID but I'm wondering what is
the best way to call the input, process and output functions in the
Rabbit world.
My goal is to update the three PID every 50 ms (or less, if possible).
In detail I have to do:
1) acquire all analog signals with the on-board ADC (8 ch)
2) process the PIDs calculations
3) update the SPI DAC
You know, a digital algorithm like a PID needs an accurate clock to
work well. So I bet I need a timer interrupt to do all the staff.
Better, in the ISR I'll acquire the signals and update the DAC while
the PID update is not time critical.
What timer should I use? Is there any example to see how to generate
an interrupt at this low frequency?
Thanks in advance
Marco / iw2nzm
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )
In my experience, I think that you don't need to be so acuarate in a
PID algoritm. Obtain 50 ms can be done with a costate inside a loop
with low time in complete a cycle (say 1 or 2 ms, in function of your
requested precision).
--- In r...@yahoogroups.com, "Marco Trapanese"
wrote:
>
> Hello,
>
> I'm working on a project based on an RCM4100 running at 60 MHz. It has
> three PIDs: each one has a setpoint, an analog input as feedback and
> all of them output to an array. This one will update an external
> 8-channel DAC.
>
> I have no problem to implement such a PID but I'm wondering what is
> the best way to call the input, process and output functions in the
> Rabbit world.
>
> My goal is to update the three PID every 50 ms (or less, if possible).
> In detail I have to do:
>
> 1) acquire all analog signals with the on-board ADC (8 ch)
> 2) process the PIDs calculations
> 3) update the SPI DAC
>
> You know, a digital algorithm like a PID needs an accurate clock to
> work well. So I bet I need a timer interrupt to do all the staff.
> Better, in the ISR I'll acquire the signals and update the DAC while
> the PID update is not time critical.
>
> What timer should I use? Is there any example to see how to generate
> an interrupt at this low frequency?
>
> Thanks in advance
> Marco / iw2nzm
>
------------------------------------

(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )