# 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.

721 questions
11k views

### How to synchronize two microcontrollers to micro-second accuracy?

I need to synchronize two micro-controllers so that they can measure the speed of propagating waves. The time delay measurements need have microsecond accuracy (error less that 1/2 of a microsecond). ...
7k views

### Why would a modern digital clock rely on mains frequency?

I am in the military, stationed in Djibouti, Africa. We generate 240V/50Hz power on base, but some buildings also have 120V outlets, which I assume is transformed somewhere else on base, probably at ...
4k views

### Why are 555 timers so prevalent? [closed]

I've noticed is that 555 ICs seem to be extremely common. Why is the 555 so prevalent, or ubiquitous; what about it so useful?
7k views

### How would I go about getting a small oscillator running at precisely 31,891,269,116 µHz?

I am looking to build an RTC module for Arduino that runs on Mars time. The conversion factor is 1.0274912510 Earth seconds to 1 Mars second. Whilst I have managed to accomplish this programmatically ...
2k views

### Are my theoretical power consumptions of this avr correct?

After being inspired by a simple ATMEGA 168 based darkness alarm that has a theoretical life span of 3 years on batteries utilising sleep mode, I had decided to make something similar of my own (a ...
2k views

### Low power, low voltage, slow (0.1Hz) oscillator?

I had the opportunity to analyze a very interesting circuit today using a programmable unijunction transistor as a timer. The power supply varies, and the circuit must operate on under 10uA of ...
11k views

### 555 timer: how to set values to take an hour

I'm new (and novice) in electronics. I came to seek your knowledge to see if someone can help me with a very basic circuit. It is a 555 chip, which should light a LED (for about 1/2 second) every ...
10k views

### Monitor clock cycles for code on arduino/AVR?

Is it possible to monitor a block of code and determine the number of processor clock cycles that code took on an Arduino and/or AVR atmel processor? or, should I rather monitor microseconds passed ...
5k views

### Need help understanding AVR ATMEGA / ATTINY timer mirrored output

I am trying to use Timer1 of Atmel AVR microcontroller, either AtMega328 as used in the Arduino, or the ATTiny85, to output two clock signals which are mirror images of each other. The frequency I am ...
1k views

### Missing Q11 output on 4060

Is there any reason why Q11 is left out on 4060 IC? I've read it was done to extend the max pulse time (highest clock divider) but why was it done on Q11? Why not Q12 and therefore have a full 8-bit ...
10k views

### Can I achieve a one shot button without a 555?

I have a complex circuit, but my problem only relates to one small part. I have a relay, which is energised by pulling the low side low using an NPN. I would like a pushbutton to operate the ...
1k views

### AVR timer speedup on ATmega328

When running at clock prescaler of 64 on ATmega328, one of my timers speeds up for unknown reasons at a particular time in the execution. I am using two timers on ATmega328 to generate the clocking ...
3k views

### 6 Month Countdown Timer Circuit

I need to design a timing circuit. After a duration of 6 months a LED must come on. The LED can then be turned off at the press of a button and the 6 month count-down must begin again. Anyone have ...
9k views

### Watch Dog Timer + Arduino

How do I setup a hardware watch dog timer with an Arduino?
2k views

### Which of these approaches for a watchdog timer?

I recently learned about watchdog timers, and am trying to implement one for my circuit for the purpose of resetting my (AVR) microcontroller if it hangs (i.e., doesn't respond to the watchdog). ...
4k views

### Suggest a timer chip

I need to take voltage measurements separated by long delays (couple of hours) and beep a buzzer when voltage level is met. Power consumption is important. What I want is a simple timer chip like ...
3k views

### Which is better for the 555, a smaller capacitor or a larger one?

As I understand it, there are many ways to combine two resistors and a capacitor to give the same time characteristics in a astable 555 setup. My question is which is better, a larger capacitor or a ...
13k views

### arduino : delaymicroseconds()

How does the delayMicroseconds() function works. From what I understood the prescaler of timer0 is set to 64. For a 16MHz clock gives 4.0uS per count. I am a bit confused on the math to get to 1uS ...
1k views

### Simon Says without Microcontroller

I'd like to create the classic game of Simon Says utilising nothing but logic circuits, LEDs and ICs, no Microcontrollers like the Arduino. I would like to use 4 LEDs and 4 Tactile Switches for this ...
2k views

### Arduino for time lapse photography

How would i set up an Arduino to do time lapse photography?
15k views

### STM32: Timer interrupt works immediately

This is code for timer in my project on STM32F429: ...
2k views

### Using Timer0 overflow to gate Timer1 on PIC12F1822

I am trying to use TMR1 to count TMR0 overflows. To do this I am using TMR1 with gate ...
801 views

### Triggering for geophone triangulation

I'm using three geophones to triangulate impact events inside the triangle, e.g. a mallet hitting the floor. Since the magnitude of the event is unknown, the position is calculated only by the timing ...
6k views

### purpose of diode in this 555 timer application

I'm a newbie in electronics. I need to make a 555 timer base circuit(Refer to the schematic below) such that O/P pin of 555 is held LOW by default at power on, and the I/P pin is held initially at ...
1k views

### Difference between internal and external oscillator for a microcontroller?

I am a beginner with respect to microcontrollers, so I just want to ask is there two option for choosing the frequency of the microcontroller: to be internal or external? If there is internal ...
5k views

### Reading a 16-bit timer on an 8-bit MCU

Since an 8-bit MCU can't read the whole 16-bit timer in one cycle, this creates a race condition where the low-word can roll over between reads. Does the community have a preferred method of avoiding ...
7k views

### Random time timer

I'm constructing a simple circuit that beeps a beeper on a given time interval, using a 555 timer. Is there any simple way to randomize the time on the 555 timer between two given intervals, say, any ...
709 views

### Inaccurate timer interrupt STM32

I wrote a simple program to toggle an LED on and off using the TIM1 interrupt on an STM32F0 discovery board. CLK Freq = 48MHz Prescalar = 48000 Auto Reload Register = 1000 Using the following ...
7k views

### High resolution timer on the BeagleBone?

Is there a high-resolution timer (microsecond resolution or better) available on the BeagleBone (TI AM3358 ARM Cortex-A8 based) development board?
4k views

### Is 555 timer good to generate 20MHz clock?

I am looking for a way to generate 10 to 20MHz TTL-compatible clock signal. I used something like microchip unit to produce clock signal before in school but I didn't use any other way to generate ...
21k views

### PIC: how to set timer0 to give an interrupt at every 1 sec?

I am programming a PIC18F67K22 and I've set it to use a 16X4Mhz Internal RC oscillator with PLL enabled. High level interrupt on TIMER0 overflow I am using MCC18 ...
518 views

### Nanosecond interrupt accuracy on a 64MHz microprocessor

I am currently designing a PCB with a 64MHz nRF52832 bluetooth MCU. I have an interrupt connected to this MCU which needs to be detected with 1-3 nanosecond accuracy. Unfortunately, the 64MHz MCU has ...
11k views

### Problem with 555 timer and 4017 counter

simulate this circuit – Schematic created using CircuitLab I'm attempting to make a circuit that flashes each LED sequentially. So far my 555 timer works just fine and gives me a pulse about 3x/...
8k views

### Calculate exact timer frequency for ATTiny

Trying to wrap my head around these overflow timers for the ATTinyx5 (45 in this particular case). I seemed to have a great handle on it with the ATMega328 but I cannot get it to work the way I want ...
318 views

### Detecting DMA overflow in arbitrary waveform generation

I'm generating a complex series of pulses on an STM32F103, essentially as described in the ST app note AN4776 General-purpose timer cookbook, section 5.3. As a quick summary, that means I'm using the ...
1k views

### Turn a mains light on slowly

I've been looking at creating a simple circuit to slowly turn a halogen daylight bulb on over about 30 minutes as soon as power is supplied to simulate dawn. I've got a 240VAC 42W halogen bulb that ...
620 views

### Is the datasheet of the AVR ATmega32 wrong?

I'm currently using an ATmega32 to keep time, so I carefully read the datasheet and configured the Timer 1 to generate an interrupt each second. According to the following formula on the datasheet, ...
15k views

### Software delay vs hardware timers

Working with a micro controller, on which exact conditions should we choose between Hardware timers and Software delays on an Embedded Controller? I have seen articles which do emphasize on use of ...
29k views

### How to calculate the time of one single tick on microcontroller

I have been in Embedded system for 8 months. I have worked application part more compare with low level. I have basic questions on systems ticks, How to calculate the system tick of Timer, if I am ...
54k views

### 0-10 second on-time with a potentiometer

I would like to make a simple circuit, where the a potentiometer controls a 0 - 10 second on-time. If the potentiometer is set to min, the on time should be 0 seconds. If the potentiometer is maxed ...
1k views

### Sync video with data

When I have a datalogger and I want to sync a video-file to the recording, what would be an easy method? The logger and the camera both have an internal clock, but they may not be set exactly to the ...
2k views

### PIC Microcontrollers, ambiguous quiz questions

I am taking a course in micro-controllers (PIC). I recently took a quiz but i am having hard time convincing my teaching assistant that the quiz he made is ambiguous as hell. What would your choices ...
18k views

### Delay function in ARM programming

I have just started programming on ARM, I had some experience on AVR but not that much. The question is probably too trivial but the material about ARM is too little on the net... sorry anyways. I ...
1k views

### What would be the best way to design a real time clock for the MSP430?

Basically that. The way I am doing it now is with the TimerA set to 1 second interrupts. But I think that it's very annoying. Are there any other ways to do it? I want to basically set timers on that ...
3k views

### Calculating time spent by a function in Microcontroller Applications

I would like to write a simple profiler for my STM32F100VE microcontroller. I have seen that I can include time.h and based on the c standard functions I can use it, but I was confused about ...
3k views

### Why does MSP430 have 2 capture signals for each capture/compare channel? Pin assignments recommendations?

Let's take MSP430G2553 as an example. If you look at the pinout in datasheet, you'll see: P2.1/TA1.1 P2.2/TA1.1 One could think that those TA signals identical and multiplexed twice as a courtesy to ...
1k views

### five month countdown timer circuit?

I'm a beginner in electronics, so I just have an idea in my head and don't know how to actually make it. I want to make a countdown circuit, for an event in next 5 month. The display format is like ...
12k views

### How to compute Timer1 period?

I'm trying to configure Timer1 of a pic24h to 1ms per timer tick but don't seem to be able to get the math to match my results. I have a 20MHz external oscillator (with a 1M resistor in parallel for ...