<alessandro.cofanelli@...> wrote:
>
> I've downloaded and read the whole manual.
> My troubles are?
>
> Can the 4 com ports be all used at the same moment?
> Is the micro fast enought to calculate 4 different PIDs (for 4
> motors) with a max delay of 10 milliseconds?
>
> What my application have to do is:
>
> read the analog value of input 1
> Calculate the pid
> Send the correcting value by com1
>
> read the analog value of input2
> Calculate the pid
> Send the correcting value by com1
>
> read the analog value of input3
> Calculate the pid
> Send the correcting value by com2
>
> read the analog value of input4
> Calculate the pid
> Send the correcting value by com2
>
> All the 4 tasks have to be completed in a total time interval of 10
> Milliseconds.
>
So, you only need 2 com ports? If so, either the ATmega128 or LPC2148
can do the job - easily. But, you have to write the code in C. There
are ATmega devices with 4 com ports but development boards may be hard
to come by.
If you need floating point, on either processor, things will slow down
(relative to integer math). If that is the case, start with the
LPC2148. It is blazing fast.
OTOH, there is a balancing 'bot project around that uses FreeRTOS (a
full Real Time Operating System) with kalman filtering and analog
inputs from an accelerometer and gyro that runs a ton of floating
point (including 2 PID loops) at a 5 mS tick rate to ultimately drive
a couple of PWM outputs to DC motors. This on an ATmega128. I have
never checked to see how much idle time is available but the menu task
seems quite responsive and it runs at a lower priority than the
balancing task.
Richard
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment