Go to Post I'm not worried about the amount of Segways at a regoinal, I'd rather see them out in the real world than at a robotics competition. - Joe Matt [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Spotlight this post!  
Unread 26-11-2007, 15:17
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: in case of EMERGENCY, is a loop of NOPs an option?

Quote:
Originally Posted by JesseK View Post
You can't do for loops on the current controller iirc, but I programmed very little of it in the last 2 years.

nOPs are good enough in a jam, but you design the bot, sensors and programming other way -- the way that DOESN'T use timers/nops to get to where you want. nOPs usually lack consistency in mechanical control.
Easy partner... hardware timers are ONE OF THE best and most accurate ways of timing when code executes, or upon what interval. A must for true, high performance PID/LeadLie/StateSpace loops.

Uhm... but I'd still like to know... why do you want to make a for loop of nops?

One of the only times I've used one of these for FIRST is in my single-pin Parallax ultrasonic driver (posted here) to generate the keying pulse to trigger the ping, since it was a very short (just a few microseconds) pulse time, and would have been inefficient to set a timer and come back just to time such a short pulse. Actually, the amoount of time it takes to enter/exit an interrupt would have been longer than the duration of the pulse, so, the best option in that case was to create a for loop. It's important to note that nops are not needed in the for loop to make a spinlock/busy wait. only:

Code:
for(unsigned char delaycounts = 0; delaycounts < 10; delaycounts++);
But yeah i'm still wondering about what the long for loop has to do with making a motor not 'skip'... and how you make a motor 'skip'...

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Segway to offer financing option Jon K. Dean Kamen's Inventions 5 02-06-2006 12:13
Show Avatar option broken devicenull CD Forum Support 0 12-02-2006 23:17
Check All option on Recent Activity Configuration sanddrag CD Forum Support 0 29-01-2006 22:35
The 'nuclear option' has been averted JoeXIII'007 Chit-Chat 19 24-05-2005 20:28
The Chat Option Ragin_Kage Chit-Chat 2 04-03-2002 01:19


All times are GMT -5. The time now is 19:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi