View Single Post
Old 06-04-2009, 02:17 AM   #1532 (permalink)
needs more cowbell
dcb's Avatar
Join Date: Feb 2008
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 267 Times in 210 Posts
Sweet, glad it looks like it works

I envisioned the main loop getting a bit longer eventually, like when you add uart or other user interface fun. And it would only get run as necessary if convert is called in the main loop (still takes cpu time if in the isr).

So it means you wouldn't have to think about the isr timing as much and the main loop timing would be more predictable. But it has to stay short enough that the time between pwm changes is not a hinderance to driveability. Is 30hz smooth enough? Can you do everything you want in the main loop in 0.033 seconds?
  Reply With Quote