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

changed NAND gate model to use MOS transistors #360

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

failiz
Copy link
Contributor

@failiz failiz commented Feb 25, 2023

to be used in the example in the fritzing-app repository

@failiz
Copy link
Contributor Author

failiz commented Dec 10, 2023

Hi Kjell,
the NAND gate would be very interesting to be used in examples in the transitory branch. Currently, the NAND gate that is in the core uses BJT transistors and cannot drive LEDs (and the sketch that I made does not work well). The NAND gate with multiple subparts has a problem that you identified and it should not be merged yet.
Is it Ok if I add the changes to the spice model of the NAND gate (single part) in the ac branch and close this PR?

@KjellMorgenstern
Copy link
Member

Maybe we can add a buffered/driver NAND as additional part? With a quick search I only found this
CD40107BE , which is only 2 Gate, but still THT.

And the logic level NAND gate would then be a good example to build the same, using additional transistors to drive the LEDs?

@failiz
Copy link
Contributor Author

failiz commented Dec 12, 2023

Context: I did not model any NAND gate, I just copied the models from the ngspice manual. And there are two of them, the one based on BJT transistors and the one using MOSFETs. I made the NAND example (fritzing/fritzing-app#4004) and I realized the BJT NAND model was giving problems, so I changed to the MOSFET version.
We should not create two parts, one more "logic level" and another able to drive/sink more current. Any IC with NAND gates will have enough capability to drive an LED. Probably, the BJT NAND gate could also be modified to drive LEDs directly by tuning the model of the BJT transistor used (but I am nor an expert in SPICE modeling and it could take a while and most gates are based on MOSFT technology nowadays). So, I just think we should merge the new version of the single NAND part (not the multipart NAND gate) and the NAND example. It is a nice example and I could use the NAND gate to create interesting examples for the transitory branch.

@failiz
Copy link
Contributor Author

failiz commented Oct 20, 2024

@KjellMorgenstern , could you merge this PR? It will make my life easier and I think this spice code should be faster (4 transistors versus 5 transistors and 3 diodes of the previous spice) and more representative of the current technologies (I doubt that the gates now are using BJT transistors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants