Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Example Use of CD4059 Divide by N

697 views
Skip to first unread message

Mike Towner

unread,
Jul 2, 2015, 4:49:06 AM7/2/15
to

I am trying to understand how to use the CD4059 as a divide by N
counter.

http://www.poyntsource.com/New/PathImages/CD4059.pdf

Being an analog guy, I find the data sheets a little abstract.

Could someone possibly provide a real life example of how to divide by
some arbitrary figure?

Then, I will build it up and learn from that.

BTW, is there a chip that is more intuitive to program?

Mike Towner

Bill Sloman

unread,
Jul 2, 2015, 5:36:49 AM7/2/15
to
http://www.nxp.com/documents/data_sheet/74HC40103.pdf

This does have to be programmed with binary numbers, but the slightly more intuitive 74HC40102 seems to have been discontinued (at least by NXP).

--
Bill Sloman, Sydney

Martin Brown

unread,
Jul 2, 2015, 5:40:40 AM7/2/15
to
On 02/07/2015 09:48, Mike Towner wrote:
>
> I am trying to understand how to use the CD4059 as a divide by N
> counter.
>
> http://www.poyntsource.com/New/PathImages/CD4059.pdf
>
> Being an analog guy, I find the data sheets a little abstract.
>
> Could someone possibly provide a real life example of how to divide by
> some arbitrary figure?

Concentrate on P4-6.

Basically you setup in BCD format the N you want into the jam inputs and
then choose a prescaler with Ka=Kb=Kc=1 as /1 for simplest case.
>
> Then, I will build it up and learn from that.
>
> BTW, is there a chip that is more intuitive to program?
>
> Mike Towner

Dunno. I still remember checking code to do this decades ago.

--
Regards,
Martin Brown

Mike Towner

unread,
Jul 2, 2015, 8:01:06 AM7/2/15
to
Still available from Digikey, but it appears to be much the same in
function.

http://pdf.datasheetcatalog.com/datasheet/SGSThomsonMicroelectronics/mXuqsqy.pdf

This looks interesting.

http://circuit-diagram.hqew.net/Divide$2dBy$2dN---1$2f2-Circuit_17142.html

Mike Towner



Tim Wescott

unread,
Jul 2, 2015, 1:02:44 PM7/2/15
to
I think you're getting to something that's complicated enough that
programming just isn't going to be really intuitive. It's one of those
things that will have you buried in reams of scratch paper with scribbles
and crossed-out bits and cuss words and all before you're done.

Why use such an old part? You're dooming yourself either to thumbwheels
or a parallel interface from a microprocessor, when there's a good chance
that a microcontroller with an on-board counter could do the whole job.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

bloggs.fred...@gmail.com

unread,
Jul 2, 2015, 2:32:53 PM7/2/15
to
On Thursday, July 2, 2015 at 4:49:06 AM UTC-4, Mike Towner wrote:

> Then, I will build it up and learn from that.
>

If you can't understand that simple datasheet then you can't understand anything.


>
> Mike Towner

rickman

unread,
Jul 2, 2015, 2:54:10 PM7/2/15
to
How about this one?

http://www.datamath.org/Story/Datamath.htm#The%20%22Calculator-on-a-chip%22

If you explain your needs in more detail maybe we can show you how to do
it?

--

Rick

Phil Hobbs

unread,
Jul 2, 2015, 4:22:43 PM7/2/15
to
You might enjoy reading Don Lancaster's "CMOS Cookbook". It's sort of a
Cook's tour through the CD4xxx series, with a cheat sheet for each part
and a bunch of applications advice, such as divide-by-N counters.

I learned a lot from it in the long ago.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics

160 North State Road #203
Briarcliff Manor NY 10510

hobbs at electrooptical dot net
http://electrooptical.net

upsid...@downunder.com

unread,
Jul 2, 2015, 4:31:55 PM7/2/15
to
On Thu, 02 Jul 2015 18:48:53 +1000, Mike Towner <mto...@quintrex.com>
wrote:
I really had to look twice that I am not responding to a 30-40 years
old request.

Anyway, there are at least two ways to implement a divide by N
circuit:

* Use a ripple up counter with gatings to detect when N is at the
counter output and generate an asynchronous reset to all flip-flops.
Of course, any ripple counter will suffer from asynchronous reset
timing problems, limiting the maximum clock frequency.

* Use a synchronous down counter and parallel load N into the
registers when the counters reach 0. In fact the Pre load N might be
ready to be pre loaded, when the counter reaches 1 or even 2, thus a
preloadable synchronous down counter will operate at higher
frequencies than a divide-by-N asynchronous ripple counters.

In the 1970's the CMOS counters were much slower than TTL ripple
counters, so they tried to get every means to have reliable CMOS
counters at comparable frequencies.

Mike Towner

unread,
Jul 2, 2015, 7:09:29 PM7/2/15
to
What I asked for was one example of the practical use of a CD4059 to
help me understand the "simple" data sheet above. IOW pin connections.

For example, divide 32.768KHz down to around 14 Hz.

I would then build it and better understand the process.

Any chip that is not a micro that performs this type of function
better would also be of interest.

Thank you,

Mike Towner

rickman

unread,
Jul 2, 2015, 8:44:11 PM7/2/15
to
To be honest, this is a complicated chip to use. But I think I
understand it. First problem, it will only divide a frequency by an
integer to get another frequency. I think I can make it divide by 2341
to give you 13.99743699274 Hz. There are fractional dividers which will
give you exactly 14 Hz.

To get a divisor of 2341 we choose a divisor for the first stage from
the list of 2, 4, 5, 8 or 10. Using 5 requires the use of "Master
Preset" so I pick 4. This means we need to set the mode select to 011
(Ka through Kc). Dividing our divisor of 2341 by 4 gives 585 with a
remainder of 1. The remainder is used to set the Jam preset of the
first stage so J1 = 1 and J2 = 0 (only two bits are set because of the
first stage divisor we picked using the mode select). Jam presets J3
and J4 are used for the most significant digit of the quotient which in
this case is 0, so both J3 and J4 are 0. The remaining digits of the
quotient are used to set the rest of the Jam presets. So J5 through J16
are set to form 585 in BCD with J16 being the most significant bit.

Change the J1 preset to a 0 and you divide by 2340 eve to give you
14.00341880342 Hz, just a little further off from 14 Hz. :)

I can't be sure, but I think that is right. Make sense now? Can anyone
confirm I did this right?

A fractional divider works by dividing by N and N+1 in the right ratio
to give the exact ratio of frequencies. The period of the output varies
by one clock cycle though, so it has phase noise and such.

--

Rick

Dave M

unread,
Jul 2, 2015, 10:22:28 PM7/2/15
to
Here are a couple links that will show how to use the CD5059 in a couple
basic synthesizers, and gives a bit of theory of operation for you in
preparation for building the circuit.

http://213.114.130.173/use/synth-00.htm
http://213.114.130.173/conv/synth-10.htm

Review those projects, then come back with any questions that you have.

Cheers,
Dave M

Dave M

unread,
Jul 2, 2015, 10:59:02 PM7/2/15
to
Sorry for the fat fingers... should be the CD4059 of course

Mike Towner

unread,
Jul 3, 2015, 2:15:38 AM7/3/15
to
On Thu, 02 Jul 2015 20:44:08 -0400, rickman <gnu...@gmail.com> wrote:

>>>> I am trying to understand how to use the CD4059 as a divide by N
>>>> counter.

>To be honest, this is a complicated chip to use.
>

Good to hear I am not the only one to think so.

>But I think I understand it. First problem, it will only divide a frequency by an
>integer to get another frequency. I think I can make it divide by 2341
>to give you 13.99743699274 Hz. There are fractional dividers which will
>give you exactly 14 Hz.
>
>To get a divisor of 2341 we choose a divisor for the first stage from
>the list of 2, 4, 5, 8 or 10. Using 5 requires the use of "Master
>Preset" so I pick 4. This means we need to set the mode select to 011
>(Ka through Kc). Dividing our divisor of 2341 by 4 gives 585 with a
>remainder of 1. The remainder is used to set the Jam preset of the
>first stage so J1 = 1 and J2 = 0 (only two bits are set because of the
>first stage divisor we picked using the mode select). Jam presets J3
>and J4 are used for the most significant digit of the quotient which in
>this case is 0, so both J3 and J4 are 0. The remaining digits of the
>quotient are used to set the rest of the Jam presets. So J5 through J16
>are set to form 585 in BCD with J16 being the most significant bit.
>
>Change the J1 preset to a 0 and you divide by 2340 eve to give you
>14.00341880342 Hz, just a little further off from 14 Hz. :)
>
>I can't be sure, but I think that is right. Make sense now? Can anyone
>confirm I did this right?
>

Thank you for your detailed explanation. It is starting to make sense
to me now. I always liked the old text books where they gave you a
concrete example.

I have drawn the digram (below) and will built it up this weekend.

https://app.box.com/s/mppsi5rh0atr4rf94a5bv08568uu9270

Mike Towner

rickman

unread,
Jul 3, 2015, 3:20:59 AM7/3/15
to
Everything I gave you I got from the data sheet you referred me to. It
has several examples.

--

Rick

Mike Towner

unread,
Jul 3, 2015, 6:36:12 AM7/3/15
to
On Fri, 03 Jul 2015 03:20:54 -0400, rickman <gnu...@gmail.com> wrote:


>> I have drawn the digram (below) and will built it up this weekend.
>>
>> https://app.box.com/s/mppsi5rh0atr4rf94a5bv08568uu9270
>
>Everything I gave you I got from the data sheet you referred me to. It
>has several examples.
>

Your example was better. Thanks.

Mike Towner

rickman

unread,
Jul 3, 2015, 12:17:55 PM7/3/15
to
Yes, I had trouble reading theirs at first. Glad I could help.

--

Rick
0 new messages