Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 25th June 2009, 05:44 AM   #16
Default

Well, the program's ability to select between speed and time is fixed. When it's just recording/displaying the time it's pretty accurate (given the time is less than 9.9999seconds)

The speed is still giving me some problems though.
electronicsfreak is offline  
Old 25th June 2009, 06:28 AM   #17
Default

ok, so I think I may have found a problem, but it brings up two questions I have that for some reason google and many pic-programming tutorials haven't been able to answer.

say I'm using the MOVF command in the example below

MOVF COUNT, W

after it's moved the stored number in the register to the W register, does the number in the COUNT register stay the same?


very similar to the above question say I'm using the below example to set the Z flag


MOVLW D'10'
XORWF COUNT, W

again, would the number in the count register after the XORWF command be the same as it was before the command?
electronicsfreak is offline  
Old 25th June 2009, 08:43 AM   #18
Default

In both examples the value in COUNT will be unchanged. In the second example, if you did XORWF COUNT,F then W would be unchanged as the F tells the processor to store the result in the file - COUNT.

Mike.
Pommie is online now  
Old 25th June 2009, 09:50 AM   #19
Default

awesome, that is exactly what I was counting on.

these weren't the problem, but I found two specific segments of code that were creating the problem.


one was as it added the different places of xsplace to zplace, I had it set to increment z and decrement x before it tested if the register was already set to zero--meaning that if the bit it was testing was at zero, it would ignore this, and decrement the bit to 255, throwing it way off. This has been fixed




the second was when it was adding the numbers together to reach 1. it would only test it at one moment in the code for one specific number. there was a possibility for more than one in that partictular register. This has also been fixed


and now IT WORKS (well it can measure speed and time)

I still need to make the code a bit more user friendly, but at the moment it does what it is intended to do

Thankyou guys for you help, again. Without it, I would have had to settle for a simpler code (deadline for this project is in 3 days)




a video link will follow soon in a few days.
electronicsfreak is offline  
Old 2nd November 2009, 06:12 AM   #20
Default

alright, so this wasn't up within a few days of the last post, but hey atleast I've got a video up of the thing.

YouTube - PIC CHRONO-2

Sorry about how long it took to get the link posted here. I completely forgot to post it when it was taken.
electronicsfreak is offline  
Reply

Tags
picchronograph, trouble

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Muzzle Velocity Chronograph gth629e Electronic Projects Design/Ideas/Reviews 15 22nd March 2009 11:21 PM
chronograph trouble, PIC oriented electronicsfreak Electronic Projects Design/Ideas/Reviews 8 13th February 2009 03:37 PM
chronograph freckle101 Electronic Projects Design/Ideas/Reviews 1 17th October 2008 12:54 AM
LED TROUBLE windozeuser General Electronics Chat 2 27th November 2003 05:47 PM
Arrow Chronograph Circuit bledsoam Electronic Projects Design/Ideas/Reviews 4 25th September 2002 11:48 AM



All times are GMT. The time now is 03:43 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker