Go to Post Remember, if FIRST is your top priority, you need to look at your priorities. - Billfred [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 14-01-2004, 17:30
Venkatesh Venkatesh is offline
Registered User
FRC #0030
 
Join Date: Jan 2003
Rookie Year: 2002
Location: USA
Posts: 260
Venkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to behold
Fast and Slow Operations

I have been looking around at stuff for some time, and I have found many people saying different things about the Pic Microcontroller. Some people have said that division is slow w/o hardware support, some have said that floating point operations were ridiculously painful, etc.

I am looking a for a vaguely comprehensive guide as to what mathematical operations are slow and what operations are fast. Over here, we have found an excellent approximation for cosine, which uses only square roots, multiplication, and division.

If anyone has any related info, could you please post?

Thank you.
__________________
-- vs, me@acm.jhu.edu
Mentor, Team 1719, 2007
Team 30, 2002-2005
  #2   Spotlight this post!  
Unread 14-01-2004, 18:44
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Fast and Slow Operations

Looking at the data sheet for the PIC18FXX20, Multiply, Add, and Subtract (8 bit integer) should be really fast. 16 bit integer versions will be not as fast, but should still be fairly fast. And it goes downhill from there. (Because all operations other than 8 bit integer Add, Subtract, and Multiply have to be implemented in software.)
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me

Last edited by Greg Ross : 14-01-2004 at 18:47.
  #3   Spotlight this post!  
Unread 15-01-2004, 01:45
deltacoder1020's Avatar
deltacoder1020 deltacoder1020 is offline
Computer Guy
AKA: Dav
#1020 (The Indiana Prank Monkeys)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Muncie, Indiana
Posts: 340
deltacoder1020 has a spectacular aura aboutdeltacoder1020 has a spectacular aura about
Send a message via AIM to deltacoder1020
Re: Fast and Slow Operations

also, most square root algorithms tend to be fairly slow. one thing you could try is having the robot generate a lookup table (basically an array) of the sines/cosines/tangents for each angle 0-180, and then accessing that when you need it - that way you can run the slow calculations once at startup, and use direct memory-access to get the values at runtime.
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
Closed Thread


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
Slow News Week Lloyd Burns Dean Kamen's Inventions 0 19-05-2003 19:59
Bridge Question for those who have played archiver 2001 11 24-06-2002 01:44
Speed is definately going to be a factor.... archiver 2001 14 24-06-2002 00:24
How fast? archiver 2001 4 23-06-2002 23:59
Speed? WernerNYK Technical Discussion 13 10-02-2002 23:54


All times are GMT -5. The time now is 09:33.

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