Questions tagged [timer]

Circuit to generate a signal a specific time after a trigger event. The timing can be defined by an RC time constant, or by clock pulses from an oscillator.

126 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
95 views

Timer activated by Reed on AC solenoid

Let me start by saying thank you for taking the time to read this - I really appreciate it! To the point: I am trying to create a 2-digit timer that resets and then starts at the activation of an ...
3
votes
0answers
988 views

Master-slave timing on ARM Cortex-M0

I have set up a slave timer that starts counting when the master timer is enabled. I want to know if the slave starts counting when the master timer receives a valid edge (my configuration is count ...
2
votes
0answers
55 views

Can't seem to properly generate a delay via timer

So I am trying to create a delay using a timer but doesn't seem like it's working as expected. With a clock of 16MHz and a prescaler of 1, it should take 10us to reach a count of 160 (unless I did ...
2
votes
0answers
77 views

Cortex-M DWT cycle counter inconsistent measurement

I recently discovered that it's possible to use a free running counter embedded in most Cortex-M4 cores to measure the performance of a chunk of code. I'm trying it on my LPC4370, where I want to ...
2
votes
1answer
130 views

SAMD21 1μs timer handler taking longer than the timer period?

Before I begin I'd like to mention that I'm relatively new to working with microcontrollers at this low level, so please bear with me. I am trying to use an Adafruit Trinket M0 to process and ...
2
votes
0answers
91 views

STM32F103 timer behaves differently after hardware reset instead of st-flash reset

I'm learning to program the STM32F103C8 Cortex-M3 (on a BluePill board) and was playing around with the general purpose timers (TIM2 to TIM5) because I wanted to time some routines. In my simple ...
2
votes
2answers
407 views

8051 baud rate calculator using 16-bit timer for software UART timing

I'm making a project in which pulsed laser beam data is sensed through many optical sensors (one sensor per port pin), so essentially, I'm going to be making 4 UARTs to sense this. Currently I am ...
2
votes
0answers
224 views

STM32L1 Discovery Kit 5MHz PWM Generation

I have been using the STM32L1 Discovery Kit with the STM32L152RCT6 MCU. A project that I am working on requires me to output two PWM signals. One of these is a 100KHz square wave and the other is ...
2
votes
1answer
1k views

What does TIM_OCMode do on STM32F4?

I'm making locked antiphase drive for motor control on STM32F4 board. Im configuring Timer4's 4 channels to be in pairs, ch2 inverse of ch1 and ch4 inverse of ch3. Each pair will control its own motor....
2
votes
0answers
5k views

STM32F4 HAL - PWM Phase shifting channels on the same timer

I've configured my STM32F407VG (STM32F4Discovery) TIM4 timer using the following code: ...
2
votes
0answers
302 views

ATtiny85, timer 1B does not work if COM1A1|COM1A0==0

I read the datasheet, and checked http://www.avrfreaks.net forum, but I cannot understand why on an ATtiny85: ...
2
votes
1answer
987 views

Achieving 32-bit timer resolution

I am trying to achieve 32-bit resolution using 16-bit timer on STM32F103. I found that ST provides an application note AN2592, however, I have two concerns regarding it: 1) I don't understand why are ...
1
vote
0answers
58 views

STM32 TIM2 changing prescaler in IRQ handler works strangely

I am trying to change a prescaler in the timer interrupt handler, and I expected the new value would become active for the very next timer delay. I mean that after the handler exits, the timer will ...
1
vote
0answers
12 views

Cadence simulation graph versus time

please do not know if there is a functionality in CADENCE in the graphs show differences in the times between them (make an average of two values). Regarding the delay of two waves [Automatically in ...
1
vote
0answers
56 views

What is the difference between TIMx_IRQHandler and HAL_TIM_PeriodElapsedCallback function?

I am a beginner, I am using the stm32F103 interrupt function TIM1_IRQHandler function to count, but HAL_TIM_PerodElapsedCallback can also achieve accurate counting, which one should I choose to use? ...
1
vote
2answers
280 views

555 PWM motor driver controlled by external analog signal

I used the below 555 timer PWM circuit to control the speed of a dc motor, and it works like a charm :) now i have a requirement to change the PWM speed externally from another module, that module ...
1
vote
1answer
49 views

M2P DMA transfer with trigger from a different peripheral

The microcontroller on my board is STM32F429IGT6 and I want to use a timer as a trigger of a DMA -e.g. HTIM_SOUND_SAMPLER- and transfer my data from an array to CCP of another timer -e.g. ...
1
vote
0answers
76 views

CircuitLab simulation of 555 timer - OUT HIGH always delivering 5V irrespective of Vcc?

I've scratched together a design for a 555 timer based driver for an IR540 MOSFET. But in CircuitLab the simulator shows the 555's OUT voltage is always 5V when high, for Vcc ranges 3.3V through 24V. ...
1
vote
1answer
128 views

One led is blinking too frequently using the hardware timer (stm32f103vdh6)

i recently started my internship using embedded C and i'm having some trouble with one of the tasks: Two leds should be blinking at 1Hz, one using the hardware timer, and the other one using the RTX ...
1
vote
1answer
337 views

How to disable timer on MSP430?

I am new to the TI MSP430G2553. I would like to send a PWM signal like in this picture: (Image source: Adafruit - Understanding Infrared Signals) However I can't do that, because I don't know how to ...
1
vote
1answer
75 views

Need help to identify this timer

This device is installed in our electrical panel which act as a timer to control the on/off operation for our LED billboard outside my office. I searched around the device for the brand and model it ...
1
vote
0answers
54 views

IoT wireless solenoid circuit

I am a Newbie and I do not have a lot of expirience. The circuit has been put together from pieces I have found on the internet. My goal is to develop a reliable wireless solenoid circuit to water my ...
1
vote
1answer
61 views

MSP430F2272: Timer B Capture giving shorter measures than the real ones

I'm using: CCS V8 MSP430F2272 DSO-x 2024A Agilent oscilloscope Trying to measure elapsed time between pulses with Timer B, Capture Mode. My square wave source is at 50 kHz and my timer_b clock at 1 ...
1
vote
0answers
40 views

Simple coountdown timer IC that is independant of supply voltage

I'm designing a shutdown circuit that switches off a SMPS regulator after a 10 second time interval. This is a battery powered application and the battery voltage could be anywhere between 7-15V. I'...
1
vote
0answers
82 views

556 circuit not working

I just got my 556 timers and I wired it up just like the 555 but now: it flashes one HighTime and stays off then... I used this calculator and basic diagram: http://www.ohmslawcalculator.com/555-...
1
vote
0answers
292 views

STM32F407 - how do I run one motor at a time? Why do they ignore delays..?

I'm a newbie. I'm using an STM32F407 discovery board, and I want to control 6 stepper motors using PWM, especially OPM(One Pulse Mode). Till now I've made 3 stepper motors work using Timer 8 (CH1, ...
1
vote
1answer
59 views

Simple residential blower control

Basic question is: Is it permissable / safe to connect a $10 plug in timer relay with potential for backfeed from a second source? 20 watt fan being switched. This is a SIMPLE question, compared to ...
1
vote
1answer
59 views

Problems with dividing a clock with 2 command bits

I am trying to make a clock divider commanded by 2 bits :DTPS. For instance if DTPS is: "00" we get the clock as output(2^0) "01" we divide the clock by 2 (2^1) "10" we divide the clock by 4 (2^2) "...
1
vote
0answers
263 views

STM32F4 OC Clock Jitter

I am using STM32CubeMX to configure an STM32F4 to output a clock signal using Timer 3, Channel 4 on PC9. I have read in the datasheet PLL section that jitter shouldn't be more than 15ps RMS but I am ...
1
vote
2answers
245 views

How to replace an LED with a diode and stop LED after timer ends?

So I have been working on this circuit that basically will activate an LED when the lux levels drop low enough. The time that the LED will remain active for is determined by VR4. I'm having two issues ...
1
vote
0answers
230 views

How to vary the range of a potentiometer…is this even possible?

I am a total noob so apologize if this doesn't belong here but I haven't had any luck finding an answer to this... I have a simple circuit with two 555 timers...similar to an Atari Punk Console. I ...
1
vote
1answer
129 views

Aircraft Starting Mockup Display With Buzzer Question

I am stuck in the middle of building a circuit for an aircraft starting mockup that will train our students to correctly start the aircraft without accidentally re-engaging the starter and thus ...
1
vote
1answer
777 views

Control a 12 v circuit using wall plug 220v ac timer

I want to use a standard supermarket 220v ac timer to switch a 12-volt circuit. I was thinking about letting the timer run on the outlet, and just desolder the relay separating it from the ac, keeping ...
1
vote
0answers
1k views

STM32F107 generate PPM signal

I need generate special signal PPM for my rc toys, for example: I'll use stm32F107 and I would use a timer which will be a resolution of 0.1us. The web is a lot of examples to generate the PWM signal ...
1
vote
0answers
686 views

How to set MSP430 Driver Library timerA configurations

I am using MSP430F5529 and MSP430 Driver Library. As you can see, I set upMode timer configuration, compare mode configuration and enabled the initial interrupts. However, timerA interrupt is not ...
1
vote
0answers
46 views

Only allowing input after x amount of time

I've been given a problem to solve - When the input is high (sensor), a timer should start which outputs high for 10 minutes (camera active). After 30 minutes, if the input is high, the process ...
1
vote
0answers
128 views

pic timer triggers twice

I'm programming a pic18f24k50 using Timer0 to trigger an interrupt every 5ms. I'm handling USB interrupts too Here is the code where I init the timer: ...
1
vote
0answers
329 views

PIC12F simulator: Why isn't the oscillator running?

I have written firmware for a PIC12LF1572 that I am testing in the MPLAB X simulator. The program runs and correctly responds to stimuli, except when it needs to wait for a timer interrupt. After a ...
1
vote
0answers
59 views

Circuit that takes input signal and controls led

I am trying to design a circuit that compares a recorded signal to a stock signal. If they are not similar it then inputs a signal into a circuit which will change the pulse of the led to stimulate a ...
1
vote
1answer
499 views

Using a diode or resistor, to supply minimal voltage to LED Driver (Help!)

I'm using a dual 60W LED multi-chip pendant lighting (a.k.a. "high bay" pendant light with two 60W LED chips). This light is using an RGB driver (one per multi-chip) that has a remote control to ...
0
votes
1answer
15 views

STM8 alarm firing shortly after resetting time

I'm using an STM8L151F3 with the SPL, compiled with SDCC. I'm trying to generate an alarm interrupt after n seconds, then another after m seconds. To do that, I reset the time to 0, then set the alarm ...
0
votes
0answers
26 views

Will this “off delay” circuit work if a continuous trigger is applied to pin 2?

This is an off delay circuit using a 555 timer. I want to know if this can be used even if the trigger signal is continuous. If, not what modification is needed?
0
votes
1answer
25 views

Advice on setting up sensor switch

Hi I would like to fit a (motion sensor/IR sensor) sensor switch to a machine in my catering van. The machine is a 12v machine. I would like to start the machine using the sensor switch and would like ...
0
votes
0answers
40 views

wiring for my timer switch

I'm trying to wire as per the following wiring diagram. I completed wiring as below, and timer is switching on, but at the programmed time, light is not switching on, anything wrong with wiring. See ...
0
votes
0answers
62 views

simple way to get a single pulse using a cd4060?

Wondering what what be the easiest (least component count/passives only) of getting a single pulse from a CD4060? Looking for a delay of about 10 seconds generating a single pulse of about .25 second ...
0
votes
0answers
30 views

ADC Triggering with TIM3 TRGO running in PWM mode in STM32F446

I have been trying to trigger an ADC using TIM6 with TRGO signal in STM32F446RE board. I am unable to do it. I have used CubeMX initialization and have been trying to use the HAL libraries for ...
0
votes
0answers
37 views

STM32 timer with DWT problem

I'm using STM32F103.I'm trying to make a code that run every second. here is the code ...
0
votes
0answers
41 views

Hardfault or otherwise wonky timer behaviour - STM32 Cortex M7

I am using the line marked by the arrow in the code below as such and it works fine. If I uncomment // HAL_TIM_IRQHandler(&htim2); there is one hit on the ...
0
votes
2answers
42 views

Why can a capacitor connected to ground in a 555 astable circuit change pin 2s output?

beginner here. Basically my question is exactly as it says in the title. I was watching a video ( https://youtu.be/qfWIjb48mjE ) about 555 timers and was wondering how the capacitor can change the ...
0
votes
0answers
67 views

STM32F303 timer interrupt randomly caused if started in main loop

I am experiencing a really odd behavior of the STM32s timer interrupt. I have two timers. tim3 runs at a fixed 40 Hz and calls a registered function if updated. tim2 is started after tim3 caused an ...