Dividing a 32768 Hz crystal frequency...

On Tuesday, June 27, 2023 at 11:41:01 AM UTC-4, Jan Panteltje wrote:
On a sunny day (Tue, 27 Jun 2023 05:55:52 -0700 (PDT)) it happened Ricky
gnuarm.del...@gmail.com> wrote in
faefd626-0e9d-4ed4...@googlegroups.com>:
On Tuesday, June 27, 2023 at 6:00:27 AM UTC-4, Jan Panteltje wrote:
On a sunny day (Mon, 26 Jun 2023 23:20:14 -0700 (PDT)) it happened Ricky=

gnuarm.del...@gmail.com> wrote in
c49794d7-262f-4006...@googlegroups.com>:
On Tuesday, June 27, 2023 at 1:38:44 AM UTC-4, Jan Panteltje wro=
te:
On a sunny day (Tue, 27 Jun 2023 01:20:59 -0000 (UTC)) it happened Mik> >e M=
onett
VE3BTI <spa...@not.com> wrote in <XnsB02FD9304A...@135.181.20.170>:
John Woodgate <jmw2...@gmail.com> wrote:

I want to divide a 32768 Hz crystal frequency by 20 to get a stable
frequency for a component bridge. I could use a 4017 and half a a 4=
013=

(sorry about these ancient devices, but they are still good for som=
e=

things), but I would have to add something to make the crystal osci=
lla=
te
unless there is a way to use the other half of the 4013 to make the=

oscillator.

I also looked at using just a 4096, which gives me the oscillator, =
but=
I
can\'t see how to make it divide by 20. I know there is a technique =
tha=
t
combines some of the output signals via an EXOR to achieve divisors=
th=
at
are not powers of 2, but I can\'t find information on which signals =
to=

combine.

Tom Van Baak, moderator of the Time-Nuts group, posted an article yea=
rs =
sgo
on using a PIC to count down from 2 to 255. It had very low jitter.. H> >e=

measured the jitter in the picosecond range.

The device he used was extremely cheap, and is not the same as the PI=
C=

microcrollers, which could never give picosecond timimg. I believe it> > ha=
d
only 4 pins.

I emailed him and asked for more information.

I will post when he replies.
Here is a Microchip PIC frequency counter:
https://panteltje.nl/panteltje/pic/freq_pic/
coded by somebody else, just modified it for RS232 output as I had no > >suitable LCD,
and put it in a RS232 connector housing.
Modify it for any output? just use a preloaded downcounter?

I believe I would add some input protection. Is that not a problem for y> >ou=
?

Well, 100 pF does not form a low impedance for slow things like mains.
PIC datasheet specifies a clamp-current for the input pins;
Clamp current, IK (VPIN < 0 or VPIN > VDD) ± 20 mA
So now you can calculate how much and how fast an input voltage change yo> >u need with 100 pF for destruction.
Ask Martin?
Its still working AFAIK after so many years.
But I do not work with pico seconds rise time kilovolts.
Mostly use higher frequencies and spectrum analyzers based on RTL_SDR sti> >cks, accuracy 1ppm and more info:
http://panteltje.nl/pub/spectrum_analyzer_IX_IMG_0699.JPG
http://panteltje.nl/pub/radar10_135000000_versus_1374576000_MHz.mpeg

You can make it as complicated and precise as you want:
https://panteltje.nl/pub/FPGA_board_with_25MHz_VCXO_locked_to_rubidium_10=
MHz_reference_IMG_3724.GIF
https://panteltje.nl/pub/GPS_L1_locked_to_rubidium_reference_test_setup_I> >MG_3733.GIF
was that not from my artificial GPS sattelite Mr Bond?

Does this help?

What\'s the rise time of touching some voltage rail? I don\'t see even a re=
sistor, to allow the capacitor to form an RC circuit, so I suppose this is =
depending on the parasitic diodes to prevent damage. That\'s my point. The=
re\'s nothing to limit the current through the diodes, including your nonsen> >se about kilovolt, ps rise time signals.
You suck, show somehing YOU designed that actually works or publish the code.
You do not even understand basic equipment
Not a microwave and not a current path.

Babbler
Same as Don Y
Try to read.

You are strange. This is what happens when you don\'t understand what is being discussed. Sorry about that. At least, you are entertaining.

--

Rick C.

--- Get 1,000 miles of free Supercharging
--- Tesla referral code - https://ts.la/richard11209
 
On Wednesday, June 28, 2023 at 12:35:50 AM UTC-4, Sylvia Else wrote:
On 27-June-23 12:20 am, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.
Many years ago, I ANDed a bunch of outputs from counter stages, and fed
the result into the reset, to achieve division by some arbitrary
integer. I was electronically naive [*] at the time, and what I did may
have relied on the propagation delays to work properly. The application
would not have been sensitive to the occasional glitch.

Or perhaps I was lucky enough to have bought a counter with a
synchronous reset. Either way, it worked.

I prefer to use a loadable counter, triggered by the carry out. Then there\'s no change to the logic when changing the divisor, just a change to the value loaded.

--

Rick C.

--+ Get 1,000 miles of free Supercharging
--+ Tesla referral code - https://ts.la/richard11209
 
On Wednesday, June 28, 2023 at 3:55:17 AM UTC-4, whit3rd wrote:
On Tuesday, June 27, 2023 at 11:28:46 PM UTC-7, John Larkin wrote:
On Wed, 28 Jun 2023 14:35:42 +1000, Sylvia Else <syl...@email.invalid
wrote:

Many years ago, I ANDed a bunch of outputs from counter stages, and fed
the result into the reset, to achieve division by some arbitrary
integer. I was electronically naive [*] at the time, and what I did may
have relied on the propagation delays to work properly. The application
would not have been sensitive to the occasional glitch.

Or perhaps I was lucky enough to have bought a counter with a
synchronous reset. Either way, it worked.

Sylvia

[*] OK, OK, you got me; even more electronically naive than now.
Actually, I think that it always works, sync or async.
Not necessarily: async reset can be fooled by the transient between-states
values of a slow slewing or ripple-delayed clocked event. Using the gate
output AT the main clock time should take you from N to zero, as long
as gate and slew delays aren\'t bigger than a clock period.

If you examine the timing of a ripple carry counter, the intermediate counts will always be less than the next count. It\'s because the clock input is falling edge triggered and the output has to be delayed from the clock input to each FF, so no false triggers on the upward counts.
If the current count is 3, on the next input clock edge the count progression will be, 3 > 2 > 0 > 4.

--

Rick C.

-+- Get 1,000 miles of free Supercharging
-+- Tesla referral code - https://ts.la/richard11209
 
On a sunny day (Wed, 28 Jun 2023 01:07:01 -0700 (PDT)) it happened Ricky
<gnuarm.deletethisbit@gmail.com> wrote in
<4e44f0bb-b68e-4c0f-b7f4-34f58ae5a3dan@googlegroups.com>:

On Tuesday, June 27, 2023 at 11:41:01 AM UTC-4, Jan Panteltje wrote=
:
On a sunny day (Tue, 27 Jun 2023 05:55:52 -0700 (PDT)) it happened Ricky=

gnuarm.del...@gmail.com> wrote in
faefd626-0e9d-4ed4...@googlegroups.com>:
On Tuesday, June 27, 2023 at 6:00:27 AM UTC-4, Jan Panteltje wro=
te:
On a sunny day (Mon, 26 Jun 2023 23:20:14 -0700 (PDT)) it happened Ric=
ky=

gnuarm.del...@gmail.com> wrote in
c49794d7-262f-4006...@googlegroups.com>:
On Tuesday, June 27, 2023 at 1:38:44 AM UTC-4, Jan Panteltje =
wro=
te:
On a sunny day (Tue, 27 Jun 2023 01:20:59 -0000 (UTC)) it happened =
Mik=
e M=
onett
VE3BTI <spa...@not.com> wrote in <XnsB02FD9304A...@135.181.20.170>:=

John Woodgate <jmw2...@gmail.com> wrote:

I want to divide a 32768 Hz crystal frequency by 20 to get a sta=
ble
frequency for a component bridge. I could use a 4017 and half a =
a 4=
013=

(sorry about these ancient devices, but they are still good for =
som=
e=

things), but I would have to add something to make the crystal o=
sci=
lla=
te
unless there is a way to use the other half of the 4013 to make =
the=

oscillator.

I also looked at using just a 4096, which gives me the oscillato=
r, =
but=
I
can\'t see how to make it divide by 20. I know there is a techniq=
ue =
tha=
t
combines some of the output signals via an EXOR to achieve divis=
ors=
th=
at
are not powers of 2, but I can\'t find information on which signa=
ls =
to=

combine.

Tom Van Baak, moderator of the Time-Nuts group, posted an article =
yea=
rs =
sgo
on using a PIC to count down from 2 to 255. It had very low jitter=
. H=
e=

measured the jitter in the picosecond range.

The device he used was extremely cheap, and is not the same as the=
PI=
C=

microcrollers, which could never give picosecond timimg. I believe=
it=
ha=
d
only 4 pins.

I emailed him and asked for more information.

I will post when he replies.
Here is a Microchip PIC frequency counter:
https://panteltje.nl/panteltje/pic/freq_pic/
coded by somebody else, just modified it for RS232 output as I had =
no =
suitable LCD,
and put it in a RS232 connector housing.
Modify it for any output? just use a preloaded downcounter?

I believe I would add some input protection. Is that not a problem fo=
r y=
ou=
?

Well, 100 pF does not form a low impedance for slow things like mains.=

PIC datasheet specifies a clamp-current for the input pins;
Clamp current, IK (VPIN < 0 or VPIN > VDD) ± 20 mA
So now you can calculate how much and how fast an input voltage change=
yo=
u need with 100 pF for destruction.
Ask Martin?
Its still working AFAIK after so many years.
But I do not work with pico seconds rise time kilovolts.
Mostly use higher frequencies and spectrum analyzers based on RTL_SDR =
sti=
cks, accuracy 1ppm and more info:
http://panteltje.nl/pub/spectrum_analyzer_IX_IMG_0699.JPG
http://panteltje.nl/pub/radar10_135000000_versus_1374576000_MHz.mpeg=


You can make it as complicated and precise as you want:
https://panteltje.nl/pub/FPGA_board_with_25MHz_VCXO_locked_to_rubidium=
_10=
MHz_reference_IMG_3724.GIF
https://panteltje.nl/pub/GPS_L1_locked_to_rubidium_reference_test_setu=
p_I=
MG_3733.GIF
was that not from my artificial GPS sattelite Mr Bond?

Does this help?

What\'s the rise time of touching some voltage rail? I don\'t see even a r=
e=
sistor, to allow the capacitor to form an RC circuit, so I suppose this =
is =
depending on the parasitic diodes to prevent damage. That\'s my point. Th=
e=
re\'s nothing to limit the current through the diodes, including your non=
sen=
se about kilovolt, ps rise time signals.
You suck, show somehing YOU designed that actually works or publish the c=
ode.
You do not even understand basic equipment
Not a microwave and not a current path.

Babbler
Same as Don Y
Try to read.

You are strange. This is what happens when you don\'t understand what is be=
ing discussed. Sorry about that. At least, you are entertaining.

So, lemme try to enlighten you why I wrote that
Have you ever used an oscilloscope?
Did it blow up with the probe on 1:1, and not even a capacitor in series?

Only time I killed my scope was when I accidently touched a booster diode (tube) in a TV and a spark bridge happened.
Normally, as you can see in the pictures I provided, you first connect the ground terminal of the frequency counter in this case
before you use it to measure anything, same for scopes (old TV chassis was live mains) etc.
I got a new IC for the scope, only channel one had died, was in the eighties and scope still working fine today.
I have a lot of HV stuff here, 25 kV and even 100 kV
So babble about things blowing up makes no sense, lots of transistors, lots of RF with hundreds of watts here too.

That all said I just added a voice to my low battery alarm app I wrote for the laptop just now.
So no mysterious beeps...
Now you could learn something, coding, design, if you ever did then publish it here.
Your babble alone does not do it.
Neither does your tesla crap signature.
An other one hit some steady vehicle while it was on auto-pilot, was in the news this morning.
--- Tesla referral code - https://ts.la.la/richard911
 
On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
 
On Wed, 28 Jun 2023 00:55:11 -0700 (PDT), whit3rd <whit3rd@gmail.com>
wrote:

On Tuesday, June 27, 2023 at 11:28:46?PM UTC-7, John Larkin wrote:
On Wed, 28 Jun 2023 14:35:42 +1000, Sylvia Else <syl...@email.invalid
wrote:

Many years ago, I ANDed a bunch of outputs from counter stages, and fed
the result into the reset, to achieve division by some arbitrary
integer. I was electronically naive [*] at the time, and what I did may
have relied on the propagation delays to work properly. The application
would not have been sensitive to the occasional glitch.

Or perhaps I was lucky enough to have bought a counter with a
synchronous reset. Either way, it worked.

Sylvia

[*] OK, OK, you got me; even more electronically naive than now.
Actually, I think that it always works, sync or async.

Not necessarily: async reset can be fooled by the transient between-states
values of a slow slewing or ripple-delayed clocked event. Using the gate
output AT the main clock time should take you from N to zero, as long
as gate and slew delays aren\'t bigger than a clock period.

In the ripple counter case, I recall that the terminal count
transition is the first possible output of the AND gate, so it\'s safe
to drive an async clear. If you decode state N, it divides by N.
 
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
<klauskvik@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.

Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.
 
On Thursday, June 29, 2023 at 12:30:05 AM UTC+10, John Larkin wrote:
On Wed, 28 Jun 2023 00:55:11 -0700 (PDT), whit3rd <whi...@gmail.com
wrote:
On Tuesday, June 27, 2023 at 11:28:46?PM UTC-7, John Larkin wrote:
On Wed, 28 Jun 2023 14:35:42 +1000, Sylvia Else <syl...@email.invalid
wrote:

Many years ago, I ANDed a bunch of outputs from counter stages, and fed
the result into the reset, to achieve division by some arbitrary
integer. I was electronically naive [*] at the time, and what I did may
have relied on the propagation delays to work properly. The application
would not have been sensitive to the occasional glitch.

Or perhaps I was lucky enough to have bought a counter with a
synchronous reset. Either way, it worked.

Sylvia

[*] OK, OK, you got me; even more electronically naive than now.
Actually, I think that it always works, sync or async.

Not necessarily: async reset can be fooled by the transient between-states
values of a slow slewing or ripple-delayed clocked event. Using the gate
output AT the main clock time should take you from N to zero, as long
as gate and slew delays aren\'t bigger than a clock period.

In the ripple counter case, I recall that the terminal count
transition is the first possible output of the AND gate, so it\'s safe
to drive an async clear. If you decode state N, it divides by N.

It the counter is long enough and slow enough you may never get something that looks like \"state N\" on the outputs of a ripple counter - the low order bits have got past \"state N\" before the high order bits have got to it.

--
Bill Sloman, Sydney
 
On Thursday, June 29, 2023 at 12:40:32 AM UTC+10, John Larkin wrote:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine..

A STM32 micro, so you can program whatever frequency you want to pass on..
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

If it was that easy, Analog Devices wouldn\'t be selling their DDS chips any more.

https://www.analog.com/media/en/technical-documentation/data-sheets/AD9837.PDF

sells for $2.12.

--
Bill Sloman, Sydney
 
On Wednesday, June 28, 2023 at 7:35:51 AM UTC-4, Jan Panteltje wrote:
On a sunny day (Wed, 28 Jun 2023 01:07:01 -0700 (PDT)) it happened Ricky
gnuarm.del...@gmail.com> wrote in
4e44f0bb-b68e-4c0f...@googlegroups.com>:

On Tuesday, June 27, 2023 at 11:41:01 AM UTC-4, Jan Panteltje wrote=
:
On a sunny day (Tue, 27 Jun 2023 05:55:52 -0700 (PDT)) it happened Ricky=

gnuarm.del...@gmail.com> wrote in
faefd626-0e9d-4ed4...@googlegroups.com>:
On Tuesday, June 27, 2023 at 6:00:27 AM UTC-4, Jan Panteltje wro=
te:
On a sunny day (Mon, 26 Jun 2023 23:20:14 -0700 (PDT)) it happened Ric> >ky=

gnuarm.del...@gmail.com> wrote in
c49794d7-262f-4006...@googlegroups.com>:
On Tuesday, June 27, 2023 at 1:38:44 AM UTC-4, Jan Panteltje =
wro=
te:
On a sunny day (Tue, 27 Jun 2023 01:20:59 -0000 (UTC)) it happened =
Mik=
e M=
onett
VE3BTI <spa...@not.com> wrote in <XnsB02FD9304A...@135.181.20.170>:=

John Woodgate <jmw2...@gmail.com> wrote:

I want to divide a 32768 Hz crystal frequency by 20 to get a sta=
ble
frequency for a component bridge. I could use a 4017 and half a =
a 4=
013=

(sorry about these ancient devices, but they are still good for =
som=
e=

things), but I would have to add something to make the crystal o=
sci=
lla=
te
unless there is a way to use the other half of the 4013 to make =
the=

oscillator.

I also looked at using just a 4096, which gives me the oscillato=
r, =
but=
I
can\'t see how to make it divide by 20. I know there is a techniq=
ue =
tha=
t
combines some of the output signals via an EXOR to achieve divis=
ors=
th=
at
are not powers of 2, but I can\'t find information on which signa=
ls =
to=

combine.

Tom Van Baak, moderator of the Time-Nuts group, posted an article =
yea=
rs =
sgo
on using a PIC to count down from 2 to 255. It had very low jitter> >. H=
e=

measured the jitter in the picosecond range.

The device he used was extremely cheap, and is not the same as the=
PI=
C=

microcrollers, which could never give picosecond timimg. I believe> > it=
ha=
d
only 4 pins.

I emailed him and asked for more information.

I will post when he replies.
Here is a Microchip PIC frequency counter:
https://panteltje.nl/panteltje/pic/freq_pic/
coded by somebody else, just modified it for RS232 output as I had > >no =
suitable LCD,
and put it in a RS232 connector housing.
Modify it for any output? just use a preloaded downcounter?

I believe I would add some input protection. Is that not a problem fo=
r y=
ou=
?

Well, 100 pF does not form a low impedance for slow things like mains.
PIC datasheet specifies a clamp-current for the input pins;
Clamp current, IK (VPIN < 0 or VPIN > VDD) ± 20 mA
So now you can calculate how much and how fast an input voltage change> > yo=
u need with 100 pF for destruction.
Ask Martin?
Its still working AFAIK after so many years.
But I do not work with pico seconds rise time kilovolts.
Mostly use higher frequencies and spectrum analyzers based on RTL_SDR > >sti=
cks, accuracy 1ppm and more info:
http://panteltje.nl/pub/spectrum_analyzer_IX_IMG_0699.JPG
http://panteltje.nl/pub/radar10_135000000_versus_1374576000_MHz.mpeg

You can make it as complicated and precise as you want:
https://panteltje.nl/pub/FPGA_board_with_25MHz_VCXO_locked_to_rubidium=
_10=
MHz_reference_IMG_3724.GIF
https://panteltje.nl/pub/GPS_L1_locked_to_rubidium_reference_test_setu> >p_I=
MG_3733.GIF
was that not from my artificial GPS sattelite Mr Bond?

Does this help?

What\'s the rise time of touching some voltage rail? I don\'t see even a r=
e=
sistor, to allow the capacitor to form an RC circuit, so I suppose this =
is =
depending on the parasitic diodes to prevent damage. That\'s my point. Th=
e=
re\'s nothing to limit the current through the diodes, including your non> >sen=
se about kilovolt, ps rise time signals.
You suck, show somehing YOU designed that actually works or publish the c> >ode.
You do not even understand basic equipment
Not a microwave and not a current path.

Babbler
Same as Don Y
Try to read.

You are strange. This is what happens when you don\'t understand what is be> >ing discussed. Sorry about that. At least, you are entertaining.
So, lemme try to enlighten you why I wrote that
Have you ever used an oscilloscope?

Yes, I\'ve used oscilloscopes.


> Did it blow up with the probe on 1:1, and not even a capacitor in series?

I\'ve never used an oscilloscope with a 5V logic IC as the front end.


Only time I killed my scope was when I accidently touched a booster diode (tube) in a TV and a spark bridge happened.
Normally, as you can see in the pictures I provided, you first connect the ground terminal of the frequency counter in this case
before you use it to measure anything, same for scopes (old TV chassis was live mains) etc.
I got a new IC for the scope, only channel one had died, was in the eighties and scope still working fine today.
I have a lot of HV stuff here, 25 kV and even 100 kV
So babble about things blowing up makes no sense, lots of transistors, lots of RF with hundreds of watts here too.

Yes, I often think your posts are babbling. You frequently have trouble laying out a linear train of thought, with clear connections between them, such as above. This is not uncommon, even with, otherwise, well educated people. They have a set of information in their heads, so the ramblings make sense to them, but forget to include all the details that someone else might not know.


That all said I just added a voice to my low battery alarm app I wrote for the laptop just now.
So no mysterious beeps...
Now you could learn something, coding, design, if you ever did then publish it here.

I have published some of my work here. I don\'t recall you made any comments on it. However, my work is done for hire, and often I can not publish it..


> Your babble alone does not do it.

Nor does your babbling do \"it\", what ever \"it\" is.


> Neither does your tesla crap signature.

LOL I find it amusing when people complain about my signature. It\'s short and to the point. I think people are offended by it because of their politics. Your politics are of a mad man, with tons of extreme viewpoints, and no supporting evidence.


> An other one hit some steady vehicle while it was on auto-pilot, was in the news this morning.

....just as all cars hit other vehicles, even when driven by other people. The collected data shows Teslas on autopilot are safer than other cars driven by people. However, there is a flaw in drawing conclusions from this data. If you want to discuss this, I think we should use a separate thread, and not pollute this one.

--

Rick C.

-++ Get 1,000 miles of free Supercharging
-++ Tesla referral code - https://ts.la/richard11209
 
On Wednesday, June 28, 2023 at 10:40:32 AM UTC-4, John Larkin wrote:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine..

A STM32 micro, so you can program whatever frequency you want to pass on..
Software DDS is fun too.

To make it work well, the code needs to be designed to minimize the jitter from interrupt source to triggering the DAC. I put the write as the first thing in the interrupt routine, then calculate the next sample.

Often there is inherent jitter in the interrupt response, but it depends on the details of the MCU chip.


Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

LOL What\'s to architect?

--

Rick C.

+-- Get 1,000 miles of free Supercharging
+-- Tesla referral code - https://ts.la/richard11209
 
On Wed, 28 Jun 2023 10:20:29 -0700 (PDT), Ricky
<gnuarm.deletethisbit@gmail.com> wrote:

On Wednesday, June 28, 2023 at 10:40:32?AM UTC-4, John Larkin wrote:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too.

To make it work well, the code needs to be designed to minimize the jitter from interrupt source to triggering the DAC. I put the write as the first thing in the interrupt routine, then calculate the next sample.

The code would add the fset register to the phase accumulator and load
the dac. No branches to alter the timing.

Often there is inherent jitter in the interrupt response, but it depends on the details of the MCU chip.

Nanoseconds wouldn\'t matter much. The trick in the Pi would to avoid
cache misses.


Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

LOL What\'s to architect?

Features, interfaces, specs.
 
onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine..

A STM32 micro, so you can program whatever frequency you want to pass on..
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%
 
On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%

Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.
 
On Wed, 28 Jun 2023 14:58:33 -0700, John Larkin
<jlarkin@highlandSNIPMEtechnology.com> wrote:

On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
langwadt@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%

Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.

Yes!

https://forums.raspberrypi.com/viewtopic.php?t=300974

So one core can run the fast realtime stuff fast, and the other can do
the slow junk (ethernet, USB, command parsing, all that) from the
flashcache.

The thing that impresses me about the Pi is how they did everything
right.
 
onsdag den 28. juni 2023 kl. 23.58.43 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
lang...@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%
Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.

running in-place from eeprom with cache is just convenient when you
have a large program, some of it possibly not very time critical

you can run all you code or part of it in ram on a pico, if it fits
 
On Wed, 28 Jun 2023 15:07:59 -0700 (PDT), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 23.58.43 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
lang...@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%
Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.

running in-place from eeprom with cache is just convenient when you
have a large program, some of it possibly not very time critical

you can run all you code or part of it in ram on a pico, if it fits

Possibly all of it. Certainly all the code for one core, the one that
does realtime stuff.
 
torsdag den 29. juni 2023 kl. 00.06.36 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:33 -0700, John Larkin
jla...@highlandSNIPMEtechnology.com> wrote:

On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
lang...@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%

Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.
Yes!

https://forums.raspberrypi.com/viewtopic.php?t=300974

So one core can run the fast realtime stuff fast, and the other can do
the slow junk (ethernet, USB, command parsing, all that) from the
flashcache.

The thing that impresses me about the Pi is how they did everything
right.

it\'s just an mcu, I don\'t see how they did it particularly \"right\" compared to all the others
 
On Wed, 28 Jun 2023 18:21:17 -0700 (PDT), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

torsdag den 29. juni 2023 kl. 00.06.36 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:33 -0700, John Larkin
jla...@highlandSNIPMEtechnology.com> wrote:

On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
lang...@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017 and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%

Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.
Yes!

https://forums.raspberrypi.com/viewtopic.php?t=300974

So one core can run the fast realtime stuff fast, and the other can do
the slow junk (ethernet, USB, command parsing, all that) from the
flashcache.

The thing that impresses me about the Pi is how they did everything
right.

it\'s just an mcu, I don\'t see how they did it particularly \"right\" compared to all the others

One of the many things they did right was guarantee availability of
the RP2040 chip until 2041. And price it at $1.

The Pi Pico board is $4.

The RP400 dev/debug system comes all done, ready to run, for $70.
 
On a sunny day (Wed, 28 Jun 2023 14:58:33 -0700) it happened John Larkin
<jlarkin@highlandSNIPMEtechnology.com> wrote in
<moap9i94f8h96d3diev581lm8oi2q49f82@4ax.com>:

On Wed, 28 Jun 2023 14:01:13 -0700 (PDT), Lasse Langwadt Christensen
langwadt@fonz.dk> wrote:

onsdag den 28. juni 2023 kl. 16.40.32 UTC+2 skrev John Larkin:
On Wed, 28 Jun 2023 14:58:05 +0200, Klaus Vestergaard Kragelund
klau...@hotmail.com> wrote:

On 26-06-2023 16:20, John Woodgate wrote:
I want to divide a 32768 Hz crystal frequency by 20 to get a stable frequency for a component bridge. I could use a 4017
and half a a 4013 (sorry about these ancient devices, but they are still good for some things), but I would have to add something
to make the crystal oscillate unless there is a way to use the other half of the 4013 to make the oscillator.

I also looked at using just a 4096, which gives me the oscillator, but I can\'t see how to make it divide by 20. I know
there is a technique that combines some of the output signals via an EXOR to achieve divisors that are not powers of 2, but I can\'t
find information on which signals to combine.

A STM32 micro, so you can program whatever frequency you want to pass on.
Software DDS is fun too. Lots of micros have a 10 or 12-bit DAC which
can be lowpass filtered into a nearly perfect sine. Interrupting at a
few hundred KHz is easy nowadays.

A Pi Pico would make a cool general-purpose signal generator. There
are a zillion possibilities for a product there, and would just need a
bit of code.

I\'m guessing that a 1 MHz interrupt rate could be supported on the DDS
core. Covering the audio range would be easy.

I\'ll architect it if someone will code it.

this does 400Hz sin/cos DDS on the two DACs on a 168MHz STM32F407
https://github.com/langwadt/singen

at 500ksps it spends about 50% cpu time in the interrupt calculating each sin/cos using ARMs fixed point lib
using a simple table lookup is uses ~25%

Table lookup is great for DDS, where not many MSBs of the phase
accumulator are used. I\'ve brute-forced a 16 bit sine function the
dumbest possible way, a lookup table with 65536 entries.

On a Pico, one would copy the sine table into RAM, maybe unfold it
from flash at powerup.

I wonder if a Pi Pico can run code, the DDS ISR, out of ram. That
would avoid cache misses.

I once build an audio sine generator with a 4040 counter driving an EPROM with sine table into an R2R DAC
The oscillator was a 4046, wide frequency range,
Who needs processors....
 

Welcome to EDABoard.com

Sponsor

Back
Top