Thanks Darrel
Ouch....My head is sore from banging it on the workbench.
I'll try this out tonight and let you know.
I knew it must be something simple I was missing.
Wozzy
Wozzy-2010
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
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
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
Bookmarks