I have 2 available pins on a CPLD which is a 5V TTL device (ATF750C-10PU). The inputs are just regular logic not Schmitt trigger. One pin is an output, while the other is an input.

I would like to have a very simple external circuit that makes an oscillator at around 500Hz to drive internal circuitry. The rate is very non critical; it's just to drive a counter and multiplex some LEDs, but I don't want it be higher than 1kHz.

You can make a reliable RC oscillator with inverter but only with a Schmitt trigger input. There's no Schmitt trigger option on the device I'm using. I don't mind if there is an external transistor or other semiconductor devices as long as the external parts are cheap and the component count is low.

I was wondering if I can make some kind of RC oscillator using those two available pins on the CPLD.

  • \$\begingroup\$ Can you implement a RC NOT gate oscillator ? \$\endgroup\$ – Long Pham May 19 '18 at 13:43
  • \$\begingroup\$ electronics.stackexchange.com/questions/206907/… \$\endgroup\$ – hatsunearu May 19 '18 at 13:46
  • 1
    \$\begingroup\$ Problem is, this thing might not work unless you have a schmitt trigger input (as the asker knows). Which sucks. You might also get shoot-through current because the input transistors stay in the triode region too much. I tried thinking of various solutions and I can't really think of one--you might have to just throw a 555 or something in there... unfortunately. \$\endgroup\$ – hatsunearu May 19 '18 at 13:48
  • 1
    \$\begingroup\$ Actually in the datasheet there is a mention of a bus hold feature--maybe you can abuse that to get free negative feedback to get an oscillator: use the normal digital path as a regular buffer (if possible), and use the bus hold as a negative feedback path. \$\endgroup\$ – hatsunearu May 19 '18 at 13:54

Alright! I got it. I think it's a dirty, dirty (but clever, in my humble opinion) hack that I'd never use in a real design. Use at your own risk!

excerpt from the ATF750C CPLD showing the bus hold feature

from the ATF750C datasheet, it proclaims that there is a bus hold feature.

The bus hold feature is basically a positive feedback path with 100K of series impedance. If you put an inverter as the "normal" digital path, then by using both, you basically get a negative feedback path and a positive feedback path.

When you have positive feedback, you can use it to create a Schmitt trigger, and if you have negative feedback, you can create an RC oscillator--therefore you can make a Schmitt trigger RC oscillator.


simulate this circuit – Schematic created using CircuitLab

NOT1 is the regular inverter, and NOT2 is part of the bus hold inverter. Adjust R2 and C1 to meet your timing needs.

Please note this still puts the input in undefined state for a long time (which causes shoot through current), so I'd highly advise against this.

I checked the datasheet and there doesn't seem to be any slew rate constraints, but if there is and they just forgot to write it, this circuit may destroy your CPLD, so be careful.

Bottom line is, since it's a CPLD, it hints me that this is not a hobby project. If this is for commercial use, please don't use this hack; go for a 555 timer or a small Schmitt trigger (it's cheap, and I'm sure you can get it in SOT5 or something tiny like that).


If you wanna go for the Schmitt trigger route, I found some single, 5V Vcc Schmitt triggers in 5TSSOP (tiny) packages for like <15 cents each @ 100qty. View this question to get how to set the frequency:

How to delay a "not gate oscillator" to make it run at a desired frequency?

  • \$\begingroup\$ That's a very clever idea. Yeah I don't really want to destroy the CPLD :) I had wondered if some discrete transistor arrangement could get it to behave as desired. But this is a pretty good answer. Thx \$\endgroup\$ – Robotbugs May 19 '18 at 20:07
  • 1
    \$\begingroup\$ There is a two transistor oscillator but I'd assert that an external Schmitt trigger oscillator has better characteristics, smaller, and perhaps even cheaper. \$\endgroup\$ – hatsunearu May 19 '18 at 23:01

Your Answer

