Sale!

10 Pieces XT49S-204M CRYSTAL 4MHz

Original price was: 2,56 €.Current price is: 1,97 €. Excluding VAT

XT49S-204M Crystal 4MHz for Arduino. Excellent for synchronizing clocks in electronics projects.

3 in stock (can be backordered)

Domande su questo prodotto? Scrivi a Lana su WhatsApp

🎬 The product on video

Description

What it is

The XT49S-204M is a 4MHz crystal commonly used in electronics projects, especially with Arduino. This component is used to synchronize clocks and generate precise time in circuits.

Features

  • Type: XT49S-204M Crystal
  • Frequency: 4MHz

What it is for

4MHz crystals are ideal for basic and beginner projects, such as creating a simple digital clock with a 16×2 LCD display. They are compatible with Arduino and other microcontrollers.

Tutorial: How to Use XT49S-204M 4MHz Crystals

4MHz crystals are useful for generating precise time in Arduino circuits. Ideal for beginners and basic projects.

What you need

  • XT49S-204M 4MHz Crystals (10 pieces)
  • Arduino Uno or Compatible
  • Multimeter
  • 0.1″ Leads

Steps

  1. 1. Check the crystal specifications in the datasheet.
  2. 2. Draw a circuit with the crystal and pull-up resistors.
  3. 3. Connect the crystal pins to pins 9 and 10 of Arduino.
  4. 4. Connect the pull-up resistors to GND.
  5. 5. Load the example code in Arduino.
  6. 6. Check the time with a multimeter.
  7. 7. Test the time with an example program.
  8. 8. Verify the accuracy of the time.

Example code

```
#include <Wire.h>
#include <RTClib.h>

RTC_DS1307 rtc;

void setup() {
  Serial.begin(9600);
  if (!rtc.begin()) {
    Serial.println("Could not find RTC");
    while (1);
  }
  if (rtc.lostPower()) {
    Serial.println("RTC lost power, let's set the time!n");
    // Following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__))); 
  }
}

void loop() {
  DateTime now = rtc.now();
  Serial.print("The current date is ");
  Serial.print(now.year(), DEC);
  Serial.print("/");
  Serial.print(now.month(), DEC);
  Serial.print("/");
  Serial.print(now.day(), DEC);
  Serial.print(" (");
  Serial.print(now.dayOfTheWeek(), DEC);
  Serial.print(") ");
  Serial.print("at ");
  Serial.print(now.hour(), DEC);
  Serial.print(":");
  Serial.print(now.minute(), DEC);
  Serial.print(":");
  Serial.print(now.second(), DEC);
  Serial.println(".");
  delay(1000);
}
```

Mini project

Create a simple digital clock with a 16×2 LCD display and the 4MHz crystal.

Common mistakes

  • Connect the crystal to the wrong pins of Arduino.
  • Omit the pull-up resistors.
  • Do not check the time with a multimeter.
  • Do not test the example code.

Recommended accessories

  • 16×2 LCD Display
  • 10kΩ resistors
  • 4MHz crystal
  • 0.1″ connectors

Frequently asked questions

Does the crystal work with Arduino Nano?
Yes, it works with Arduino Nano or compatible.

Reviews

There are no reviews yet.

Be the first to review “10 Pieces XT49S-204M CRYSTAL 4MHz”

Your email address will not be published. Required fields are marked *