Skip to content
Snippets Groups Projects
Commit ebbafa7d authored by Henrik Alsér's avatar Henrik Alsér
Browse files

Cleanup

parent cb7556b7
Branches
No related tags found
No related merge requests found
......@@ -93,7 +93,8 @@ The microcontroller can boot in different modes, similar to how you can enter th
The crystal will resonate at a specified frequency. Its waveform will be used as an input to the PLL (Phase Locked Loop) that will multiply the crystal’s frequency. This is the crystal that will be used: https://www.elfa.se/sv/kristall-ytmontering-16mhz-iqd-lfxtal029370/p/30131284
The crystal and its associated capacitors are part of a "Pierce oscillator" circuit connected to two special pins on the MCU - `PH0 - OSC_IN` and `PH1 - OSC_OUT`. To calculate value of the load capacitors required for proper operation, use the following formula:
`C = 2*(Cload - Cstray)` where `Cload` is the load capacitance value specified in the crystal's [datasheet](https://www.elfa.se/Web/Downloads/_t/ds/LFXTAL029370REEL_eng_tds.pdf) (18pF) and `Cstray` is the stray capaciatance on the PCB, usually in the range of 2-10pF (pick something in-between, like 6pF). This gives us a capacitance value of `2*(18 - 6) = 24pF`. The closest standard value would be `22pF`.
`C = 2*(Cload - Cstray)`
where `Cload` is the load capacitance value specified in the crystal's [datasheet](https://www.elfa.se/Web/Downloads/_t/ds/LFXTAL029370REEL_eng_tds.pdf) (18pF) and `Cstray` is the stray capaciatance on the PCB, usually in the range of 2-10pF (pick something in-between, like 6pF). This gives us a capacitance value of `2*(18 - 6) = 24pF`. The closest standard value would be `22pF`.
- Click on the Place component button.
- Find the device/Crystal.
......@@ -156,7 +157,10 @@ Now add a reset button. Suitable value for capacitor is found in the MCU data sh
### 13) Power LEDs and test points
In order to see that your system is correctly powered, it is common to add test points for easy probing. It is also recommended you add LEDs to your power rails so you can see they're powered up correctly. You can use an LED such as [this red one](https://www.elfa.se/en/smd-led-645nm-0805-65cd-30ma-kingbright-kptd-2012surck/p/30118951), together with a suitable current limiting resistor. Aim for a forward current of about 2mA. You can use this [LED calculator](https://ohmslawcalculator.com/led-resistor-calculator) to calculate suitable resistor values for your LEDs. Use resistor values from the E12 series.
In order to see that your system is correctly powered, it is recommended to add test points for easy probing in the form of exposed pads on the board. It is recommended to use a pin header footprint for GND test points so you can easily clip the scope's alligator clip to it.
Place at least one GND clip for each subcircuit block on your boards. You don't need to stuff them with pins by default during assembly, but it is nice to have the option to add these when troubleshooting.
It is also recommended you add LEDs to your power rails so you can see they're powered up correctly. You can use an LED such as [this red one](https://www.elfa.se/en/smd-led-645nm-0805-65cd-30ma-kingbright-kptd-2012surck/p/30118951), together with a suitable current limiting resistor. Aim for a forward current of about 2mA. You can use this [LED calculator](https://ohmslawcalculator.com/led-resistor-calculator) to calculate suitable resistor values for your LEDs. Use resistor values from the E12 series.
### 14) SPI
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment