Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd behaviour of Schmitt trigger slew rate #104

Open
gsuberland opened this issue Sep 8, 2024 · 1 comment
Open

Odd behaviour of Schmitt trigger slew rate #104

gsuberland opened this issue Sep 8, 2024 · 1 comment
Labels

Comments

@gsuberland
Copy link

The Schmitt trigger has a slew rate property that can be specified in V/ns. However, the actual slew rate seems to be dependent on what is connected to the gate, and even when other Schmitt triggers get connected or disconnected to things. I have noticed this in multiple scenarios.

Here's an example circuit: https://www.falstad.com/circuit/circuitjs.html?ctz=CQAgjOCmC0YEwjmAdAVgJwGZ0A4DscmYADAGxgAs8IqxNIFmNMYYAUGDgtBRTosX7RMOCgP51MyJilKkQUzE0UhibAEogefcVr504g1YgHEz5+nSto2Ad3DEKBo60zzDEtgCdwYN7td3VHk6EjM2AHNffzhg6PcCYzUkJmFDXWg4RI9jBABjABsAQwBbAAcACgqi6AAjAEoAehIAGgAdAGdoYmQzHHaOnr76uy0wUmchVgQctSjMuDFFugWluKtRtIMnLUx0uBxPey3EQ7H0GbO1Y7AL06m72c24RYzbmaM1MDwIUiWXCa6UIwdAgHCoBieKJ-RBxGFZBAbKLjAxxFGIRIbHw8fg5WDUWamTbvN6Ap7Y9F4ylXBzmOZjMlnWCAzCOJJsPJ6XFGHGw9yIFiI5BIVB7CiEOR4VDSzB4JhDYjseY6WLyXkI9k+cYZFWfVTIdg+A7c3GvQk9JWIM1xF5LTGqDlW-6mtb8uCCrQKszwVnYHDEPB4Yi4VD+0EKw1OgJkvUWyIMPZ8hMze30pRBeTpjGIh3fCBZnKMD4SKDQUHgyEOnzBSYMdDuWMG+MUetJlsJHNqTnt3Q91Umd2wbhexWEYh+gNBkNh-Xe7x1hv8ItA-WWoOukDr7Ps6FGfsTXGpjg-EAH3RbwlgEFgiE6NQ+HCJnJ4UgmpJNqIv3FxL-bjac39n1fJMZg9bpenMH1x1wSdg3BGcI3nQCjAvRtLXQF8kwwjsdzBf0k0OAwjzzPDa2wlcrzLG9K3vEByJyEgdnND8HCYtFHCIztHUY2seJA5gh1nMwXi4H5UCyPAcHQVBeAoEIIPYApwEXU9nRMSiJAgwxg0waVFloUhAzwB0lONXQCz3UspmQV9WXIQQ-HrGBjLUJSa10M8cgQDSxhsx8yBIHBHNIZyTLBJ8jEI3RvJgazbIChzsBC6AXMdfEU24aYFH2ATqB6KV4BwUgXkcF5cC4ITLXS7KViyrMsTGAkeSyjVrEVTYRDU4RRHAA4HWOTqMj2Ws1E0bQpjVfQGVyUw6ToCErH1VAOAq8bpu6sRmWMFRZEzaRlGkfrdh6rbhDZLa1AAexMGE6CcXBZ1uUV4AWiDioWgcFDYa75Fuhhg2M17RwhCAEEzb6aBkYx7tBIHzGw4JYk+0Uvuu1BjIgO7g1hoSzAR96FBMdGvqAA

Both Schmitt triggers here are configured as 1.66V lower threshold, 3.33V upper threshold, 3.3V/ns slew rate, 3.3V logic high, and 0V logic low, I would expect a 1ns rise time and 1ns fall time. When simulated with a timestep of 1ps, the rise time is actually about 100ps.

However, if I then reduce the slew rate to 0.33V/ns, i.e. 10x slower, the rise time becomes 10ns as expected.

What's really bizarre is if you disconnect the lower Schmitt trigger (select both the Schmitt trigger and the clock source, and drag them so they're not connected to the trace) both the lower and upper Schmitt triggers' rise times become 1ns as expected.

@pfalstad
Copy link
Owner

pfalstad commented Sep 9, 2024

Yeah, the slew rate doesn't handle nonlinear circuits properly. If there's multiple iterations to solve a nonlinear circuit step, then the slew rate gets multiplied by the iteration count. The inverter used to have a similar bug.

@pfalstad pfalstad added the bug label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants