Go to Post At this time of the season, there is only one response: BAAAAAAAAA-humbug! - dlavery [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 29-01-2004, 17:54
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Timing Codes

Does anyone know where to find the timing codes for the PIC?
  #2   Spotlight this post!  
Unread 29-01-2004, 17:56
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Timing Codes

How so? you can have one of the timer interupts increment a variable, or count iterations throught the main loop.
  #3   Spotlight this post!  
Unread 29-01-2004, 18:02
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: Timing Codes

Well I'm not looking to see how fast an algorithm would run. I'm looking to see how many cycles different instructions would take. Like an opcode reference.
  #4   Spotlight this post!  
Unread 29-01-2004, 18:22
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Timing Codes

I'm not sure I understand entirely, but by the sound of it, I'd suggest using a timer interupt.
  #5   Spotlight this post!  
Unread 29-01-2004, 18:47
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Timing Codes

Well there are 2 ways to do this.
1.) View the disassmebly code output from the compiler and trace the program flow.
2.)Set up a timer that rums in the background and times different operations.
Btw.. although the processor is 40mhz, one operation takes 4 clock cycles. Hence 10mips.
__________________
1139 Alumni
  #6   Spotlight this post!  
Unread 29-01-2004, 20:53
SeanCassidy's Avatar
SeanCassidy SeanCassidy is offline
Antiregistered User
#0263 (Aftershock)
Team Role: Programmer
 
Join Date: Oct 2003
Location: Holtsville, NY
Posts: 37
SeanCassidy is an unknown quantity at this point
Re: Timing Codes

This helped me a lot, it allows you two write two different but very acurate timers.

http://www.innovationfirst.com/FIRST...004-Jan-14.pdf
  #7   Spotlight this post!  
Unread 29-01-2004, 21:02
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: Timing Codes

Not quite what I was looking for. There are some x86 opcode references that have an estimate for the number of cycles it takes to execute an instruction (This would be dependant on the maker of your cpu). I was wondering if anyone has seen something like this for the PIC18F8520?
  #8   Spotlight this post!  
Unread 29-01-2004, 21:04
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Timing Codes

Quote:
Originally Posted by Ryan Cumings
Not quite what I was looking for. There are some x86 opcode references that have an estimate for the number of cycles it takes to execute an instruction (This would be dependant on the maker of your cpu). I was wondering if anyone has seen something like this for the PIC18F8520?
they all take 4 cycles except i think retfie(i think i'ts retfie. you better double check this). See the datasheet.
__________________
1139 Alumni

Last edited by Rickertsen2 : 29-01-2004 at 21:08.
  #9   Spotlight this post!  
Unread 29-01-2004, 21:33
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: Timing Codes

It's not for the same model of PIC, but here is one document that lists the cycle times for various instructions - many of them may be the same (there's other stuff in the file too, scroll down):
http://www.microchip.com/download/li...och/40170b.pdf
__________________
Team 1020, the Indiana Prank Monkeys (www.team1020.org)
  #10   Spotlight this post!  
Unread 29-01-2004, 21:43
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: Timing Codes

Quote:
Originally Posted by deltacoder1020
It's not for the same model of PIC, but here is one document that lists the cycle times for various instructions - many of them may be the same (there's other stuff in the file too, scroll down):
http://www.microchip.com/download/li...och/40170b.pdf
the cycles listed there should be the same. the 18x series has some additional instructions though. What they call 1 cycle refers to 1 instruction cycle not one clock cycle.
__________________
1139 Alumni
  #11   Spotlight this post!  
Unread 29-01-2004, 21:44
Ryan Cumings's Avatar
Ryan Cumings Ryan Cumings is offline
Programmer and University Rejected
#0134 (Team Discovery)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2000
Location: Pembroke, NH
Posts: 65
Ryan Cumings is an unknown quantity at this point
Send a message via AIM to Ryan Cumings
Re: Timing Codes

Thank you deltacoder, this was exactly what I was looking for (or pretty close). Finally tommorow I'll be off academic probation and back doing my passion =D
  #12   Spotlight this post!  
Unread 29-01-2004, 22:26
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: Timing Codes

amazing what Google can find good luck on your programming - we just finished our drive base today, so now I get to start having some fun. (My team leader would probably shudder if he heard me saying that.)
__________________
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
Alt codes in Forums? Elgin Clock CD Forum Support 2 27-09-2003 00:45
Swapping codes miketwalker Programming 8 22-02-2003 15:26
what is or isn't a timing belt? archiver 2001 6 23-06-2002 23:26
two sided timing belt archiver 2001 3 23-06-2002 22:34
Dual Sided Timing Belts Lachuck894 Technical Discussion 9 14-01-2002 10:10


All times are GMT -5. The time now is 08:00.

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