Questions tagged [oscillator-clock]
Refers to a crystal oscillator.
82 questions
0
votes
0
answers
86
views
ASync Timer2 based OSCCAL value
How to calibrate the internal RC oscillator off of a 32768 Hz crystal serving Timer2?
void OSCCAL_calibrate(void) //This version specific to ATmegaXX8 (tested with ATmega328)
{
...
0
votes
1
answer
96
views
If I use clock_prescale_set in my sketch I will loose access to adafruit feather 32u4?
I want to run my 32u4 in 2MHz. According to gammon I will gain 4mA in runtime. To my understanding this changes all the buses speed like UART, USB?, I2C?** and SPI?*. Probably I will have problems to ...
-1
votes
3
answers
239
views
Arduino Nano timer drifting
https://youtu.be/oVZgFsWsKPM][1]
I'm a beginner in Arduino. I made a 12-hour common cathode 7-segment clock. I made a 7-segment display with LEDs, using Arduino Nano.
If I use a long period of 1,000 ...
0
votes
1
answer
162
views
Programmer vs target clock frequency
I have a 16u2 programming a 1284P for a custom board I am building. The 16u2 converts USB to USART for programming the 1284P, however the 16u2 has a maximum frequency of 16MHZ while the 1284P has a ...
1
vote
0
answers
152
views
Deciphering AD7730 outputs
I am currently working with a AD7730 chip for analog-digital conversion. The chip is programmable, and I have been pulling code from GitHub as well as other links.
I am unfamiliar with SPI (the ...
1
vote
2
answers
5k
views
How to use an external 32kHz crystal for ESP32 S3 with Arduino IDE?
I want to use an external 32kHz crystal for RTC with ESP32 S3, but I didn't see any example or tutorial for Arduino IDE, Even when I asked ChatGPT, it gave me some example but the code gave library ...
0
votes
1
answer
73
views
Frequency problems with DIY arduino and resonator
I made a simple music program using an arduino Uno and the tone() function. It works fine.
I decided to build my own circuit using a barebones AVR and upload that program.
I did not know exactly what ...
0
votes
2
answers
391
views
How to divide high input frequency by 1.25 like old-school TTL logic by Arduino?
In modern timekeeping, there is a 10 MHz reference frequency (or any power of 10). The digital clock takes 32768 Hz frequency only (or some other power of 2 possible).
The problem is how to convert ...
5
votes
0
answers
2k
views
How to set ESP32 RTC clock source
According to the manufacturer's link below, the default RTC timekeeping in the ESP32 is supposedly based on Internal 150 kHz RC oscillator.
Apparently, there is another option called Internal 8.5 MHz ...
0
votes
2
answers
330
views
slower clock frequency than expected on attiny202
I am programming an attiny202 which as per datasheet can run up to 20Mhz, but after compiling/uploading this simple code to the attiny202 and watch the PA2 pin on the oscilloscope, I see that the pin ...
0
votes
1
answer
1k
views
Atmega 328p at 3.3v : Internal vs external oscillator
I am currently working on a pcb that uses smd atmega 328p (au).
I will be powering it through a lipo battery and a ldo regulator for 3.3v input. I am using the multiwii flight controller code.
I know ...
13
votes
1
answer
2k
views
_delay_ms() is much slower than expected (by a factor of 6) on TinyAVR 0/1 (ATTiny1604)
I designed a custom AVR development board using the Atmel ATTiny1604 microcontroller. It belongs to the new Tiny-0 family, due to its recentness, some required changes to relevant toolchains have yet ...
0
votes
1
answer
174
views
Achieving nanosecond accuracy with MKR Vidor 4000
Can I achieve nanosecond accuracy with Arduino Vidor MKR 4000? Has anyone experience? Obviously by using the FPGA it has on it. I do not find much support on this module on google search...
2
votes
0
answers
117
views
Clock Problem when Migrating from Arduino IDE Mighty Core to Atmel Studio
I've been programming an ATMega1284 using the Arduino IDE with the MightyCore package.
I'm now trying to migrate to Atmel Studio.
Atmel Studio (7.0) will now compile the sketch and all required ...
1
vote
0
answers
192
views
Clocking issues while programming ATMEGA32U4-AU via USB bootloader
Hi,
I'm designing a custom board with the ATMEGA32U4, with a GPS receiver and LoRa radio and it is powered from a LiPo battery. Since I'll need to make hundreds of this board later on, I'd like to ...
1
vote
2
answers
427
views
Is there a way to get about a 10ns Timer resolution from an AVR CPU?
I have an 8Mhz ATM32u4 that is able to read external pulse inputs at 125ns ticks using InputCapture3 (PC7) on its 16-bit timer. Is there a magical way (bitbanging?) to get around 10ns tick resolution ...
2
votes
1
answer
272
views
The analog read is not giving the correct waveform as that of an oscilloscope
I have code that fetches analog input values from terminals A0, A1 and A2 of an Arduino Mega 2560. When I plot the data, it does not give the desired waveform.
The desired waveform is also measured ...
0
votes
1
answer
1k
views
Parola library and DS3231 clock
EDIT2: Well, this is the "new" code and it just displays random dots on the matrices:
#include "RTClib.h"
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>
// Define ...
1
vote
0
answers
148
views
DigiSpark External Oscillator
I am trying to set up a PJON SoftwareBitBang network with a bunch of DigiSparks. My setup works well with any other Arduino devices except the DigiSparks. Based on some internet searching I came to ...
1
vote
0
answers
398
views
SI5351 Breakout 153,600Hz Square Wave Signal
I'm trying to generate a consistent 153,600Hz square wave signal with 50% duty cycle from a Adafruit SI5351 3.3-5v breakout board for use as a fixed synchronous serial clock reference, but the closest ...
1
vote
1
answer
1k
views
Why ESP8266 slower than Arduino nano?
I'm using the same script(and standard wire and serial library only) one uploaded to Arduino nano one uploaded to ESP8266. However, despite ESP8266 running at 160MHz, 10 times faster than nano, it's ...
2
votes
1
answer
1k
views
Arduino Uno Rev3 Internal Quartz
I'm using an Arduino Uno Rev3 Board and need to send a trigger signal at a certain frequency (20-50Hz).
This trigger signal should be as accurate as possible (+/- 0.01 ms).
The Arduino site states ...
-1
votes
1
answer
914
views
Multiple MPU9250 Synced
I am interested in collecting data from 3 MPU9250 via I2C communication protocol. As I've read, I can collect measurements on the same I2C Bus from up to two MPUs. However, how can I collect Synced ...
1
vote
3
answers
11k
views
What are exactly XTAL1 and XTAL2 pins in Arduino Uno/Nano?
I know that the blow red encircled component is the 16MHz Crystal Oscillator (XTAL):
But PB6 and PB7 pins are called XTAL1 and XTAL2 pins which are not accessible by the Arduino board.
Are these ...
2
votes
3
answers
4k
views
Change the fuses of an Arduino Uno (can an Arduino Uno change its own fuses?)
For now, I'm using an Arduino Uno alone including its 328p (no other external chip to program).
I would like to change its fuses to internal 8 Mhz clock (because then I'll move the 328p out of the ...
1
vote
2
answers
879
views
How to count the number of rising edges on DS3231 rtc?
I am using a DS3231 rtc and I would like to get millisecond accuracy from it so I decided to use the 32kHz generated clock from it. I wrote a code that would count the rising edges or falling edges ...
0
votes
1
answer
417
views
NRF24l01 with Atmega 32u4 and internal clock
Will the nrf24l01 work with the Atmega 32u4 if I am using the 32u4's internal clock, or must I have an external clock source?
1
vote
0
answers
68
views
Mistaken Connect 5V to SCK Pin
i have old chinese old hotair station that controls by atmega8l 8ua chip..
and the board designer are clever enough to put 2 identical dc plug, 1 is 5v supply cable.. the other one is on off switch ...
0
votes
2
answers
255
views
Is it possible to output a variable clock using Fast PWM?
I am trying output a clock and change its frequency dynamically with a rotary encoder.
When the code for the rotary encoder is included the clock doesn't reach its max freq(31Khz). But without the ...
2
votes
0
answers
1k
views
Clock cycle count count for the same command is not equal in ESP32
I am using ESP32 Pico Kit with Arduino Ide. I want to measure operation cycle for a few commands.
The code is so simple as below:
void setup() {
Serial.begin(9600);
}
void loop() {
unsigned long ...
-1
votes
2
answers
301
views
RC-oscillator calibration in real time
This pesky watchdog RC oscillator is at the limit of its 10% tolerance already at room temperature. i was looking to bringing it to more like 5% (it stems from an internak 128 kHz RC oscillator) and ...
-1
votes
1
answer
416
views
Can the IDE handle a 32khz main clock?
I read somewhere that having the main clock be 32768Hz messes not only with micros() and millis(), but with some other stuff too. Is this true? Will I have to forgo the Arduino IDE to program for an ...
3
votes
3
answers
3k
views
Atmega328p - Going low power 1.8V using 4Mhz oscillator - Bootloader flash
I would like to use an Atmega328p micro-controller with a 4 Mhz oscillator in order get some low power consumptions. I am using an Arduino board to flash the bootloader into the Atmega.
EDIT
In ...
1
vote
2
answers
427
views
Arduino Clock Speed effect on Stepper Speed
I am running a Pololu A4988 Stepper driver with two (soon to be three) steppers using the AccelStepper library. I have wired 1/8th microstepping on both as smooth running is important.
The motors ...
0
votes
2
answers
2k
views
Does delay() pause the counting of millis()?
If I add a delay for a few seconds, and then will the value given by millis () be equal just before and after delay?
Or to put it in other words, does the internal clock of Arduino stop during delay?
1
vote
1
answer
357
views
Errors trying to set fuses on bare Atmega328p
I have an Atmega328p on a board that I want to program using an Arduino programmer. I've got the programmer working to program other Arduino's over ICSP header, but when trying to use the same ...
1
vote
1
answer
2k
views
Arduino Due's clock frequency
I want to change the clock frequency of the Arduino Due. The default value of the main clock, according to the SAM micro-controller, is 4 Mhz. But I found in some forums that it is 84 Mhz. But I need ...
0
votes
1
answer
1k
views
Set clockspeed of Arduino Pro Micro a. k. a. AtMega32u4
Is it possible to change clock speed when running sketch?
Low-power lib drops the current consumption from 20mA to 9.5mA at 8MHz, it is still too much. Is there a way how to set clockspeed (for ...
3
votes
1
answer
740
views
Which of the clock sources are actually internal to the ATmega328P?
I am trying to determine exactly what all of the fuse settings correspond to on the ATmega328P. The options for the CKSEL bits are:
1111-1000: Low Power Crystal Oscillator
0111-0110: Full Swing ...
0
votes
1
answer
5k
views
Specify F_CPU in arduino to use 8MHz clock
I am using a custom made AVR board with Atmege-328p on it and it doesn't have a 16MHz crystal on it. I would like to use the internal 8MHz as clock. I have set the appropriate Fuses but now I am ...
0
votes
3
answers
2k
views
2.4Mhz clock for 3-wire SPI using Arduino Mega 2560
I am trying to develop an Arduino sketch for ADS8320 ADC IC, which is 3-wire SPI. I need a 2.4MHz serial clock for the SPI interface. I tried the code below, but I don't know how to generate clock ...
2
votes
1
answer
114
views
Do I Have to Change Internal Interrupt Setups when I Change Clock Speed?
Do I Have to Change Internal Interrupt Setups when I Change Clock Speed? The reason I ask is because I am trying to modify this code:
https://github.com/DccPlusPlus/BaseStation/blob/master/DCCpp_Uno/...
6
votes
4
answers
1k
views
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 ...
0
votes
1
answer
930
views
How to burn bootloader/program an ATMega 328P with an external crystal 8 MHz oscilator?
I need to program a ATMega328P on a breadboard, running on an external crystal at 8 MHz.
All of the guides I can find either use the arduino environment and describe a 16 MHz config, or using the 8 ...
1
vote
2
answers
3k
views
My RTC DS1307 isn't returning any information. It seems to be stuck in the isrunning() function. Does anyone have debugging tips?
I'm using an RTC DS1307 to keep track of time for long periods. It seems to be stuck in a function. I'm using the RTClib suggested by adafruit.
How can I get it unstuck and get values returned? Are ...
5
votes
1
answer
221
views
Replacement crystal on Uno for cold temperatures
I want to run an arduino out in the cold (-40), and use the serial communication - I believe that the crystal is the weakest link (the one for the serial chip) - however I don't see any drop-in (...
3
votes
3
answers
2k
views
Running quartz clock off an arduino
I am trying to run a clock off of an arduino following this site: http://www.cibomahto.com/2008/03/controlling-a-clock-with-an-arduino/comment-page-1/ and I tried to combine it with this to get it to ...
3
votes
1
answer
135
views
Read time digits from DS1307 and run code based on return
I am currently reading a DS1307 adafruit breakout board and I need to drive two nixie tubes from a shift register. The shift register is running two 74141 IC chips. I have code that loops through all ...
3
votes
3
answers
6k
views
Atmega328P 8MHz External Clock
Has anyone experience configuring the Atmega328P to work with an 8Mhz external clock?
I want to reduce the power consumption of the device. If I just connect an 8MHz external quartz oscillator then ...
1
vote
2
answers
2k
views
Arduino Uno Reading Fuses
I am trying to read the fuse values for the Arduino Uno, but keep getting the following results returned back to me:
enter code hereavrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24
...