Skip to main content

Questions tagged [timers]

Timers are the hardware in the processor used to count and time events. Use this tag for questions about the hardware timers.

0 votes
1 answer
47 views

I try to use three PWM pins on an Arduino Nano, each with 10kHz. I know that there are timer0, timer1 and timer3 but I wonder if I can combine them while ensuring all three PWM pins to be in sync and ...
Jana's user avatar
  • 1
0 votes
0 answers
69 views

Got two boards, getting a stable counter error ratio between the two of ~0.9895 (counted ticks divided by calculated ticks). Is this not a bit too low ? With +/- 50 ppm between the two crystals I was ...
kellogs's user avatar
  • 136
1 vote
1 answer
36 views

I want to sample an ADC at very regular intervals. Right now, using millis/micros (which are driven by the internal RC oscillator), I'm off by around 3000 ppm, and it drifts. Here are some things that ...
Vulcan's user avatar
  • 257
1 vote
1 answer
84 views

Is it possible generate all frequencies between 5000 and 8000Hz, 1Hz in between with an ATmega328? When I create a c-program outside the Arduino IDE to calculate the frequencies with the formula ...
hennep's user avatar
  • 131
1 vote
2 answers
97 views

The code below for the ATmega328P (Arduino Pro Mini 5V @ 16 MHz) produces a periodic sequence on timer1 pins OC1A and OC1B: #include "Arduino.h" // For Arduino Pro Mini 5V @ 16 MHz // ...
Jan Poppeliers's user avatar
2 votes
2 answers
730 views

With Arduino Uno Rev3, I am trying to maintain a delicate timing while handling data transmission. I want to send 6 bytes at a time, which takes around ~44 us when I time Serial.write(). The time it ...
gunakkoc's user avatar
  • 123
1 vote
1 answer
160 views

I am using an ATTiny88 to drive a PWM device. First of all, digging through the literature, it's hard to tell what the differences between the ATTiny85 and ATTiny88 are, and the vast majority of ...
LesRhorer's user avatar
  • 113
0 votes
2 answers
104 views

This example is a simplified version of what I really need to do, but I think it demonstrates the problem (= my misunderstanding?). I need to use a timer to count microseconds; my code shows how I ...
Bryan Hanson's user avatar
0 votes
1 answer
100 views

I am wondering how I can precisely count time delays between rise events happening on 4 different lines/pins using Input Capture of Arduino Mega 2560. How can I synchronize timer/counters? Appreciate ...
Bakyt's user avatar
  • 9
2 votes
1 answer
752 views

So I wrote this code for Arduino Uno: // file qemu.ino void setup() { Serial.begin(9600); } void loop() { Serial.println(millis()); } And then compiled and uploaded it to the real ...
lch361's user avatar
  • 21
-1 votes
2 answers
1k views

The op of pin 11 should be inverse of pin 3. I used digitalreadfast and digitalwritefast and used simple if else. But the delay is high as 10us. What should i do? I found this code in forum but its ...
Pranav Pillai's user avatar
0 votes
1 answer
163 views

I'm a beginner into Arduino so I have a little problem where I'm trying to do a countdown on LCD using while loop but I'm also trying to get a key input inside that same while loop. Problem is that ...
DevChips's user avatar
0 votes
1 answer
109 views

I'm trying to generate a PWM signal from TCC1. I have a personnal board built with SAMD21E18A. I want to use pin 27 PA30, in my variant.cpp I have this line: { PORTA, 30, PIO_PWM, PIN_ATTR_DIGITAL|...
simon's user avatar
  • 133
1 vote
1 answer
367 views

I am using an arduino Micro to generate 8 square waves on 8 pins. The idea is as follows: on pin 13 is the main square wave. It represents a certain BPM (beats per minute). The other 7 pins should ...
Janw's user avatar
  • 294
0 votes
1 answer
203 views

Glenn from Sweden here. I was wondering if some kind soul could help me out here. My partner bought a cheap chinese knock-off automatic chicken coop door that operates based on sunlight. Link to the ...
Glenn's user avatar
  • 13

15 30 50 per page
1
2 3 4 5
31