Bird
0
0
PCB Designbi_tool~10 mins

Crystal oscillator circuit in PCB Design - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the frequency of the crystal oscillator.

PCB Design
frequency = [1]  // Frequency in MHz
Drag options to blanks, or click blank then click option'
A5
B10
C16
D20
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a frequency too high for the circuit design
Using a frequency not supported by the microcontroller
2fill in blank
medium

Complete the code to set the load capacitance for the crystal oscillator.

PCB Design
load_capacitance = [1]  // Load capacitance in pF
Drag options to blanks, or click blank then click option'
A33
B10
C18
D22
Attempts:
3 left
💡 Hint
Common Mistakes
Using too low or too high capacitance causing frequency shift
Ignoring the datasheet recommendations
3fill in blank
hard

Fix the error in the code to correctly connect the crystal pins.

PCB Design
connect(crystal_pin1, [1])
connect(crystal_pin2, oscillator_output)
Drag options to blanks, or click blank then click option'
AVcc
Breset_pin
Coscillator_input
Doscillator_output
Attempts:
3 left
💡 Hint
Common Mistakes
Connecting crystal pin to reset or Vcc instead of oscillator input
Reversing pin connections
4fill in blank
hard

Fill both blanks to complete the code for calculating the oscillation period and frequency.

PCB Design
period = 1 / [1]  // Period in microseconds
frequency = [2] * 1e6  // Frequency in Hz
Drag options to blanks, or click blank then click option'
Afrequency
Bperiod
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping period and frequency variables
Not converting MHz to Hz correctly
5fill in blank
hard

Fill all three blanks to complete the code for setting up the oscillator circuit with capacitors and crystal.

PCB Design
c1 = [1]  // Capacitor 1 in pF
c2 = [2]  // Capacitor 2 in pF
connect(crystal, [3])
Drag options to blanks, or click blank then click option'
A22
Coscillator_pins
D18
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect capacitor values
Connecting crystal to wrong pins