Questions tagged [circuit]

In a programming context, a circuit usually refers to a combination of logical operators to achieve a desired response. Use this tag to ask about basic logical implementations and loops you can't get your head around.

In a programming context, a circuit usually refers to a combination of logical operators to achieve a desired response. This could be implemented in hardware (see: electronic/electrical engineering) but in software the key issue is the logic.

Use this tag to ask about basic logical implementations and loops you can't get your head around.

Logical operators include AND, OR, NOT, NAND and NOR gates, and judicious combinations of these can be used to construct just about any possible structures.

303 questions
3
votes
1 answer

How to detect oscillations in gate logic simulations?

I'm writing cycle based logic simulation in C#. I want to simulate both combinational and sequential circuits. Combinational circuits are straightforward but sequential circuits give me trouble. I want to detect oscillations and display appropriate…
Morfidon
  • 1,469
  • 1
  • 18
  • 34
3
votes
3 answers

Where does one start when programming an FPGA circuit?

Is there special hardware or software to program an FPGA? Can it be done in higher level languages? Does running an application on an FPGA "lock it in" to that execution path?
blakev
  • 4,154
  • 2
  • 32
  • 52
3
votes
2 answers

Circuit Design book for programmers

I need a book that teaches circuit design that will be useful when programming microcontrollers. Usually when I join a project, before I can start programming any logic into the microcontroller, it needs to be integrated into a circuit with a power…
Ted
3
votes
2 answers

Arduino Mini and WiFi shield -> not present (status 255)

I have an issue with the WiFi shield. As you can see in the picture below, I am experimenting with the Arduino Mini and the WiFi shield. I have read the tutorial-guide and connected all the necessary pins between the Mini and the shield. I use the…
Aureon
  • 387
  • 3
  • 4
  • 15
3
votes
1 answer

Digital logic - mealy state machines?

I understand the way Mealy state machines work - the output logic is now a function of not just the current state but of the input directly as well. But what is the advantage to this over Moore machines? Do people commonly use Mealy FSMs?
JDS
  • 16,388
  • 47
  • 161
  • 224
2
votes
1 answer

What does "no compatibility mode selected" means in ngspice and how to solve it?

I want to write the code for fullwave bridge rectifier with resistance as load and I wrote the following code. But it showed an error. It showed "No compatibility mode selected". This is the code I wrote. fullwave bridge rectifier *Specifying…
2
votes
1 answer

Why when i try to send heart rate values to real time database the sensor stops working arduino

I'm using NodeMCU and max30100 sensor module, everything works fine in the code until I add this line to loop() if (Firebase.ready() && (millis() - sendDataPrevMillis > 15000 || sendDataPrevMillis == 0)) { sendDataPrevMillis =…
2
votes
1 answer

Errors when using MCMT to create a multi control cz gate and trying to measure

Multi control cz gate: The error is saying that: [Experiment 0] Circuit mcmt contains invalid instructions {"gates": {ccz}} for "statevector" method. , ERROR: Circuit mcmt contains invalid instructions {"gates": {ccz}} for "statevector" method.'
2
votes
2 answers

How to write a constraint that depends on a condition in Circom?

I have code of the following form in Circom circuit compiler template DecodeUint(len) { signal input x; signal input pos; signal output value; signal output nextpos; component getV = GetV(len); if (x <= 23) { value…
Ilia Sidorenko
  • 2,157
  • 3
  • 26
  • 30
2
votes
1 answer

How to access array element with an "Unknown" index in Circom?

I have the following Circom (circuit compiler language) program: pragma circom 2.0.0; template MAIN() { signal input array[2512]; signal output d; signal v; v <== 168; d <== array[v]; } component main = MAIN(); I want to…
Ilia Sidorenko
  • 2,157
  • 3
  • 26
  • 30
2
votes
1 answer

Adding a new instruction to a MIPS

heyy, I study software so i'm absolutely new when it comes to drawing electrical circuits and I need to add a new instruction to This MIPS machine here The new instruction i have to add jt - jump table - is an instruction which makes it possible to…
Lynn
  • 121
  • 8
  • 25
2
votes
0 answers

Comparator circuit outputs error when equal Logisim

For a homework assignment I'm supposed to implement a basic one bit comparator which will be used in a larger circuit to compare two 4 bit numbers. I've implemented the one bit comparator but on the larger circuit, when the 4 bit values are equal…
James9oo0
  • 159
  • 12
2
votes
1 answer

How to find number of inputs for logic truth tables?

I'm a beginner to logic circuits and I'm trying to construct a truth table for a LED dice circuit. I've got 7 outputs in my table, 1 for each LED, but I can't figure out how many inputs I need. I've been told that the formula below gives the number…
MendelumS
  • 91
  • 1
  • 8
2
votes
1 answer

How can I implement a sequence generator using a universal shift register?

How can I implement a sequence generator that generates the following sequence 0000 1000 0001 0011 0110 1101 1110 1111 using a universal shift register? The shift register I need to use is the 74LS194 model shown below where the inputs S1, S0…
Peter
  • 460
  • 6
  • 23
2
votes
3 answers

Can I neglect the input current to an analog pin on an 8 bit Microchip PIC12F683?

I'm trying to measure ambient brightness values with a CdS light-dependent resistor (R2 in the below diagram.) R1 is a known value, and the resistance of R2 has an inverse log relationship with the current ambient brightness. I can use the voltage…
Isaac
  • 297
  • 2
  • 7
1 2
3
20 21