-
Notifications
You must be signed in to change notification settings - Fork 59
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
More examples of IC based circuits? like IC pin layout, breadboard diagrams #665
Comments
I'm sorry for your lack of time; probably this is a show-stopper. You can use some graphically oriented program, like for example XCircuit: http://opencircuitdesign.com/xcircuit/ (there is no https available, unfortunately). If you still want to try with circuitikz: for the first problem (overlaying the circuit on the chip) I have an example that I can post (not now, I have no time --- but you can ask in https://tex.stackexchange.com/questions/tagged/circuitikz (be sure to read the rules and post a minimal example!). For the second problem you can start from here: https://tex.stackexchange.com/questions/493239/alignment-of-dip-chips-in-circuitikz I will close this issue now, because as stated in the README:
|
I found the code, pasting here with no comments... documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usepackage{mathpazo}
\usetikzlibrary{shapes.symbols, backgrounds, fit}
\usepackage{stackengine}
\DeclareSIUnit{\uF}{\micro\farad}
\DeclareSIUnit{\nF}{\nano\farad}
\ctikzsetstyle{romano}
\begin{document}
\begin{tikzpicture}[]
\draw (0,0) node[dipchip, rotate=90, anchor=pin 8, circuitikz/chips/scale=1.5,
no topmark, draw only pins={1,2,4,5,7,8}](AD835){}
(AD835.north) node[above, rotate=90]{\texttt{AD835ANZ}};
\begin{scope}[on background layer={color=gray}]
\node [mixer, circuitikz/blocks/scale=0.7](M) at([xshift=-0.3cm]AD835.center) {};
% 2.25 is 1.5*1.5 (chip scale * NL/2
\node [muxdemux, muxdemux def={Lh=2.25, NL=3, Rh=0.8, NR=1, w=0.8, NB=1},
external pins width=0, rotate=-90, anchor=blpin 3](DX)
at ([yshift=-3mm]AD835.bpin 8){};
\node [font=\tiny, below=-1mm] at (DX.blpin 3) {$+$};
\draw (DX.blpin 3) -- (AD835.bpin 8) (DX.blpin 1) -- (AD835.bpin 7);
\node [font=\tiny, below=-1mm] at (DX.blpin 1) {$-$};
\node [muxdemux, muxdemux def={Lh=2.25, NL=3, Rh=0.8, NR=1, w=0.8, NB=1},
external pins width=0, rotate=90, anchor=blpin 1](DY)
at ([yshift=3mm]AD835.bpin 1){};
\node [font=\tiny, above=-1mm] at (DY.blpin 1) {$+$};
\node [font=\tiny, above=-1mm] at (DY.blpin 3) {$-$};
\draw (DY.blpin 1) -- (AD835.bpin 1) (DY.blpin 3) -- (AD835.bpin 2);
\node [muxdemux, muxdemux def={Lh=3, NL=3, Rh=1, NR=1, w=1, NB=1}, external pins width=0](A)
at([xshift=0.7cm]AD835.center) {};
\draw (DX.brpin 1) -- ++(0,-0.2) -- (M) (DY.brpin 1) -- ++(0,0.2) -- (M) (M.e) -- (A.left)
(A.right) -| (AD835.bpin 5) (A.bbpin 1) -- ++(0,-0.2) -| (AD835.bpin 4);
\end{scope}
\end{tikzpicture}
\end{document} |
I'll add the previous example to the manual, reopening as a documentation issue. |
wow, thanks a lot for these. this issue was meant as a documentation issue in the first place :cute_wink:
Continued:
|
I am making some progress using the example u provided. thanks a lot for that. do u mind me posting my investigations on that here? |
Investigations:To-Do:
Current level of Abstraction: 4
Update: 2022.12.04 Input:
\usetikzlibrary{shapes.symbols, backgrounds, fit} % Have not tried to minimize further
...
\begin{tikzpicture}
...
\begin{scope}[on background layer]
... <overlaying circuit content goes here>
\end{scope}
\end{tikzpicture} |
Like this? \documentclass[border=10pt]{standalone}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}[]
\draw (0,0) node[dipchip, rotate=90, anchor=pin 8, circuitikz/chips/scale=1.5,
circuitikz/multipoles/external pins thickness=2,
circuitikz/multipoles/external pad fraction=4, hide numbers,
no topmark, ](AD835){}
(AD835.north) node[above, rotate=90]{\texttt{AD835ANZ}};
\foreach \i in {1,...,4} \node[font=\tiny\ttfamily, below] at(AD835.bpin \i){\i};
\foreach \i in {5,...,8} \node[font=\tiny\ttfamily, above] at(AD835.bpin \i){\i};
\begin{scope}[on background layer={color=gray}]
\node [mixer, circuitikz/blocks/scale=0.7](M) at([xshift=-0.3cm]AD835.center) {};
% 2.25 is 1.5*1.5 (chip scale * NL/2
\node [muxdemux, muxdemux def={Lh=2.25, NL=3, Rh=0.8, NR=1, w=0.8, NB=1},
external pins width=0, rotate=-90, anchor=blpin 3](DX)
at ([yshift=-3mm]AD835.bpin 8){};
\node [font=\tiny, below=-1mm] at (DX.blpin 3) {$+$};
\draw (DX.blpin 3) -- (AD835.bpin 8) (DX.blpin 1) -- (AD835.bpin 7);
\node [font=\tiny, below=-1mm] at (DX.blpin 1) {$-$};
\node [muxdemux, muxdemux def={Lh=2.25, NL=3, Rh=0.8, NR=1, w=0.8, NB=1},
external pins width=0, rotate=90, anchor=blpin 1](DY)
at ([yshift=3mm]AD835.bpin 1){};
\node [font=\tiny, above=-1mm] at (DY.blpin 1) {$+$};
\node [font=\tiny, above=-1mm] at (DY.blpin 3) {$-$};
\draw (DY.blpin 1) -- (AD835.bpin 1) (DY.blpin 3) -- (AD835.bpin 2);
\node [muxdemux, muxdemux def={Lh=3, NL=3, Rh=1, NR=1, w=1, NB=1}, external pins width=0](A)
at([xshift=0.7cm]AD835.center) {};
\draw (DX.brpin 1) -- ++(0,-0.2) -- (M) (DY.brpin 1) -- ++(0,0.2) -- (M) (M.e) -- (A.left)
(A.right) -| (AD835.bpin 5) (A.bbpin 1) -- ++(0,-0.2) -| (AD835.bpin 4);
\end{scope}
\end{tikzpicture}
\end{document} (I reduced the dependencies, too).
I learnt by perusing StackExchange and the TikZ manual. About |
Code for drawing the pin layout diagram of IC- 74x08 :Update: 2022.12.04: Further modifications to this code will be posted in a new comment after #665 (comment) |
Output | Reference |
---|---|
The image preview of output here is scaled down to save space, and deliberately made for ANDs.
Comparing with the reference/target image, it's awesome.
Further thoughts:
Any suggestions (code, implementation, or graphic, or anything else) is welcome
In the previous attempt with parametrization,
- it required arithmetic on the pin selection (for anchors and such)
- and i haven't yet figured out how to do arithmetic properly in LaTeX.
- The
\*expr
(numpexpr, dimexpr etc) are always shown invalid in horizontal environment lol - so, do you know how can i do arithimetic in latex?
PS:
- How did you get the output in the image format - like did you convert the pdf into png, or directly output to png? In either case, how (just a brief summary like)?
- Remaining major things from my side is just the breadboard, and the alignment of these obtained figures on the page (the need might arise to use it with multi-column layout which i am not familiar with) - but i am positive that i'll figure those things out now 😜
For Inclusion in the documentation as example:
- if this one seems good to you (i.e. worthy of addition in documentation - examples),
- then i will be happy to discuss it with you as i am thinking it's scope can be expanded a bit more if it were to be included there like:
- highlighting one gate (just to showcase that as an example)
I will get back to you with comments as soon as I finish the paper submission I'm in (for not having time, this is quite impressive 😉 on your side). About the arithmetic, if you show me an example I can help. Often the problem is expandability... You can check |
haha, thanks 😃 for clarification, i meant that - i can not get enough relaxed time to calmly dig through stuff for solutions, and do experiments with their validity and applicability to my use. Mental Bandwidth or mental processing power would have pro'lly been a better term there instead of just time - but i guess that sounds a bit showoff i guess 😅 |
plus, i gotta say, the documentation of Tikz is sometimes a bit - umh - ambiguous or unclear, for example,
detailed citations/quotes in the hidden comment below: |
This comment was marked as off-topic.
This comment was marked as off-topic.
I'd love to follow up more, but you got me in a crossfire of deadlines in my job.... Yes, the TikZ manual is somewhat cryptic sometimes, but lately development is quite active so you can PR suggestions.... Once you untangle the source format, that is. About the PNG conversion: mine are just bitmap copy and paste from Definitely I'd like to add your example to the manual! |
it's okay, take your time to participate in real life.
thanks. aweesome. |
...or if you want and you are in the mood, you can even do it as an "advanced tutorial". Whatever you prefer. I can just take the code (and attribution --- please tell me exactly how you'd like to be cited) and add to the examples, or wait for a PR on your side. |
wow, they worked out of the box: |
Status tracking for further and more involved abstractions/cleanups per the remark mentioned at comment: #665 (comment)
|
I have gathered quite a lot of good points on tackling a good amount of logic symbols. 'am very excited to put them in a tutorial. however, have exams at hand at the moment which will continue uptill 1 month at least. will do it thereafter. |
just for records, i was thinking about TikZ styled tutorial - the walkthrough in a third person story type. it allows incorporating various "loose" tips and "reason behinds" as well. but i was a bit unsure about how deep it will be, as i was thinking of starting from start, so before section 2.1 a current shunt (of Circuitikz tutorials), but its body will not touch much the contents of sections 2.1 to 2.3 transistor based amplifier, but then it will contain much more depth content than section 2.4 A logic circuit the thing i am wondering about is how we will communicate regarding the order - ideation will require more commits, which will require cleanup. but i just know how to commit - that's pretty much all i know in git. so, when we get to it, will you handle the commit cleanup part? the rebase / squash commit etc 😅 as i don't want to pollute the commit history... anyways, that's enough rambling for now 😅 , i just wanted to put these thoughts out here |
Yes, I can help --- as long as you do the changes on you branch, you can even reorganize it and force push --- until the thing is merged, no harm is done (I force push quite a lot when I am developing, you can see that). I am not a git-uber-user too, I just do the basic things (the interactive rebase is the best tool ever), especially if you want to "follow" the development. One suggestion: you can develop it in a separate file --- I do the same when preparing part of the manual. You can add a file in your clone with the following content: documentclass[]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[siunitx, RPvoltages]{circuitikz}
\usepackage{ctikzmanutils}
\makeatletter
\makeatother
\begin{document}
\section{Dummy sec}
\subsection{Dummy subsec}
\subsubsection{Dummy subsubsec}
\begin{groupdesc}
\circuitdesc*{bnc}{BNC connector}{}(left/135/0.6, right/45/0.6, center/-45/0.6, hot/0/0.6, zero/-135/0.6, shield/-90/0.4)
\circuitdescbip[cuteopenswitch]{cute open switch}{Cute open switch}{cosw}(out/45/0.2)[out.s/-90/0.2]
\end{groupdesc}
\geolrcoord{bnc}
\begin{lstlisting}[varwidth=true]
A one
B two
C three
\end{lstlisting}
\begin{LTXexample}[varwidth=true, basicstyle=\small\ttfamily]
\begin{circuitikz}[european]
\draw (0,3) node[nand port](A){}
(A.out) to[short, *-o] ++(0.5,0);
\end{circuitikz}
\end{LTXexample}
\end{document} which load the same setup used in the manual, and then merge it when it is more or less finished in the main Anyway, I will help with |
Hi @goyalyashpal, @gro1m --- I was thinking about all this, especially after seeing #784. While I think that adding a background image to a generic chip (like I implemented for On the other hand, a package that extends TikZ for that specific usage would be a great thing. I do not know how much of the internals of Notes: ¹ really, it should be improved to be able to use generic, high-level tikz code for the drawings that can use the anchors of the component. Moreover, it should be added to chips. Again, I have little time on my hands now, and I am not sure on how to do it ( |
Current:
I want to be able to do:
Background:
* however i have read following things (click me)
The text was updated successfully, but these errors were encountered: