Defines how often something occurs, such as pulses in a digital signal, or oscillations in a radio wave.
Questions tagged [frequency]
120 questions
15
votes
2 answers
Set PWM frequency to 25 kHz
I currently can set four PWM pins to around 31 kHz with the following code:
void setup()
{
TCCR1B = TCCR1B & B11111000 | B00000001; // Set PWM frequency for D9 & D10:
pinMode(pwmPin9, OUTPUT); // Sets the pin as output
pinMode(pwmPin10,…
user16307
- 237
- 2
- 4
- 15
10
votes
1 answer
Why is our refresh rate consistently decreasing in logging on SD card?
The current code is used to gather the state of 12 infrared beams and log them to an SD card using the real time clock to mark the time. The code uses a switch to turn the device on and off and an LED to indicate if data is being written to the SD.…
JClark
- 103
- 5
7
votes
6 answers
Is it possible to generate an exact 15 kHz clock pulse using an Arduino?
I want to generate a 15 kHz pulse with an Arduino using Timer1, but the problem is that if we want a 15000 Hz clock we need to initialize the timer with 1/15000 seconds or 66.66 microseconds, but we can only pass integers without any decimal…
astrick
- 193
- 1
- 9
6
votes
5 answers
Arduino-based mains frequency monitor
I'm looking to put together a simple mains frequency monitor based on the Arduino platform. The mains here are 250 V @ 50 Hz, but obviously these fluctuate slightly, which is the whole point of the exercise. (I am not interested in capturing voltage…
Ozzah
- 193
- 5
6
votes
4 answers
Programming standalone Atmega328p-PU with NE555N timer IC
I know I may sound a little idiotic to ask, but as I have seen in the internet that to program a standalone Atmel chip like that from of the Arduino's, you need 2 22pF ceramic capacitors and a 16mhz oscillator. As the oscillator is needed is clock…
Samanwaya Datta
- 71
- 1
- 3
5
votes
4 answers
Listen for specific frequency
I’m trying to build a custom baby monitor for my wife who is deaf. It needs to detect loud noises and listen for a specific series of tones from a feeding pump our daughter uses. It will then send a radio signal to the other room to trigger a bed…
Curtis Fuller
- 51
- 1
- 2
5
votes
1 answer
ATmega AVR frequency measurement with timer/counter
I've been rehashing some existing libraries I found on some obscure forums to measure a frequency on digital pin 5, using the ATmega328P/ATmega2560 Timer/Counter modules and an interrupt based approach in order to be able to measure frequencies up…
Robbe Elsas
- 85
- 1
- 6
4
votes
1 answer
Is it possible to sample sound with arduino?
I have the arduino duemilanove with atMega328.
The frequency is 16Mhz.
I want to sample and record from the audio jack.
I searched and i found if i want to record "everything - so to speak", i have to sample at 44100Hz.
That means this is unfeasible…
user1584421
- 1,425
- 3
- 26
- 36
4
votes
1 answer
Generate 1.7 Mhz with PWM in Uno?
I have this code:
void setup() {
pinMode(11, OUTPUT);
TCCR2B = 0;
TCNT2 = 0;
TCCR2A = _BV(WGM21);
TCCR2A |= _BV(COM2A0);
OCR2A = 249;
}
void loop() {
soundBuzzer();
}
void soundBuzzer() {
TCCR2B |= _BV(CS21);
}
void…
Hackeitos
- 41
- 1
- 3
4
votes
4 answers
ArduinoUNO/MEGA, Is there a way to exceed 256 in analogWrite
I am using Arduino UNO/MEGA, I want to
analogWrite(pin, val);
where the value is 0-1023.
How can I make that ?
Thanks.
Mostafa Khattab
- 281
- 4
- 16
4
votes
3 answers
Maximum frequency of digital signal in Arduino Uno?
As Arduino Uno has a 16 MHz oscillator but while running program it has less frequency because some of the processing power is used for running the program.
I have used the delay(1) but it is giving me around 500 Hz.
My questions:
Is there any way…
chandrayaan1
- 195
- 1
- 4
- 8
4
votes
2 answers
Arduino constant clock output
I am controlling an ADC with my Arduino Uno. I would like the clock of the ADC to be the same frequency of the Arduino.
Is there any way that I can have a constant clock output from one of the Arduino pin ?
Thanks,
Liam
Liam F-A
- 43
- 1
- 1
- 3
3
votes
3 answers
Recognize peak in specific frequency area
I am wondering if it is possible to attach a microphone to an Arduino board and make the Arduino recognize a volume peak in a specific range of frequencies.
I want it to detect a specific peak (for example 0,1 dB) in the range of 1000 hz to 5000 hz.
Jacobus
- 31
- 1
3
votes
2 answers
Generate 1khz square signal with Arduino Mega
I want to generate a 1khz square signal with an Arduino Mega.
I have read the MCU contains several timers.
What i want to do is to configure one of this timers.
My first question is: Is there a way to automatically control an output pin from the…
Bob5421
- 87
- 1
- 5
3
votes
1 answer
Measure audio frequency through pulse duration
Hello dear StackExchange users,
i want to develop an Infrared blaster which i can plug into the headphone jack of a phone or console of choice. In order to communicate what frequency to modulate the diode with and how long to send pulses, i simply…
MyFairJulie
- 33
- 4