Wikipedia:Reference desk/Archives/Computing/2017 December 10

= December 10 =

Programming vs. designing electronic circuits
How far is designing electronic circuits from writing programs? Couldn't the former be conceived as a kind of functional programming task where the signal has to move through several functions (electronic components) to output a result? It reminds me of the Unix pipeline. But is there any programming language that has built-in functions equivalent to components like transformers, resistances, capacitors and so on? --Hofhof (talk) 13:12, 10 December 2017 (UTC)
 * A typical example is an Engine control unit. A CPU follows a program, reading measurements and setting counter values read from a table in memory into a circuit which can be compared with a signalling control. In this example, the train is the cramshaft sensor. Values in the table are the ignition timing, begin and end of injecting fuel on each cylinder. The signalling control device is made in VHDL, the firmware in the CPU is C or assembler. -- Hans Haase (有问题吗) 13:40, 10 December 2017 (UTC)
 * (ec)There are various hardware description languages that are used as part of Computer Aided Design tool chains. Verilog and VHDL come to mind as the most prominent examples for digital designs, but both have extensions for analog design. I'm pretty sure there also are dedicated languages for analog design. --Stephan Schulz (talk) 13:41, 10 December 2017 (UTC)
 * SPICE is the best-known circuit simulator for analog design. See also Category:Electronic circuit simulators. Tevildo (talk) 20:50, 10 December 2017 (UTC)


 * The two used to be very similar. Many many years ago, I maintained Litton Industries radar systems. Computers were becoming popular, but PC networking was still lacking. So, there were programmers. I wrote programs for DOS, Windows, and even the Commodore 64 in C. So, I knew how to program. Mainly, I worked on electronic circuits. Radars were a weird beast. The incoming information was analog. The output was an analog radar display with many digital lights and buttons. The circuitry in between was mostly logic circuits. The way I worked on it was by rewriting the logic circuits programming. Example: If the user presses the track button and the touch-screen coordinate matches a track coordinate, then enable the track display circuit. It took a couple months, but I rewrote the entire mess of over 50 circuit boards as a single program. As a result, when something very odd would happen, such as a 6 constantly showing up in the track number, I could look at the program and identify what logic could cause that problem. Then, I limit the scope of the problem to a few components and go in and fix it. That was the end of this type of work though. Once I had the program completed and I showed it to the Litton engineers, they started replacing all the circuits with a single computer. Three years later, all circuits were gone and it was just a computer. 209.149.113.5 (talk) 13:33, 11 December 2017 (UTC)