Author Topic: HOW TO: Programmable Divide-by-N Counters using Standard Logic  (Read 2325 times)

0 Members and 1 Guest are viewing this topic.

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Designing programmable divide-by-N counters using "off-the-shelf" logic should be easy, right?

Well, I found that data sheets don't give a lot of information, and application notes are pretty much non-existent.

So I did my own universal design using 74AC161 synchronous counters (74HC, 74LS etc. will also work).

The design is a 20-bit fully programmable divider, 100% synchronous, that can be shortened or extended to other lengths (12-bit, 16-bit, 32-bit...).
It will run at up to 37 MHz guaranteed due to the use of "carry look ahead".

You can use the schematic freely as you like, no license or anything.
I attach it in .PDF and zipped .sch (KiCAD Eeschema) formats. It's a pure logic schematic, power, decoupling etc. is left to you. Design notes are in the schematic.

Do not try building the circuit on a "solderless breadboard"; use at least a matrix board, if not a real prototype PCB. The edge rates of 74AC could otherwise cause trouble.

Cheers :)

EDIT: Very embarassing: A couple of the files were incorrect and the carry-look-ahead file was wrong (and actually showed the simpler ripple-carry counter). They are all correct now. I've added a .pdf schematic of the simpler divider without carry look ahead. I apologize if I've wasted time for you. Sorry

« Last Edit: October 15, 2020, 10:12:40 pm by Benta »
 
The following users thanked this post: jpanhalt

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: au
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #1 on: August 03, 2020, 11:21:53 pm »
NOTE: As it is not permitted to upload .sch files here, it's been renamed as .jpg. After download, please name it back to .sch !!!
Incredible on an electronics site, really !

Cheers :)
Just zip it. End of story.   :)
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #2 on: August 03, 2020, 11:23:58 pm »
NOTE: As it is not permitted to upload .sch files here, it's been renamed as .jpg. After download, please name it back to .sch !!!
Incredible on an electronics site, really !

Cheers :)
Just zip it. End of story.   :)

I tried. But my zip program's gone bonkers. I'll try again when it's fixed :(

EDIT:  OK, fixed :)
« Last Edit: August 03, 2020, 11:38:37 pm by Benta »
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7653
  • Country: us
    • SiliconValleyGarage
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #3 on: August 03, 2020, 11:24:31 pm »
has been around for a long time : 4059  4018 74292 74294
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #4 on: August 03, 2020, 11:35:13 pm »
has been around for a long time : 4059  4018 74292 74294

An obsolete CMOS part, an unknown part and two Sylvania LED bulbs? What are you on about?

 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: au
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #5 on: August 03, 2020, 11:36:22 pm »
I did a 16-bit programmable down counter about 20 years ago using two CD40103 8-bit counters. Was for a car ignition system. Worked well. And back in 1990 I did a 14-bit one, again for a car ignition, using a Motorola MC145151 radio PLL programmable divider. Worked great! ftp://ftp.jameco.com/Archive/Current-TechDocuments/118586.pdf
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #6 on: August 03, 2020, 11:50:18 pm »
I see that my point about "Standard Logic" didn't really come across. Today, almost no down counters have survived. And certainly not in today's technology (74AC etc.)

Synchronous up counters are on the market, and if you want to design something that runs just a little above a couple of MHz, that's what you get. And that's what my free design offers.
If you have technical issues with the design, great! I love to learn.
But please don't throw 1970/80s technology at me. That's not "Standard Logic" today.

« Last Edit: August 04, 2020, 12:20:36 am by Benta »
 
The following users thanked this post: Ysjoelfir

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 1895
  • Country: mx
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #7 on: August 04, 2020, 12:02:10 am »
 Benta:
Thanks for sharing the circuit.

I am sure you spent a significant effort to design it.
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: au
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #8 on: August 04, 2020, 12:10:10 am »
But please don't throw 1970/80s technology at me. That's not "Standard Logic" today.
Sorry! That was my way of saying I find your post interesting.
 
The following users thanked this post: Ysjoelfir

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #9 on: August 04, 2020, 12:16:21 am »
Thank You, no ill feelings from here. Rather regret that I didn't emphasize a point which I perhaps should have in the original post.

 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7653
  • Country: us
    • SiliconValleyGarage
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #10 on: August 04, 2020, 04:25:12 am »
has been around for a long time : 4059  4018 74292 74294

An obsolete CMOS part, an unknown part and two Sylvania LED bulbs? What are you on about?
really ?

https://www.digikey.com/products/en/integrated-circuits-ics/logic-counters-dividers/731?k=4059
https://www.digikey.com/products/en?keywords=mc14018
https://www.digikey.com/products/en?keywords=74ls292
https://www.digikey.com/products/en?keywords=74ls294

if you would have cared to search for these devices you would have found them. numbers such as 74292 are generics. they could exist as LS ALS F ACT BCL BCT or any of the hundreds of technology families.
Same for the 4018. That's a motorola part so add MC1 in front and you will find it
Same for the 4059. still around and in mass production.

and let's not forget these :
https://www.digikey.com/products/en/integrated-circuits-ics/clock-timing-clock-generators-plls-frequency-synthesizers/728?k=fractional

Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: au
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #11 on: August 04, 2020, 04:30:40 am »
Looks like a 4059 is divide by BCD number, not straight binary.
Probably to facilitate inputs from thumb wheel switches.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7653
  • Country: us
    • SiliconValleyGarage
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #12 on: August 04, 2020, 12:36:51 pm »
Looks like a 4059 is divide by BCD number, not straight binary.
Probably to facilitate inputs from thumb wheel switches.
yes. this part was heavily used in pll synthesizers.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #13 on: August 04, 2020, 10:32:51 pm »
I've now done some timing analysis to quantify the difference between a classic ripple carry approach and the carry look ahead in my divider. The critical timing occurs when reloading the counter chain, not while counting.
I've attached .PNG files for explanation, they depict the critical timing paths in the dividers.

Based on 74AC161 datasheets from www.ti.com I'm using the delay specifications from there (5 V operation, worst case).

The pertinent delay parameters are:
CK -> TC: 15.2 ns
ENT -> TC: 9.4 ns

Setup times:
/Pe -> CK: 5.3 ns

74AHC1G00/04 delay:  6.5 ns


Looking at the ripple carry counter circuit you'll see that the delay from rising clock to load is: 15.2 + 9.4 + 9.4 + 9.4 + 9.4 + 6.5 ns = 59.3 ns         
Plus setup time: 64.6 ns; giving fMAX = 15.48 MHz

My carry look ahead counter has a shorter path: 15.2 + 6.5 ns, plus setup time: 27 ns; giving fMAX = 37 MHz

As you see, the performance difference is very significant.

Here are the pictures of the critical timing paths:


                         
« Last Edit: August 05, 2020, 06:50:40 pm by Benta »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1600
  • Country: nl
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #14 on: August 19, 2020, 02:27:57 am »
What is the goal of this project?

Is it nostalgia, just as with the "retrocomputing" fan clubs?

These days you can start with FPGA development boards for around EUR25 and open software frameworks.  :-//
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #15 on: August 19, 2020, 06:01:49 pm »
What is the goal of this project?

Is it nostalgia, just as with the "retrocomputing" fan clubs?

These days you can start with FPGA development boards for around EUR25 and open software frameworks.  :-//

That this question comes from a user that has contributed zilch to OSHW demonstrates a certain chutzpah combined with condescension that's decidedly unsympathetic.

The circuit is a real project (can't say for what) that I wanted to share in the spirit of OSHW.
A main driving factor was multiple vendors and a semiconductor BOM of ~1 Euro.

 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 2393
  • Country: au
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #16 on: August 19, 2020, 09:46:58 pm »
^^ At times it’s good to get to the fundamentals, the nitty gritty of things rather than have fifty layers of abstraction between you and the circuit. Like designing stuff using individual transistors rather than an op amp. Besides, there is a certain level of satisfaction that can’t be achieved by simply filling in a few values and selecting a few drop down menus on a screen.
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1600
  • Country: nl
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #17 on: August 28, 2020, 10:00:20 pm »
Jeez man, relax.
There can be plenty of good reasons to do such a project.
Keeping BOM costs down can be one of them.

That this question comes from a user that has contributed zilch to OSHW
Remark based on what?
 

Offline themadhippy

  • Frequent Contributor
  • **
  • Posts: 715
  • Country: gb
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #18 on: August 29, 2020, 12:10:17 am »
Quote
These days you can start with FPGA development boards for around EUR25 and open software frameworks.
yea lets spend 25 quid  and waste time programing instead of buying a few chips for a quid or 2 that will do the job straight out box
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 3165
  • Country: de
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #19 on: August 29, 2020, 07:54:18 pm »
Remark based on what?

Just post a link to an OSHW design that you've submitted, then I'll retract my remark.

« Last Edit: August 29, 2020, 08:00:37 pm by Benta »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1600
  • Country: nl
Re: HOW TO: Programmable Divide-by-N Counters using Standard Logic
« Reply #20 on: August 30, 2020, 02:10:53 am »
I have no interest in refuting your unfounded nonsense.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf