N-Bit_MATH


Closed Thread
Results 1 to 39 of 39

Thread: N-Bit_MATH

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Location
    PHILADELPHIA, PA - USA
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    Thanks again,

    The N-Bit Troubleshooter program is working well now with the change you suggested.

    It's seems pretty obvious now that I am aware of it.

    So now I'll try to integrate it into my current program which is a two gate optical timer and speed calculator.

    My next challenge is figuring out how to make use the 64-bit output

    I'll post details when it's cleaned up and N-Bit math is integrated.

    Wozzy-2010
    Wozzy-2010

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Great news!

    Quote Originally Posted by WOZZY-2010 View Post
    So now I'll try to integrate it into my current program which is a two gate optical timer and speed calculator.
    OOOOO, a math problem .... can I play?

    How far apart?
    Snail races? Or, rocket powered unicycle?
    <br>
    DT

  3. #3
    Join Date
    Jan 2010
    Location
    PHILADELPHIA, PA - USA
    Posts
    34


    Did you find this post helpful? Yes | No

    Default High Resolution Timer with N-BITS Precision.

    Darrel,

    Well, Me being Me I want it to do EVERYTHING, so the distance between the gates will be an input variable.
    My light source is a beam-split 650nm (red) solid state laser that's way more powerful than it needs to be (but also a lot more fun!)
    My Optical sensors are Osram SFH 5840 PhotoTransistors with built-in Schmitt Trigger.
    The outputs are combined into a single pulse using an LS74F00 configured as an S-R Latch. (this allows me to use the same code and input pin with either one or two sensors)

    The timer code is based on DT_INSTANT_INTERRUPTS running on a PIC18F4680 @ 20 MHz

    This is all working very well as a high resolution timer, though I am still working on some corrections for software and hardware delays.

    I may consider redoing the timer portion of the software using the N-Bit Variable Math, as I'm currently limited to about 1.5 Minutes.

    I needed the N-Bit Math to get the resolution I want when converting from Time to Speed, as I end up dividing two large numbers.

    My immediate goals are...
    How fast are Pinewood Derby Cars?
    How fast is my dog? (Very Fast!)
    How fast am I? (Very Slow)
    How fast can I back-slap someone? (approx. 29.97235 MPH)-DONE!
    What is the muzzle velocity of my air rifle with different pellets?
    How fast does that Jerk down the street drive past my house while kids are outside playing?
    ...

    I only have time to work on this late at night.
    I'll work on cleaning the code up a little before I lay it out for all to see.

    So far this has been a really fun and educational project.
    My youngest daughter (11yo) is learning with me, she seems very interested in what I'm doing. So I try and explain it to her as I go.

    Again thanks to you and the others on the Forum that are so willing to share your knowledge to help others learn.
    Wozzy-2010

  4. #4
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    A story:

    A young man was traveling from Georgia to Florida on a quick weekend trip to see someone. He drives Very fast on the way south. On the return trip, he decides to slow down a bit. While traveling across a bridge, he notices a officer of the law below on a perpendicular highway. He thinks "Ha!, someone is going to get a ticket on that other road!". Within a few minutes, he was visited by that same officer. When the traveler asked why the visit and personal attention, the officer explained that he was going 78 in a 55 and wanted it known just how wrong that was. When asked how he was able to measure the speed, he explained that the bridge was 1308 feet long and that it took 11.47 seconds to cross it. His LASCAR device helped him do the calculations.
    -Input distance before hand
    -trigger on entry
    -trigger on exit
    -run VISA card of foolish young man

    Bo
    Last edited by boroko; - 27th January 2010 at 22:48. Reason: correct

  5. #5
    Join Date
    Jan 2010
    Location
    PHILADELPHIA, PA - USA
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by boroko View Post
    -run VISA card of foolish young man
    Hmmmmm I hadn't thought about adding a credit card reader....
    Wozzy-2010

  6. #6
    Join Date
    Jan 2010
    Location
    PHILADELPHIA, PA - USA
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Hi Darrel,

    I finally got around top finishing up the Timer using the N-Bit MATH
    I posted it in this thread:
    http://www.picbasic.co.uk/forum/showthread.php?t=12634

    I think it's really cool...It uses 64 Bit Math throughout and can run 99 minutes with 200 nS resolution.

    Thanks for the help

    --Bob
    Last edited by WOZZY-2010; - 7th February 2010 at 06:12.
    Wozzy-2010

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Nice job Bob!
    And nice work on the posts too.

    I got lost in the math somewhere between ...

    How fast am I? (Very Slow)
    &nbsp; &nbsp; -- AND --
    What is the muzzle velocity of my air rifle with different pellets?

    Good thing you didn't need the help.

    Thanks for the N-Bit Math workout too!
    That really helps.

    Cheers,
    DT

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts