Stufin
Home Quick Cart Profile

16MHz Crystal Oscillator - (Pack of 10)

Buy Now on Stufin

Pin Configuration

  • Component Documentation: 16MHz Crystal Oscillator (Pack of 10)
  • Overview
  • The 16MHz Crystal Oscillator is a quartz crystal oscillator that provides a stable clock signal to microcontrollers, microprocessors, and other digital circuits. It is a commonly used component in electronic circuits, particularly in IoT devices, due to its high accuracy and reliability.
  • Pinouts
  • The 16MHz Crystal Oscillator has two pins, which are:
  • Pin 1: GND (Ground)
  • Function: Ground connection
  • Description: This pin is connected to the ground plane of the circuit, providing a reference voltage level for the oscillator.
  • Pin 2: OSC (Output)
  • Function: Clock signal output
  • Description: This pin provides a 16MHz clock signal output, which is typically connected to the clock input of a microcontroller or other digital circuit.
  • Connecting the Pins
  • To connect the 16MHz Crystal Oscillator, follow these steps:
  • Step 1: Connect Pin 1 (GND) to Ground
  • Connect Pin 1 to the ground plane of the circuit board using a jumper wire or a PCB track.
  • Ensure that the ground connection is secure and reliable to prevent noise and interference.
  • Step 2: Connect Pin 2 (OSC) to Clock Input
  • Connect Pin 2 to the clock input pin of the microcontroller or other digital circuit.
  • Use a suitable jumper wire or PCB track to make the connection.
  • Ensure that the clock input pin is compatible with the 16MHz clock signal output by the oscillator.
  • Important Notes
  • When handling the crystal oscillator, avoid touching the pins or the crystal itself to prevent damage from static electricity.
  • Use a suitable capacitor (typically 22pF) in parallel with the crystal oscillator to ensure stable operation.
  • Ensure that the power supply to the circuit is stable and regulated to prevent noise and interference.
  • By following these steps and notes, you can successfully connect and use the 16MHz Crystal Oscillator in your IoT project.

Code Examples

16MHz Crystal Oscillator - (Pack of 10)
=====================================================
Description:
The 16MHz Crystal Oscillator is a high-frequency crystal oscillator used to provide a stable clock signal to microcontrollers, such as Arduino, Raspberry Pi, and other embedded systems. This pack of 10 oscillators is ideal for prototyping, development, and production purposes.
Technical Specifications:
Frequency: 16 MHz
 Package: Through-hole crystal oscillator
 Operating Temperature: -20C to 70C
 Storage Temperature: -40C to 85C
 Frequency Tolerance: 20 ppm
 Load Capacitance: 18-22 pF
Code Examples:
The following code examples demonstrate how to use the 16MHz Crystal Oscillator with popular microcontrollers.
### Example 1: Using the 16MHz Crystal Oscillator with Arduino Uno
In this example, we will use the 16MHz Crystal Oscillator as the clock source for an Arduino Uno board.
Hardware Requirements:
Arduino Uno board
 16MHz Crystal Oscillator
 Breadboard
 Jumper wires
Software Requirements:
Arduino IDE 1.8.x or later
Code:
```c++
void setup() {
  // Initialize the Arduino Uno board with the 16MHz crystal oscillator
  CLKPR = (1 << CLKPCE);
  CLKPR = (0 << CLKPS3) | (0 << CLKPS2) | (0 << CLKPS1) | (0 << CLKPS0);
  while (!(CLKSR & (1 << CLKST))) {
    // Wait for the clock to stabilize
  }
}
void loop() {
  // Your code here
}
```
In this example, we configure the Arduino Uno board to use the 16MHz Crystal Oscillator as the clock source by setting the `CLKPR` and `CLKSR` registers.
### Example 2: Using the 16MHz Crystal Oscillator with Raspberry Pi Pico
In this example, we will use the 16MHz Crystal Oscillator as the clock source for a Raspberry Pi Pico board.
Hardware Requirements:
Raspberry Pi Pico board
 16MHz Crystal Oscillator
 Breadboard
 Jumper wires
Software Requirements:
Raspberry Pi Pico SDK 1.1.x or later
Code:
```c++
#include <RP2040.h>
int main() {
  // Initialize the Raspberry Pi Pico board with the 16MHz crystal oscillator
  rp2040_cpu_clock_config(RP2040_CLOCK_SRC_XOSC, 16  MHZ);
  while (true) {
    // Your code here
  }
  return 0;
}
```
In this example, we configure the Raspberry Pi Pico board to use the 16MHz Crystal Oscillator as the clock source using the `rp2040_cpu_clock_config()` function.
Conclusion:
The 16MHz Crystal Oscillator is a reliable and stable clock source for various microcontrollers and embedded systems. By following the code examples above, you can easily integrate this component into your projects and take advantage of its high-frequency clock signal.