View Single Post
  #12   Spotlight this post!  
Unread 12-02-2014, 13:30
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: 100% CPU Utilization Using 10ms Periodic Task

Quote:
Originally Posted by Joe Ross View Post
I would expect that I2C could be less efficient then DIO. You were also doing your test in java and with lots of additional calculations, right?
Understood that DIO is much faster and yes we are using Java. Rough calculations show ~1ms to read the sensors, so that is significant, but should not be a show stopper.
Lots of calculations is a relative term, we are doing the heavy lifting (atan) in the teleop routine and as little as possible in the PID routine. If I were coding it, it could be even faster, but we try to stay within the capabilities of the students. 15ms should be fine for a drive train PID (WPI uses 50ms). Most of our sensors have programmable on chip filtering which we set to <50Hz bandwidth to minimize aliasing.
Reply With Quote