How do you make a frequency divider from transistors

Go To Last Post
23 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have many crystal oscillators but i don't have any 10 mhz one and i want to have 10mhz on my z80 cpu. So what i wanted was to divide that with some transistors.

This topic has a solution.
Last Edited: Wed. Jan 16, 2019 - 03:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dividing by a power of 2 ( frequency 20MHz to 10 MHz ) can be done with "Flip-Flop" (yes that is their official name) ICs of the 74HC74 family.  These were "glue" chips that were used in 1970s-2000-era PC computer systems.   But you couldn't do frequency division with only a few transistors.

 

A way to get adjustable high-speed square wave clocks (1 to 25MHz) is to use the Voltage-controlled Oscillator section of the inexpensive 74HC4046 Digital Phase-Lock Loop IC.  With this IC, you can set the MHz frequency output with a simple resistor and capacitor combination.  You don't use the phase-lock section of the IC at all.

 

Z-80s are a pain to use when compared to the AVR or Arduino.  You have to make at least 100 wire connections between the Z80, the RAM, the EPROM, and the Input-Output peripheral chip.  The timing charts for the Z80 are as complicated as hell.  Plus it is an obsolete chip from the 1970s.  

 

If you wish to learn a microprocessor that is "beyond" the AVR, learn the ARM or the ESP8266.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:

But you couldn't do frequency division with only a few transistors.

 

You can do it with just three...

 

 

But getting it to work at 20MHz is going to be an issue. It can be done but you are going to need some high-frequency transistors, not the ones shown above.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Z80 clocked at 10MHz????

 

I don't recall they went that fast...

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That’s what I had initially thought. https://www.mouser.com/Semiconductors/Integrated-Circuits-ICs/Embedded-Processors-Controllers/Microprocessors-MPU/Z80-Core/_/N-a86qz?P=1z0y33fZ1yzudkgZ1z0w9rq

As to using transistors, if you want retro...... i’d just use a hc74 like Simonetta suggests, but I’m just lazy!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Heck, to be truly retro, use 74xx. But, not sure that 7474 will run that fast. Oooopsie, minimum clock period is 67ns => 14.9MHz for standard SN7474.

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Mon. Jan 14, 2019 - 10:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcapacitor wrote:

I have many crystal oscillators but i don't have any 10 mhz one and i want to have 10mhz on my z80 cpu. So what i wanted was to divide that with some transistors.

 

If transistors includes Metal Oxide Silicon Field Effect Transistor (MOSFETs) then you can get a single SOT23 sized package with 'some transistors' inside, doing exactly that.

Look at the 1G80 series single-gate flip flops, or the HC161 series can divide by any number 2-16

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
That’s what I had initially thought.
Wow! We used to dream of 10MHz Z80's.

 

We used 4MHz Z80 in

 

but the following implemented a Z80 core as part of an NEC ASIC and went at the truly wild speed of 6MHz:

 

 

Oh and in this we used a Z380:

 

 

but that was more about addressing range than CPU speed.

 

(You can probably tell, we used to love Z80's!)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I knew of a person back in the day that added a cache to the then Z80H (8MHz) but the aggregate performance was about the same as a 6MHz Z80. Then the Z180 came along and precipitated the conversion of the nmos parts to cmos which is when some speed increases were had. As well, memory speeds increased. As of last year I was still working on z180 based product coded in assembler. Luckily the company decided it didn’t need me anymore.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I hated Z80s, simply because I was in love with the 6809, but aside from that, the cycle counts for Z80 instructions were higher than for 6502 or 6800/09 processors(or so I remember - I just chucked all my assembly language programming books(8080. Z80, 6800, 6809, 6502, 65something-or-other only found in one model of Apple PC, 6805 variants, original Acorn Risc Machine, 8086 etc. and some weird and wonderful 4 bit Toshiba chips, amongst others) on the grounds that the internet has more spare room than I do.

Clock speed was not a very useful metric.

 

Quebracho seems to be the hardest wood.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Wow. This thread brings back memories!

 

We were forbidden to use Z80s because they were unreliable. No doubt we learned this from the Intel salesman. My personal computer was a Z80 that always ran so smooth! Even in the mid 80s when PC-AT clones were everywhere, people were astounded to see "Romana" running programs. "So fast!" (she was 4MHz)

 

2 82,589,933 -1 The largest known Mersenne Prime (Dec 7, 2018)

"If you think you're always wrong about everything, look on the bright side. You're probably wrong about that too." -- Ziggy

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can make a flip-flop with two transistors.  I think Brian is way complicated.  I actually made a couple of these and they worked fine.  If your transistors are too slow you can speed them up by putting a 100 pF capacitor across the base resistors.  Here is the wikipedia link for flip-flops:  https://en.wikipedia.org/wiki/Fl...(electronics)

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MarkThomas wrote:

You can make a flip-flop with two transistors...

 

Go on then, make a divide by two using your circuit. wink

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My mistake Brian.  I thought your schematic was for a flip-flop, not the whole frequency divider.surprise

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Having an Set/Reset (RS) flipflop is not quite the same as a D-FF or J-FF. RS won't do frequency division without additional logic. The circuit shown is RTL logic implementation and is inherently slow, even with the base speed-up caps. That is because the transistors saturate. 

 

All of this is really bogus, however, because just getting the "right" crystal is far less costly, uses less power, uses less board space. Further, if a frequency divider is involved THEN you also have to have a stand-alone oscillator; the internal oscillator is no longer useable because there is no way to insert a frequency divider into the clock chain. 

 

This is really "economy" in the form of cutting off your nose to get closer to your work. Further, this has nothing to do with AVRs. Lets put this to rest!

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Tue. Jan 15, 2019 - 07:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are right Jim.  That flip-flop wouldn't work.  I think you are right it is just easier to get the right crystal.  They're cheap and easy.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok i think i just will buy more crystals and the only reason i didn't want to do that was because delivery from china takes a looooong time

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There also exists a z80 clocked at 20mhz: z84c0020

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

microcapacitor wrote:

Ok i think i just will buy more crystals and the only reason i didn't want to do that was because delivery from china takes a looooong time

 

Why not buy in Europe?

 

Reichert in Germany, 4 business days to Sweden for 5.60euro

Conrad, also in Germany, are similar.

Elfa are in Denmark

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

Last Edited: Wed. Jan 16, 2019 - 03:49 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now, I'm just a bit pusher.  All this investigation and design and circuit-building to avoid getting a suitable clock generator?

 

I guess since "engineering is the art of making what you need from what you have", then if OP has transistors everything looks like a clock.

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Silly question but isn't their some 74 series (or 4000 CMOS) that is simply a binary counter you could use? Presumably the second digit is "/2", then next "/4" and so on? Or does this have to include the resonant circuit for the quartz as well?

 

EDIT 7490/92/93 look promising

Last Edited: Wed. Jan 23, 2019 - 02:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Waaay back I used a frequency counter where the time base was a bunch of divide by tens where each stage was a one shot that timed out after 9 input clocks. The tenth clock triggered it again. Each was a divide by ten at only that frequency. For example, a 9.5 microsecond one shot can be used to make 100 KHz from a 1 MHz input.

For the CPU clock any integer multiple of the desired frequency could work. If you need a specific wave, 50/50 or 33/67, two one shots alternating could approximate the needed wave form.

This is a really high effort way to get 10 MHz. A voltage controlled RC oscillator divided down (by one shots) to 50 or 60 Hz then phase locked to the power line would be worse. See post #15 for useful advice.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

Why not buy in Europe?

 

Reichert in Germany, 4 business days to Sweden for 5.60euro

Conrad, also in Germany, are similar.

Elfa are in Denmark

 

In my case (Portugal) RS components has the cheapest delivery cost (5€) and becomes free for orders > 50€. Normally, most distributors charge a lot, people in central Europe have more choicesad

Last Edited: Thu. Jan 24, 2019 - 01:03 AM