Crystal signal - Page 1
Forum section: electronics / beginners

author: Guillaume
author_rank: Contributor
timestamp: March 13, 2023, 08:26:35 pm
content: Hi,I have difficulties to make an art communication between my microcontroller and another ic. The second ic need a crystal. I have an epson FA - 238 crystal Wich is a 4 pins package. Two pins are connect to the cover and then to ground. Two others are connect to xtal1 and xtal2 of my ic. I have a doubt, is this kind of oscillator generate a sinus signal? I have a high voltage signal but no oscillation. Is that correct? If not, is it due to a wrong input signal to this crystal?Thank you

author: golden_labels
author_rank: Super Contributor
timestamp: March 13, 2023, 08:55:01 pm
content: Crystalresonatoris a piece of a crystal in a package with (usually) two pins. It does not generate signal of its own, but acts as a filter in an oscillator circuit.Crystaloscillatoris a complete circuit of such kind, incorporating a crystal resonator. Usually four pins, takes voltage and produces clock output.Integrated circuits may accept a ready clock signal (from an oscillator) or have its own oscillator circuit, which requires an external crystal resonator. Some microcontrollers may accept either, but that has to be pre-configured. Which is needed by your integrated circuit is not really possible to tell without knowing, which circuit it is.Presence of XTAL1 and XTAL2 pins indicate that the intergrated circuit expects a crystal resonator (not a complete oscillator!), but — depending on what chip this is — it may be configurable to use a separate oscillator. In that case only one of those pins will be used.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 14, 2023, 12:13:18 am
content: Another IC. What is it?You need more than the crystal wired across XTAL1 and XTAL2.You will need some capacitors to get it to work.

author: dobsonr741
author_rank: Frequent Contributor
timestamp: March 14, 2023, 02:07:10 am
content: How do you know there's no oscillation? Probing with an oscilloscope probe having 1Mohm||20pF can certainly shut the oscillation down. Better to check with a 10x probe. Even with a 10x probe the oscillator can shut down when probing the input pin, should be OK for the output. You'd not know which pin is which, unless the IC has a super detailed data sheet, or offers clock output from one of the xtal pins.The second IC might overload the circuit, depending on how it's connected. Better go get the first IC running properly, if you can separate them. It's OK to cut a trace while bringing the design up then resolder later.

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 14, 2023, 07:25:05 am
content: Quote from: Guillaume on March 13, 2023, 08:26:35 pmSorry for being a bit harsh, but you also lack the "art of communication" onto the forum.To receive proper help it is best to provide as much information as possible. Since a picture says more then a thousand words the schematic of your setup would go a long way. Same for pictures of the PCB, etc.If you have an oscilloscope and are able to probe the signals providing screen captures can also help in finding why things are not as you expect them to be.Be as verbose as possible when asking the forum for help.

author: Guillaume
author_rank: Contributor
timestamp: March 14, 2023, 09:23:49 am
content: Ok thank you all for your help.Yes, i use an oscilloscope to analyse the signal. I set my probe to 10X.My board is a home made prototype. You can find attached a "big picture" schematic. And yes, there is capacitors arround the crystal.I have a STM32G4 communicate with NCN5130 via UART. Because it's all home made and i am still a beginner, i have difficulties to determine my communication problem.What i did : i can flash the STM32, can blink LED, can communicate on UART, can see the transmit signal and decode it on my oscilloscope. But I never receive response from the NCN5130 whereas my transmit message should have response.So i don't know if there is a soldering problem on the NCN5130 or conception issue or whatever. So i tried to analyse the crystal signal to verify it is power up by the NCN5130.That's the reason of my question. The FA-238 crystal is the reference suggest on NCN5130 documentation.From what i understand of all your reply, i cannot conclude by analyse this crystal input or output signal.For my understanding, i don't see clear information on the epson FA-238 crystal, there is not clear if this is a crystal resonnator or oscillator or whatever ? I only choose it because it specify on the NCN5130 datasheetI also add a picture of my board, and I know that this one is not perfect

author: golden_labels
author_rank: Super Contributor
timestamp: March 14, 2023, 09:55:21 am
content: Please post the exact schematic, showing pins and their numbers.Assuming the order of pins on FA-238 is the same as drawn in the datasheet, you put one end of the crystal to the ground, and shorted all three other pins and both XTAL pins on NCN5130 together, and placed capacitors between that and ground.

author: RoGeorge
author_rank: Super Contributor
timestamp: March 14, 2023, 10:13:26 am
content: Quote from: Guillaume on March 14, 2023, 09:23:49 amFor electronic parts, you'll have to look in the datasheet from the manufacturer:https://support.epson.biz/td/api/doc_check.php?dl=brief_FA-238&lang=enhttps://www5.epsondevice.com/en/products/crystal_unit/fa238.htmlIt's a resonator, not a standalone oscillator. That can be seen by looking at the pinout symbol, drawn on the right-hand side near the mechanical footprints (inside the PDF datasheet, not the online webpage). That symbol drawn like a capacitor with a rectangle between it's plates is for a quartz resonator, so not a standalone oscillator.In fact, FA-238 is the name of a family of products (all resonators). Each model from that family will have a specific resonant frequency, depending on the exact model. See the "Product name" paragraph to learn how the frequency is specified in the full product name. The number after FA-238 tells the resonant frequency.The correct frequency value for your schematic is crucially important, so what model is soldered there, on the board? Of what resonant frequency? Is it the same frequency as in the reference design you took your inspiration from?Which part number did you order for the crystal?

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 14, 2023, 10:35:40 am
content: Here is a link to the NCN5130datasheet.It can work with both a crystal or an oscillator, depending on the state of the XSEL pin. The output of the clock can be measured on the XCLK pin. When configured for an oscillator the input is on XTAL2. When configured for crystal this is the output and XTAL1 is the input. Probing should be done on XTAL2.Like RoGeorge wrote the chosen component is a crystal. To make this work XSEL should be low. (tied to ground)But the picture of the PCB does not look pretty. It might well be that the solder near the crystal is making shorts. Also QFN packages can cause problems with not connected solder joints. Hard to tell since the pads are underneath.The datasheet shows either a 8MHz or 16MHz crystal to be used.

author: Guillaume
author_rank: Contributor
timestamp: March 14, 2023, 11:49:34 am
content: Ok, i add the schematic of the NCN5130 and a view of the PCB routing.Yes on the picture we see ball of solder around the crystal but no, there is no short, ground is ground and others pins aren't on ground.Maybe there is a mistake on my design because XSEL isn't connect to anything, i follow the Figure 16 page 20 and let this pin on the air.This was not clear for me if XSEL should be to low or only anything else than high.The crystal mount is the Q22FA23800181 FA-238 16 MHZ 12.5PF.Thank you all

author: pcprogrammer
author_rank: Super Contributor
timestamp: March 14, 2023, 01:24:48 pm
content: According to the datasheet XSEL has an internal pull down resistor, so the crystal mode should be selected.The schematic looks correct for the crystal part too, so a bad solder joint might be your problem.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 14, 2023, 08:02:21 pm
content: You can test for clock on Xclk, pin 32. You have lost XCLKC somewhere, it needs to be tied to Vdd. Page 20 of the datasheet.

author: Kim Christensen
author_rank: Super Contributor
timestamp: March 14, 2023, 08:15:56 pm
content: Quote from: Guillaume on March 14, 2023, 09:23:49 amIt looks like you haven't cleaned the flux of the board. Clean it off and take another picture.It's hard to tell, but it sure looks like there are a lot of solder bridges on that board:

author: nali
author_rank: Frequent Contributor
timestamp: March 14, 2023, 08:42:21 pm
content: That crystal doesn't look like it has flowed properly at all - lift it off and check all the pads have wetted. I just recently hand-built a prototype with a 2x2.5mm XTAL which looked fine even under a microscope but when I removed it one of the pads still had its gold finish untouched.

author: Guillaume
author_rank: Contributor
timestamp: March 16, 2023, 03:47:05 pm
content: Thank you all for your help.I remove the NCN and solder it back. The flow looks like a lot more better (have picture, but still flux on board).When i probe the RESETB pin of my NCN5130, I have a constantly changing of the state with same frequency of my software loop (led blink + UART command receive). I also have a close pattern of my receive uart message on NCN.I also have SAVEB low, but it's seems not clearly to ground. RESETB and SAVEB pins indicate the status of my NCN so if i well understand my chip constantly reset.I'm pretty confident with this new solder version and make many test to verify there is no bridge.Is it correct to say that if i have state on RESETB the chip is power up ?According the datasheet, RESETB changing state can be due to VDDA issue but probe on VDDA seems ok (3.3V, i use a lab power supply).According your help the schematics seem good, so i am a bit confuse to find the problem.In the attached screenshot:Yellow signal is my uart command that should be received by NCN. Command send by the stm32 is 0x38.Blue is the RESETB signal (don't care the decide value). We see that RESETB has same pattern than UART receive signal