I'm building a laboratory scintillation counter that uses my HP 5335a
counter as a read-out. The FREQ mode gives only approximate results
(maximum gate time is about 5 seconds). The TOT mode counts pulses for
an arbitrary time that can be set using the "external arm input" on the
rear panel. So I need a timing pulse (of either polarity) of known and
adjustable width (time). One way to do this is with a PIC frequency
divider taking the counter 10MHz output down to 1 PPS following that
with two or three ripple counters to get a 1 - 5 - 10 - 50 ...
sequence. That I understand.
How do I get a pulse to start with a push button and then stop for
example 500 or 10,000 seconds later?
The PIC can easily be programmed to be armed with a switch and stop at a
particular count, or you can use actual logic - debouncer, gating
flip-flop and programmable counter!
David N1HAC
On 11/15/16 1:57 PM, Chuck / Judy Burch wrote:
I'm building a laboratory scintillation counter that uses my HP 5335a
counter as a read-out. The FREQ mode gives only approximate results
(maximum gate time is about 5 seconds). The TOT mode counts pulses
for an arbitrary time that can be set using the "external arm input"
on the rear panel. So I need a timing pulse (of either polarity) of
known and adjustable width (time). One way to do this is with a PIC
frequency divider taking the counter 10MHz output down to 1 PPS
following that with two or three ripple counters to get a 1 - 5 - 10 -
50 ... sequence. That I understand.
How do I get a pulse to start with a push button and then stop for
example 500 or 10,000 seconds later?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
You could build a simple one shot using something like a 555 timer IC
Or take a input pin from your PiC and use the RTC to drive a routine which changes state of the pin for the duration of test
Content by Scott
Typos by Siri
On Nov 15, 2016, at 1:57 PM, Chuck / Judy Burch ciandjaburch@gmail.com wrote:
I'm building a laboratory scintillation counter that uses my HP 5335a counter as a read-out. The FREQ mode gives only approximate results (maximum gate time is about 5 seconds). The TOT mode counts pulses for an arbitrary time that can be set using the "external arm input" on the rear panel. So I need a timing pulse (of either polarity) of known and adjustable width (time). One way to do this is with a PIC frequency divider taking the counter 10MHz output down to 1 PPS following that with two or three ripple counters to get a 1 - 5 - 10 - 50 ... sequence. That I understand.
How do I get a pulse to start with a push button and then stop for example 500 or 10,000 seconds later?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
So you are already using a micro controller (a PIC) then
for the button input use an unused pin on the PIC. Connect the pin
to 5V via a 10K resister and then when you press the button it shorts
the pin to ground. The PIC then starts counting. A modern uP has
the 10K resister build into the chip.
I think your entire idea of using the PIC to divide the 10MHz
reference is non-optimal. You do not need a lower frequency
reference. All the PIC needs to do is COUNT cycles. So when the
button makes contact the PIC raises a pin (the ARM signal) and then
starts counting the 10MHz cycles. When the count reaches 100,000,000
then it takes the ARM signal down and waits for the button to be
pressed. I just made up the 100M number use whatever value gives you
the correct time interval. This is a MUCH simpler job than dividing.
Why use a large and expensive counter if you already have a micro
controller? The PIC, while it is counting the 10MHz reference could
also count the pulses from your experiment and output the count after
the time interval is reached. But maybe you need the input amplifiers
and comparator on the counter?
In short all you need is any reasonable micro controller and MOST of
the single board development systems would already have a button and
the pull up resisters. Don't bother using a bare PIC chip, it is
cheaper and faster to buy a development board that has all the small
passive parts and is connectorized with 0.1 header pins
On 11/15/16, Chuck / Judy Burch ciandjaburch@gmail.com wrote:
I'm building a laboratory scintillation counter that uses my HP 5335a
counter as a read-out. The FREQ mode gives only approximate results
(maximum gate time is about 5 seconds). The TOT mode counts pulses for
an arbitrary time that can be set using the "external arm input" on the
rear panel. So I need a timing pulse (of either polarity) of known and
adjustable width (time). One way to do this is with a PIC frequency
divider taking the counter 10MHz output down to 1 PPS following that
with two or three ripple counters to get a 1 - 5 - 10 - 50 ...
sequence. That I understand.
How do I get a pulse to start with a push button and then stop for
example 500 or 10,000 seconds later?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
--
Chris Albertson
Redondo Beach, California
If you are trying to avoid writing code, the 74hc5555 might be worth taking
a look at.
On Tue, Nov 15, 2016 at 3:00 PM Chuck / Judy Burch ciandjaburch@gmail.com
wrote:
I'm building a laboratory scintillation counter that uses my HP 5335a
counter as a read-out. The FREQ mode gives only approximate results
(maximum gate time is about 5 seconds). The TOT mode counts pulses for
an arbitrary time that can be set using the "external arm input" on the
rear panel. So I need a timing pulse (of either polarity) of known and
adjustable width (time). One way to do this is with a PIC frequency
divider taking the counter 10MHz output down to 1 PPS following that
with two or three ripple counters to get a 1 - 5 - 10 - 50 ...
sequence. That I understand.
How do I get a pulse to start with a push button and then stop for
example 500 or 10,000 seconds later?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
I'll add my 10 cents here. Because the accumulation time can be very long
555 class timers become a serious issue due to the large R&Cs involved.
I will guess some accuracy is desired.
As Chris says a start button to an arduino. The difference I might suggest
is a GPS 1sec PP into the arduino for counting. Then through a serial port
you could input what ever accumulation time you might like. Using a 64 bit
integer thats a lot of seconds that are quite accurately timed and
semi-traceable to real time for events.
Have fun.
Curious what you are counting?
Regards
Paul
WB8TSL
On Tue, Nov 15, 2016 at 7:47 PM, Scott Stobbe scott.j.stobbe@gmail.com
wrote:
If you are trying to avoid writing code, the 74hc5555 might be worth taking
a look at.
On Tue, Nov 15, 2016 at 3:00 PM Chuck / Judy Burch <ciandjaburch@gmail.com
wrote:
I'm building a laboratory scintillation counter that uses my HP 5335a
counter as a read-out. The FREQ mode gives only approximate results
(maximum gate time is about 5 seconds). The TOT mode counts pulses for
an arbitrary time that can be set using the "external arm input" on the
rear panel. So I need a timing pulse (of either polarity) of known and
adjustable width (time). One way to do this is with a PIC frequency
divider taking the counter 10MHz output down to 1 PPS following that
with two or three ripple counters to get a 1 - 5 - 10 - 50 ...
sequence. That I understand.
How do I get a pulse to start with a push button and then stop for
example 500 or 10,000 seconds later?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to
https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/
mailman/listinfo/time-nuts
and follow the instructions there.
I'm wondering why everyone seems to be assuming a PIC is the right
processor. Of course it could work for this but I'd select whatever is
the easiest to program and debug. Those tend to the they little single
board development systems that sell for under $10. They typically have USB
connections to a computer and don't require any specialized equipment to
program. The Arduino is the prime example of these although I've moved to
ARM based uP because they can be less expensive with an order of magnitude
better performance and can use the same Arduino IDE and run Arduino
sketches. The PIC is not so beginner friendly and requires some study
before it can be used. But if you as said of course a PIC could work,
this is a pretty simple application
On Tue, Nov 15, 2016 at 12:08 PM, David G. McGaw <
david.g.mcgaw@dartmouth.edu> wrote:
The PIC can easily be programmed to be armed with a switch and stop at a
particular count, or you can use actual logic - debouncer, gating flip-flop
and programmable counter!
David N1HAC
On 11/15/16 1:57 PM, Chuck / Judy Burch wrote:
I'm building a laboratory scintillation counter that uses my HP 5335a
counter as a read-out. The FREQ mode gives only approximate results
(maximum gate time is about 5 seconds). The TOT mode counts pulses for an
arbitrary time that can be set using the "external arm input" on the rear
panel. So I need a timing pulse (of either polarity) of known and
adjustable width (time). One way to do this is with a PIC frequency
divider taking the counter 10MHz output down to 1 PPS following that with
two or three ripple counters to get a 1 - 5 - 10 - 50 ... sequence. That I
understand.
How do I get a pulse to start with a push button and then stop for
example 500 or 10,000 seconds later?
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/m
ailman/listinfo/time-nuts
and follow the instructions there.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/m
ailman/listinfo/time-nuts
and follow the instructions there.
--
Chris Albertson
Redondo Beach, California
On Wed, November 16, 2016 10:17 am, Chris Albertson wrote:
I'm wondering why everyone seems to be assuming a PIC is the right
processor.
You could use AVR (arduino), but once you get to most of the ARM
processors it is harder to make them deterministic because of caches. You
want a processor where the number of clocks is constant for all or almost
all instructions, and is easy enough that you can code the loops by hand.
Code like TVB's divider probably doesn't even use interrupts, it's just a
tight loop where the number of instructions is counted to give the
behavior wanted.
--
Chris Caudle
Chris & Chris,
Yes the "TVB dividers" are instruction loops where every cycle is counted by hand, and then verified with a simulator, and then checked with a time interval counter. All the code is out there at www.leapsecond.com/pic/
I use PIC's for historical and technical reasons. Modern CPU's and MCU's have so many layers of optimization that they are no longer deterministic at the cycle level. This makes them worthless for precise time applications. In addition many of them use clock edge or PLL tricks to increase speed, but this introduces jitter. Or they enable interrupts which kills precise timing. The PIC's are old-school, fully synchronous and use only one clock edge so the jitter is down at the picosecond level. My code is isochronous and doesn't use interrupts for timing. It acts like a poor man's FPGA.
Arduino probably uses compiled code, external libraries, and interrupts so that also is a no-no for precise time. I'm not sure about bare metal AVR. I hope someone can do measurements on an AVR divider one day so we can compare PIC and AVR jitter. I worry about how AVR implements the clock. So this is an open question. But I know how PIC's work so that's what I use. BTW, these are "ancient" PIC 12F parts. It's possible modern 16- and 32-bit PIC's also go to the dark side and optimize for performance rather than picosecond determinism. Another open question.
Realize that using a MCU for a frequency divider is a weird niche use of the chip, so none of what I say applies if you plan to use any of these as a general purpose computing system.
Also, we don't know if OP is looking for microsecond, nanosecond, or picosecond precision in his timing pulses.
/tvb
Chris Albertson:
I'm wondering why everyone seems to be assuming a PIC is the right
processor. Of course it could work for this but I'd select whatever is
the easiest to program and debug. Those tend to the they little single
board development systems that sell for under $10. They typically have USB
connections to a computer and don't require any specialized equipment to
program. The Arduino is the prime example of these although I've moved to
ARM based uP because they can be less expensive with an order of magnitude
better performance and can use the same Arduino IDE and run Arduino
sketches. The PIC is not so beginner friendly and requires some study
before it can be used. But if you as said of course a PIC could work,
this is a pretty simple application
Chris Caudle:
You could use AVR (arduino), but once you get to most of the ARM
processors it is harder to make them deterministic because of caches. You
want a processor where the number of clocks is constant for all or almost
all instructions, and is easy enough that you can code the loops by hand.
Code like TVB's divider probably doesn't even use interrupts, it's just a
tight loop where the number of instructions is counted to give the
behavior wanted.
Tom:
As you were gracious to release the source code for these excellent little dividers, I would suspect someone who is somewhat fluent in assembly could just modify so it counts a specific number of pulses and then toggles a output off. The ARM could be used to restart etc. Although I think the OP wanted to know the time taken between a run of a number of cycles.
Been playing around with the PD15 to replace 2 -14 pin clock dividers and it seems to work like a charm, although I can't seem to find any information if the inputs on a 12F675 are Schmitt trigger inputs. Can't seem to find anything in the datasheet.
-=Bryan=-
From: time-nuts time-nuts-bounces@febo.com on behalf of Tom Van Baak tvb@LeapSecond.com
Sent: November 16, 2016 3:27 PM
To: Discussion of precise time and frequency measurement
Subject: Re: [time-nuts] precision timing pulse
Chris & Chris,
Yes the "TVB dividers" are instruction loops where every cycle is counted by hand, and then verified with a simulator, and then checked with a time interval counter. All the code is out there at www.leapsecond.com/pic/http://www.leapsecond.com/pic/
I use PIC's for historical and technical reasons. Modern CPU's and MCU's have so many layers of optimization that they are no longer deterministic at the cycle level. This makes them worthless for precise time applications. In addition many of them use clock edge or PLL tricks to increase speed, but this introduces jitter. Or they enable interrupts which kills precise timing. The PIC's are old-school, fully synchronous and use only one clock edge so the jitter is down at the picosecond level. My code is isochronous and doesn't use interrupts for timing. It acts like a poor man's FPGA.
Arduino probably uses compiled code, external libraries, and interrupts so that also is a no-no for precise time. I'm not sure about bare metal AVR. I hope someone can do measurements on an AVR divider one day so we can compare PIC and AVR jitter. I worry about how AVR implements the clock. So this is an open question. But I know how PIC's work so that's what I use. BTW, these are "ancient" PIC 12F parts. It's possible modern 16- and 32-bit PIC's also go to the dark side and optimize for performance rather than picosecond determinism. Another open question.
Realize that using a MCU for a frequency divider is a weird niche use of the chip, so none of what I say applies if you plan to use any of these as a general purpose computing system.
Also, we don't know if OP is looking for microsecond, nanosecond, or picosecond precision in his timing pulses.
/tvb
Chris Albertson:
I'm wondering why everyone seems to be assuming a PIC is the right
processor. Of course it could work for this but I'd select whatever is
the easiest to program and debug. Those tend to the they little single
board development systems that sell for under $10. They typically have USB
connections to a computer and don't require any specialized equipment to
program. The Arduino is the prime example of these although I've moved to
ARM based uP because they can be less expensive with an order of magnitude
better performance and can use the same Arduino IDE and run Arduino
sketches. The PIC is not so beginner friendly and requires some study
before it can be used. But if you as said of course a PIC could work,
this is a pretty simple application
Chris Caudle:
You could use AVR (arduino), but once you get to most of the ARM
processors it is harder to make them deterministic because of caches. You
want a processor where the number of clocks is constant for all or almost
all instructions, and is easy enough that you can code the loops by hand.
Code like TVB's divider probably doesn't even use interrupts, it's just a
tight loop where the number of instructions is counted to give the
behavior wanted.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
time-nuts Info Page - American Febo Enterpriseshttps://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
www.febo.com
time-nuts is a low volume, high SNR list for the discussion of precise time and frequency measurement and related topics. To see the collection of prior postings to ...
and follow the instructions there.