LowPowerLab Forum

Hardware support => Moteino => Topic started by: roffey on September 04, 2016, 08:23:27 AM

Title: Connecting a TCXO
Post by: roffey on September 04, 2016, 08:23:27 AM
Nightmares for me here. Just 1 of 5 Moteino works so far.
Using a 32Mhz ILSI 2ppm unit, 800mV clipped sinewave output.
Decoupled Vcc. etc. One that works is straight in even.
Others I tried with a/c coupling into the chip, varying the dc bias etc.
Register 59 set with bit 4 high as stated should do.

The frequency registers do not get set, and the SPI start up does not set opmode correctly or enter carrier frequency registers.
Seems to be set in sleep mode?
Now and then something works, but not repeatable enough to establish what is happening.
Run out of ideas to try here.
Back to normal crystal, reg 59 0, all perfect.

All very strange and very frustrating.  Any clues would be much appreciated.





Title: Re: Connecting a TCXO
Post by: perky on September 04, 2016, 11:30:51 AM
You're going to have to give us more hints as to what you're doing. Are you replacing the 32MHz crystal on a radio module with a TCXO? Is this done on the module itself? Which radio module are you using, and which chipset does it use? Sometimes to use an external oscillator you have to ground the unused pin to turn off the internal crystal biasing logic, I don't know whether this is necessary as I don't know which chip you're using.
Mark.
Title: Re: Connecting a TCXO
Post by: roffey on September 04, 2016, 12:13:51 PM
I am trying to replace the crystal on the module itself.
The one which works is a 69HW moteino R4 device. I removed the original crystal, and 'bodged' a the tcxo on board. The free pin I left open, and connected the tcxo output into the original crystal output pin. As per the manual I set bit 4 in Reg59. This worked without issues.
Having run out of 69HWs I used up my 69W's on the moteino board. Reconfigured the PA's for the lower power version (which run fine with the original crystal). I have piggy backed the TCXO crystal so I can make sure the unit still works with the original. I just set(reset) bit 4 on reg59.
I'll certainly try grounding the free pin, but I am getting the feeling feel something else is going on.
As to the actual chipset type, I am not sure how to define that?

Without any crystal, I can still get a register readout. Not sure how that works? ?
Yes, if I ground the unused pin, the bias does change and I can set and read the carrier frequency registers.
Reg 01 stays at 8? FS mode?
On the 69HW if I ground the unused crystal pin, nothing changes. Riding on 1.36V 800mv p-p.

Maybe there's other registers that I am unaware of.
Thanks for helping me with this .... it's been close to hammer time!
Title: Re: Connecting a TCXO
Post by: perky on September 04, 2016, 04:12:12 PM
It's a sx1231h then (or rf69 which everyone assumes is the same thing). The datasheet says what you say, set bit 4 of register 0x59. Interestingly this register is documented in the sx1231 datasheet and not in the sx1231h datasheet (bit 4 is referenced with the tcxo, but it's not in the register list). The sx1231 datasheet says bits 3-0 of 0x59 should have the value of 9, so you should be writing 0x19 to this register or explicitly setting only bit 4 in your code. BTW SPI is self clocking, you can in theory read and write registers and can do so when it's asleep without the oscillator running.
Mark.
Edit: The datasheet also says keep the unused pin floating so I'd leave it open in case it's an output that could get damaged.
Also curious is that the description says it should be AC coupled, but the example diagram shows a direct connection!
Title: Re: Connecting a TCXO
Post by: roffey on September 05, 2016, 12:20:41 AM
Really appreciate that, thanks  for that info. I'll try that out today. Have to take a look at the chip data sheet as well. That's also handy info.
I would 'assume' that the 69hw board has a different chip, unless I got lucky somehow. Only bit 4 set on 59 in that.

Whatever the result, I'll  post a reply.

Thanks again.
Title: Re: Connecting a TCXO
Post by: roffey on September 05, 2016, 04:31:35 AM
All is good now ..... Just takes a while to exhaust all the expletives used to call yourself when you realise what an idiot you've been!
Anyway new day. Move on and learn. (being 68 and not having good eyesight doesn't help)
My biggest mistake was thinking that was the pad for pin4 was actually pin5!
BUT ... how come the first 69HW actually works? Absolutely no signal going to pin4 (that I can scope). Capacitive coupling? who knows?
So, by copying my first mistake, which worked, successive units failed to actually work!

Setting reg 59 to 0x19 does not appear to make a difference on the original 69hw board which shouldn't work.
Setting reg 59 to 0x19 also does not make any change to the correctly connected tcxo unit on the other boards.
It's a shame they don't say exactly what it does.

I think the ac coupling is mentioned just in case dc levels on a tcxo output might be too high, even though the ac pp might be within spec. Might also be the dc shift due to asymmetrical waveforms?

The outputs of these tcxo's are within spec without any ac coupling needed, so no problems there.

Just for completeness I attached the 69hw board tcxo output into pin4!
All goes well now. Now for the narrow band tests! All good fun (so to speak).

Thanks again .....






Title: Re: Connecting a TCXO
Post by: perky on September 05, 2016, 05:53:50 AM
Ah, OK. Glad you got it sorted. Here's what I was about to post before you posted your update:

As a matter of interest, what version number you read from the version register? I was under the impression the sx1231h (which reads version 2.4) is used in both types of radio module. The sx1231 I believe reads version 2.3.  This revision stuff is actually a bit strange. The newest datasheet for the sx1231h is 2011, whereas the sx1231 is 2013. The revision number for sx1231h is 2.4, so I'm wondering the sx1231h is actually the same silicon as sx1231 with all the enhancements that the sx1231 datasheet has, but then you're reading 0x00 from 0x59 which breaks that theory (assuming you're not reading 2.1 or 2.2 from the version register, which could indicate an earlier silicon). They may have split the devices for marketing purposes only.

Mark.
Title: Re: Connecting a TCXO
Post by: roffey on September 05, 2016, 06:29:12 AM
Just for completeness ..... my versions are 2.4 ( reg 0x10).
That's more useful info! The more the merrier!
As to the reg 59 reading 0, I think I wrote to it before actually reading it, so it might have well been originally been 9!
The zero coming from resetting it for standard crystal use. (yup ... should have read it first!)

Thanks again Mark
Title: Re: Connecting a TCXO
Post by: perky on September 05, 2016, 07:16:56 AM
OK. A few more snippets: The sx1231 has a minimum operating voltage of 1.8Vin its datasheet , the sx1231h says 2.4V. We know the sx1231h is used on both radios, yet the RFM69W and RFM69CW are quoted in the HopeRf module datasheet as working at 1.8V. This is because the sx1231h voltage is actually quoted at high power when using the boost pins, and is not quoted at low power, it's specifically marketed for those higher power applications. The sx1231h is actually cheaper than the sx1231 too, and has the same functionality. So the module datsheet is not wrong, and the sx1231h datasheet is not wrong either, and HopeRf have noticed this and chosen the cheaper chip!
Edit: It may well be that it is even cheaper by virtue of the higher volumes with the likes of HopeRf deciding to use the same chip for both module types.
Title: Re: Connecting a TCXO
Post by: roffey on September 05, 2016, 08:31:41 AM
Interesting stuff .... makes sense for HopeRF to use the cheaper chip really. Certainly suits me! I can't see that I'll ever really need a 1.8v working device.
This problem I've had has turned out to have some good positives, which is how all issues 'should' resolve themselves, and which I am very grateful for.
Just had 2Kdev, 4800 bit rate, 7K8 bw working quite nicely .. so thank you for that!