Questions tagged [if]
20 questions
8
votes
4 answers
ltspice .param if statement
Super simple question here. Is it possible to use an if statement in a .param LTSpice directive? If so, what is the syntax? Shown below does not function.
Note that the .step function can not be used for my purposes, to the best of my knowledge,…

Brian Dohler
- 651
- 1
- 4
- 11
5
votes
3 answers
Intermediate frequency
I'm a newbie to communication systems and circuitry. I was going through superhet receivers while trying to undertand AM/FM/DAB receiver architecture. For FM, IF is fixed to 10.7 MHz and AM 455 KHz. Once the carrier wave is shifted to this IF…

Gomu
- 243
- 1
- 6
4
votes
6 answers
How to remove multiple if else to handle data easily
I am doing a project which has a custom made board based on PIC32 MCU. It has 30 Inputs and 10 Output. I have to monitor inputs and send there information to UART. Each inputs is defined a code. For example: if input 1 is ON,then data to be send is…

user007
- 409
- 1
- 8
- 18
2
votes
1 answer
Handling large number of inputs in PIC microcontroller
I am interfacing PIC32 MCU with 24 inputs and UART. When any inputs comes, this data is transferred to PC via uart. I am using multiple if condition like
if(input1==high)
{
putsUART("input 1 ON\n");
}
if(input2==high)
{
putsUART("input 2…

Aircraft
- 1,666
- 1
- 12
- 26
1
vote
1 answer
Vintage Pocket Radio Transistor Replacement is Oscillating
I have an old pocket radio which uses silicon NPN transistors for the mixer and IF stages. I replaced 2 of the IF transistors and the unit functions, but the new transistors are faster than the old vintage parts. I’d like to hear any recommendations…

K Chapman
- 11
- 2
1
vote
1 answer
Nesting Elseif, If, Else in VHDL
In the code below, I want to pull out statements surrounding the the ** asterisks ** below.
stateS0 = 1' and o_done = '1'
and
o_done = '1' and stateS0 = '0'
into separate comparisons using if or elseif.
I am struggling at how to pull out and…

user4434
- 157
- 11
1
vote
1 answer
Using TL071 at 455 kHz
I'm experimenting with op-amps and ceramic filters at 455 kHz. I chose TL071 because it was readily available and the datasheet specified a slew rate of 13 V/μs and a GBW of 3 MHz. But in the datasheet it shows that the large signal differential…

User
- 839
- 4
- 21
1
vote
3 answers
Instantiating module in condiotional block verilog
Considering a module cannot be instantiated inside if block, how are we supposed to instantiate the module outside the if-else block, keeping in mind that the inputs given to module in if and else blocks are different?
Problem:
if(sel==0)
moduleex…

Pritam Mishra
- 13
- 4
1
vote
1 answer
Microwave - Standard Intermediate Frequency?
VHF/UHF receivers use one of a few standard intermediate frequencies. Is there a similar set of standard intermediate frequencies for microwave (around 3GHz) receivers?
As I understand it, the choice of IFs usually comes down to what filters are…

blamblambunny
- 213
- 1
- 8
1
vote
2 answers
Working with RF Amplifiers for the first time
I'm designing a circuit to use an IF amplifier, specifically the ADL5536, to amplify the signal of an SiPM array consisting of the MicroFJ-60035 TSV SiPM by SensL. My goal is to use this amplifier to boost the output of a multiplexed array of SiPMs.…

BestQualityVacuum
- 456
- 7
- 32
1
vote
2 answers
How does an "if" statement and "always@" statement work in Verilog?
I'm trying to program an 8 level stack register for a Program Counter. It is working well enough, but for some reason, when I test it, some combinations of inputs produce unexpected results. This is leading me to believe that I don't really…

Eddysanoli
- 121
- 1
- 6
1
vote
4 answers
How does IF remain constant in a heterodyne receiver after mixing?
Below is an illustration about heterodyne principle:
I can see the motivation behind heterodyning. I read that it is basically done to obtain a "fixed" frequency for the amplifiers at different incoming tuned RF carriers. But look at for instance…

user16307
- 11,802
- 51
- 173
- 312
0
votes
0 answers
FreqCount.available() only returning false
I am a novice Arduino user trying to measure the frequency output of my HTF3228LF humidity sensor using the library FreqCount on my Arduino Teensy LC.
My circuit connects the output of my sensor to a voltage divider to cut the HIGH voltage from 5V…
0
votes
3 answers
Running IF only once
O holy simplicity. I've seen lots of solutions for this but none that will fit to my scheme.
First of all, lets add simple code:
void setup() {
pinMode(0, OUTPUT);
pinMode(1, INPUT);
}
void loop() {
int a=digitalRead(1);
if(a==LOW) {
…
0
votes
1 answer
VHDL using 'if' to compare a 'variable'
Using Xilinx, I need to compare a 'variable' called 'row', defined as:
variable row : std_logic_vector(2 * n - 1 downto 0);
This line was given to me, now I need an if statement that will execute if row is = 1.
I have tried:
if (row = "1")…

Luca Ruggier
- 3
- 1
- 2