Hot answers tagged

25

Chasing this answer down took a few different links, but it appears to boil down to this: 1. 4 differential pairs (8 wires total, but only 4 lanes). 2. 800 Mega Symbols a second. 3. Using PAM16, 16 symbols are used which translates into 4 bits per baud per lane. Given that information you come up with 4 bits*800 Mhz*4 lanes which results in 12800 Mb/s or ...


22

1. NAND offers less delay. As you were saying, the equation for delay is $$Delay = t(gh+p)$$ But the logical effort \$g\$ for NAND is less than that of NOR. Consider the figure showing 2 input CMOS NAND and NOR gate. The number against each transistor is a measure of size and hence capacitance. The logical effort can be calculated as \$g = C_{in}/3\$. ...


22

The context of this inline no-dependency delay is missing here. But I'm assuming you need a short delay during initialization or other part of the code where it is allowed to be blocking. Your question shouldn't be how to fool GCC. You should tell GCC what you want. #pragma GCC push_options #pragma GCC optimize ("O0") for(uint i=0; i<T; i++){...


21

I felt the need to give a non-blocking solution to the problem especially because we are talking about twelve hours of delay here. The util/delay.h library and its _delay_ms() and _delay_us() functions are the software delay functions. They are convenient in small programs and for quick prototyping and experimentation. They are simple and the accuracy ...


20

You're charging the capacitor directly from the battery. So the charging time is related to the product RC, where R is just the internal resistance of the battery. Try something like this: simulate this circuit – Schematic created using CircuitLab Here, I have split the base resistance so that the capacitor is charged through a large portion of it. ...


16

I didn't really buy this argument. All else being equal, simply increasing the supply voltage should not increase the small-signal gain, which is out of scope anyways since the 'amplifier' is being over-driven with digital signals. It really does. Don't think in terms of voltage gain, think in terms of output current: When you increase the supply voltage, ...


15

10G ethernet (as described by other answers) does not do signal transitions at 10 GHz, it uses multiple level encoding spread across 4 pairs to achieve 10 Gb/s. However, 10+ gigabit serial transceivers are quite common on high speed chips. For instance PCIe, USB3.1, thunderbolt, and similar protocols all use 10 gbit/s serial rate on individual pairs. You ...


14

Having used commercial circuits and built a few myself... The standard model rocket igniter takes a fairly hefty current to work. In the olden days, an incandescent bulb was placed ACROSS the launch button. In the modern era, an LED and resistor can be in the same place. The igniter will not ignite (and if, somehow, it did, it would only do so when you ...


12

Use a timer if you have one available. The SysTick is very simple to configure, with documentation in the Cortex M4 User guide (or M0 if you're on the M0 part). Increment a number in its interrupt, and in your delay function you can block until the number has incremented a certain number of steps. Your part contains many timers if the systick is already in ...


11

You need to go to the bank (which is just around the corner) and do your laundry. Going to laundry requires you to wait for the washer to finish, and then wait for the the dryer to finish. How would you go about performing these tasks? On a lazy day, you could just do the laundry and then go to the bank. It's not that important. Who cares. But on a busy ...


11

Depending on how you measure "simple", a small microcontroller is a good answer. Even the tiny PIC 10F200 can do this easily, and comes in a SOT-23 package. That's the same package single transistors come in, although it has 6 leads instead of 3. The only other part you need is the bypass cap. This circuit will be physically smaller than the one you show,...


10

while(1) { LATAbits.LATA5 = 1; //set pin as high __delay_ms(1000); //delay of 1second LATAbits.LATA5 = 0; //set pin as low } You don't let the LED stay off long enough for it to be noticed. You drive the pin low in the last line of the while loop. As soon as that happens, the execution goes back to the top of the loop. Immediately, you turn the ...


10

The Analog Devices / Linear Technology LT6993-1 (see circuit below) is a positive edge triggered pulse generator that has a resistor-programmable clock frequency and a resistor programmable divider value and polarity, with delays up to 33 seconds with ~3% accuracy. An internal A/D converter converts the DIV input voltage into an 8 bit divider selector and a ...


10

Not to detract from other answers here, but exactly what length delay do you need? Some datasheets mention nanoseconds; others microseconds; and still others milliseconds. Nanosecond delays are usually best served by adding "time-wasting" instructions. Indeed, sometimes the very speed of the microcontroller means that the delay has been satisfied between ...


9

simulate this circuit – Schematic created using CircuitLab Figure 1. Power-on indicator and buzzer additions. Simply add them in parallel as shown. BTW, congratulations on an excellent first post with correctly drawn and oriented schematic. simulate this circuit Figure 2. Time-delay function. As Wouter suggests, a time-delay adds some additional ...


9

The best way to handle this is to debounce the signal in software with your microcontroller. This is cheap, simple, and gives you maximum versatility in terms of your debounce algorithm. Here's an example algorithm (psudocode): if(input != input_debounced && debounce_timer == 0){ input_debounced = input; debounce_timer = 100; //don't flip ...


8

Repeat loops are only really any good for "rough" timing and for short periods. There are many factors that can effect just how long your loop takes: Clock frequency accuracy. 4 million clock cycles is only exactly 1 second if you have precisely a 4,000,000.00000000000000000000000000 Hz clock. Interrupts. If an interrupt occurs during your loop the loop ...


8

First, it's not really right to say that positive charges are holes in regular (not semi-conductor) metals. However, that's not the point here. You are OK thru the fourth diagram, but the 5th one is wrong. Think about it. Any affect at the far end of the line has to propagate to the near end before it matters there. The line being open matters first at ...


8

When you do analogRead internal capacitance of the MEGA 2560 are connected to the sensor and must be charge to the right voltage. Because your sensor uses a 220k pulldown your sensor has a large output resistance and recharging the internal capacitances can take some time, especially when there is a large difference between the voltages of two different ADC ...


8

No. The datasheet tells you what the bare part can do, already assuming very fast gate transistions. The test conditions are usually listed in the datasheet. Read it.


8

Here is the circuit: The rest is firmware. The passive pullup on the GP3 pin is enabled. The pin therefore goes low when the button is pressed and high when not. The firmware debounces this and puts the result on the OUT pin. Since debouncing includes a delay, you simply make this delay your desired 100 ms. Normally I use 50 ms debouncing delay, ...


8

Custom Silicon Solutions makes the CSS555C, which is a 555 timer married to a wide counter. It allows you to count multiple timer cycles to use reasonably sized resistors to generate really long delays. It has a trimmable internal capacitor to tune the delays, so it doesn't even need an external capacitor. The circuit below shows the multi-cycle ...


8

(1) Let us start with the PHASE DELAY: The response of a linear two-port to a sinusoidal excitation is an output signal with the same frequency w but with a phase delay \$ \phi \$: \$ V_{out}=V_{max} \times sin(wt+\phi)=V_{max} \times sin[w(t+\$ \$\phi\over w\$ \$)] = V_{max} \times sin[w(t-t_p)] \$ Here, the expression \$t_p=-\$ \$ \phi \over w\$ is a ...


8

You can implement an RTOS and replace the HAL_Delay for the equivalent Thread_Sleep function available. But the library doesn't look very complicated, you can probably pick any of the options and do it in equal time. A secondary MCU is almost never the right answer.


8

My guess is that your capacitor has the wrong (too small) value, or you connected a polarized capacitor with reversed polarity. It is also possible that the base resistor (33k) actually has a much smaller value. You need to verify that both of those components have the correct value and are connected properly.


8

I replaced the capacitor with another one (smaller cause that’s all I had) and it’s working so I guess my previous cap was defect.. Thanks a lot to all of you who took some time to help me


7

By hardware delays I meant 'Timers'. The advantage of using timers to realize a delay is that they provide a way to allow async counting. Using a "Software delay" you force the controller to put all its resources into processing some kind of loop (incrementing a variable until a given value) and thus blocking the rest of the code execution path. If ...


7

Using an LTspice simulation with 100 MHz 0.5 V peak sine wave input and the Figure 36 unity gain buffer (+/-5 V supplies), and a 20 pF load, I get about 130 ps. You can see from Figure 5 (in the datasheet) that it is much less than 1 ns.


7

simulate this circuit – Schematic created using CircuitLab There is a tolerance on Vt+ and Vt- that shifts withtemperature that will make the delays asymmetric. Also if the waveform is not repetitive, it will take 20% longer for the 1st edge. This is my approach if the delay tolerance is adequate. Since the Schmitt trigger thresholds are 1/3 to 2/...


7

Being curious myself I've made some simple measurements on a 32L152CDISCOVERY board. My test program consists of 4 tests, each displaying the elapsed seconds on the LCD. The difference between the test is what they do until a second elapses. The first test does nothing inside the loop. It's a pure "busy loop", spinning until a variable changes. The second ...


Only top voted, non community-wiki answers of a minimum length are eligible