Close

A faster Generalised Flip-Flop

A project log for Yet Another (Discrete) Clock

I HAD to finally do this basic "exercice de style" in digital electronics, using some hundreds of transistors and diodes...

yann-guidon-ygdesYann Guidon / YGDES 03/28/2016 at 21:5318 Comments

As I found in Testing the Flip-Flop, my smaller generalised Flip-Flop is not performing fast enough. It seems to be limited around a few KHz, which is ok for the Johnson counters but not for the 32KHz divider. A few hypothesises are being considered :

Here are some possibilities:

Now that I have the 32KHz source, I can make better measurements :-)

After I compare the position of the clock enable, the easiest would be to see the influence of the resistor value, then add the cap, then try the Schottky, and finally the P-FET. So let's go...


Result:

I used the 32KHz generator for all the tests.

(Legend:

)

Conclusion :

So I'm settling with this circuit:

I didn't try a different topology with the CLK in the middile instead of low-side...

Discussions

matseng wrote 03/29/2016 at 03:45 point

Nice....  For $20-30 it would be worth to make a few Pi-crystals just for the fun of it.   Good to know that VGA's are as accommodating frequency-wise as an old TV set. 

Fsck! I hate the commenting system here. Is sucks b*lls....

  Are you sure? yes | no

matseng wrote 03/29/2016 at 03:13 point

I think I have to build a ovenized LC-oscillator and accept the non-perfect edges.  Maybe it would be possible to find an old big crystal slightly faster than pi and then try to bring it down by drawing with a sharpie on the crystal itself.... But finding someting today that is close enough without a special order is probably impossible.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 03:16 point

Come on ! Pi is everywhere :-)

  Are you sure? yes | no

K.C. Lee wrote 03/29/2016 at 03:44 point

I got a 3.12MHz crystal on my SP0256 speech synthesizer board.  Some oscillators these days have OTP PLL inside and you get get them customized at the rep's.

  Are you sure? yes | no

matseng wrote 03/29/2016 at 03:09 point

What is the purpose of the schottkys?  They are not acting as Baker clamps as in BJTs to reduce the Miller effect I guess...

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 03:14 point

Well, the P-FET "charges" the N-FET's gate.
The P-FET's intrinsic diode is too... lazy to empty the N-FET's gate capacitance fast enough. I tried with 1N60 (0.27V drop) so when the respective data line goes low, it clears the gate. In ultrafast designs (ICs) a pass-gate (N-FET and P-FET without intrinsic diode) would be used instead but... geeks wanna have fun and I'm happy I found a use for those 1N60s :-)

  Are you sure? yes | no

matseng wrote 03/29/2016 at 02:38 point

Please make me a ring counter (a real ring counter, not a Johnson) that can be toggled at  3.146875 MHz and I can build by CHIP-8 compatible (64x32 pixels) discrete VGA video card ...  :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 02:41 point

huh .... ?
with MOSFET ?
I thought you were more into NPN and higher power draw ;-)

  Are you sure? yes | no

matseng wrote 03/29/2016 at 02:58 point

Hm... yea, I think that mosfets might be out of that range...  But that doesn't mean that you can make one with bjt's for me :)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 03:06 point

depends on your budgetS (room/size, power, time, price...)
After all, people did computers with germanium transistors 60 years ago :-D

  Are you sure? yes | no

K.C. Lee wrote 03/29/2016 at 03:52 point

Class E Tesla coils just when you think MOSFET don't run that fast. :)  http://www.vk2zay.net/article/253

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 03:55 point

K.C. : I'm feeling dirty... I'm buying old Ge PNP transistors just to use them as common cathode diode pairs... and to look cool while people wonder what this does.

  Are you sure? yes | no

K.C. Lee wrote 03/29/2016 at 04:05 point

Guitar amp effects guys probably inflated that market. I got a small bag of Ge transistors and various vintage chips.

  Are you sure? yes | no

K.C. Lee wrote 03/29/2016 at 02:48 point

Should aim for 3.1415926MHz?

  Are you sure? yes | no

matseng wrote 03/29/2016 at 03:06 point

I wonder if that's close enough to make a VGA monitor happy...

Targeting a 640x480 video with the orginal 25.175Mhz pixel clock.  

8 pixel-times s front porch
96 pixel-times horizontal sync 
40 pixel-times back porch 
8 pixel-times left border 
640 pixel-times active video 
8 pixel-times right border
------------------------------------
Total 800 pixel-times

If I divide the 25Mhz pixel clock with 8 I get 3.146875Mhz and a total of 100 "pixel-times". And then I have 80 fat pixels horizontally and can use 64 of them for the graphics.


If would definitely be cool if it could run on Pi-Mhz.







  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 03:08 point

First you have to find the Xtal that resonates at Pi MHz.
For the rest, you can trust K.C. since he did some neat VGA timing magic lately :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 03/29/2016 at 03:24 point

Ceramic resonators have a lower Q factor, you might be able to "pull" it toward Pi MHz ?

  Are you sure? yes | no

K.C. Lee wrote 03/29/2016 at 03:37 point

http://hackaday.com/2010/05/10/hack-your-crystals-frequency/

>2. You can custom order the frequency you want. There are number of manufacturers who'll do this for you. But it'll cost maybe US$15 to US$35 PER custom valued crystal.

 I was supposed to run the dot clock and all my timing off 25.175MHz, but I use 25MHz because it is 1/3 cost (Ethernet vs something few uses).  Just for the hack of it, I tried 24MHz earlier today and that worked too.  There is quite a bit of play on my LCD monitor.

Misprogrammed the PLL by a factor of 2x i.e. running at 96MHz core speed, saw the sync pulse on the scope at 60kHz.  At least part of the code actually execute to starts the timer.  Didn't bother to start the debugger.

  Are you sure? yes | no