Comments (11)
so now i am really guessing that communication is not working as expected ...
if i try to update_status
before configuring si5351 it retuns all 0 (for REVID as well) ... after configuring it changes:
I (1236) main: starting I2C ...
I (7236) main: SYS_INIT: 0
I (7236) main: LOL_A: 0
I (7236) main: LOL_B: 0
I (7236) main: LOS: 0
I (7236) main: REVID: 0
I (7236) main: configuring si5351 ...
I (7246) main: si5351 configuration complete ...
I (12246) main: SYS_INIT: 0
I (12246) main: LOL_A: 1
I (12246) main: LOL_B: 1
I (12246) main: LOS: 1
I (12246) main: REVID: 1
i am guessing REVID should never change ?
from si5351arduino.
I've noticed some issues in the status register reporting as well, and I agree with your assessment of how the class should give some way of indicating that the IC isn't present on the address. I'll mull over how to handle this in the next update. Thank you for the feedback.
from si5351arduino.
@ppisljar I've added a bool return value to the init() method that returns true if a device is found on the bus (for now it just looks to see if something is there, not a specific check for an Si5351). Please install the v2.1.1 branch manually and see if that will meet your needs:
https://github.com/etherkit/Si5351Arduino/tree/v2.1.1
I'm not sure of a good way of detecting specifically that a Si5351 is present on the bus at the specified address. The device doesn't have a register which returns a unique device ID or anything like that.
Also, regarding the status registers, I've done a bit of work investigating them, and from the best that I can determine, you have to do an initial read of the registers, then wait a bit (something on the order of 100 ms), and then you'll get the correct register values. Please see this in the example sketch. Try that out as well in your code and let me know if you get the desired behavior.
from si5351arduino.
thank you, seems to work fine (init)
i would suggest to read a register with known value (are reserved registers readable and do they have a constant value? )
or read register, write to register, read its value, reset to default value.
none of the above will be able to 100% identify Si5351, but should work better than just 'is present' test
in regards with my REVID register .... its still returning 1 ...
and LOL and LOS are 1 now even before i start configuring the chip. (waiting for the registers to update seems to have done the trick)
seems something is wrong with my xtal ( i am using this one: https://www.digikey.si/products/en?keywords=535-13945-1-ND ). is there something i could check that you are aware of ?
thanks
from si5351arduino.
from si5351arduino.
I don't see anything obviously wrong with the xtal by looking at the specs. Can you probe the XA line to see if it is actually oscillating or not? It kind of sounds like just something electrically not working right. If it is oscillating, then perhaps @la3pna is correct.
from si5351arduino.
i am using ESP32 microcontroller, seems XTAL is not oscillating, will try to replace it later this week.
from si5351arduino.
I think that there will be complaints about a choice of register to use to "validate" the presence of a proper SI5351, so I'd rather leave that up to the end user to implement if they really feel like they need that extra bit of assurance. I believe that a check that there's something on the bus at the desired address should do the trick in most cases, and if one wants to check some arbitrary registers to try to make the confirmation a bit more solid, it's done easily enough with a raw read command.
I've never tried using this library with the ESP32, so I'm curious to hear how it goes for you @ppisljar. I'm going to tentatively consider this issue resolved, but I won't close it until I hear back from you or a reasonable amount of time elapses. Please let us know what you find, thanks.
from si5351arduino.
just to report back, yesterday i've played some more and got it to work. crystal was the problem, seems it was burned. replacing the crystal now makes it work (with ESP32).
i still get the LOS set to 1 ... but i can measure the output frequencies and they seem to be correct:
I (12246) main: SYS_INIT: 0
I (12246) main: LOL_A: 0
I (12246) main: LOL_B: 0
I (12246) main: LOS: 1
I (12246) main: REVID: 1
so i can confirm, this library seems to work ok with ESP32
from si5351arduino.
Glad to hear, thanks for the update. That still is strange about the registers. If I get my hands on an ESP32, I'll dig into it further.
from si5351arduino.
I currently work on the Si5351 identification, and this is the result of a register dump from an uninitialized Si5351 (deleted rows with all 0's for brevity):
0: 0x11 0xf8 0x03 0x00 0x00 0xff 0x00 0x00 0x00 0x00
10: 0x00 0x00 0x00 0x00 0x90 0x00 0x00 0x00 0x00 0x80
20: 0x80 0x80 0x80 0x80 0x00 0x00 0x00 0x00 0x00 0x00
170: 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0x0c 0x00 0x00
180: 0x00 0x30 0x1e 0xd2 0x60 0x60 0xb8 0x02 0x00 0x00
200: 0x00 0x00 0x00 0x00 0x00 0x45 0x54 0x00 0x00 0x00
210: 0x00 0x80 0x00 0x00 0x00 0x00 0x00 0x00 0x1c 0x00
220: 0x00 0x00 0x00 0x40 0x00 0x00 0x38 0x00 0x00 0x00
Alas, many of the unique values are in reserved registers (ie: 0x45 & 0x54 in 205 and 206), but registers 0 and 1 are documented, and 0x11 and 0xf8 in them might just be enough.
from si5351arduino.
Related Issues (20)
- Compatibility HOT 4
- multisynth_calc when r_div applied
- New/alternative method for exact solutions for PLL and multisync ratios HOT 16
- No STOP after si5351.update_status() on NRF52832
- Delay between CLK0 and CLK1 HOT 1
- Nullify spread spectrum
- Jittering output frequency HOT 1
- Chatter, Pop and Clicks HOT 1
- need definition of error messages HOT 3
- reset spread spectrum enable in init code
- Si5351 - ESP8266 WSPR beacon VHF HOT 2
- Repeated definition for output clock divide by 64 in function select_r_div HOT 1
- Repeated definition for output clock divide by 64 in function select_r_div
- Code builds fine for Raspberry Pi Pico, but does not work.... HOT 1
- Wire conflict
- Problems with SI5351B-GM1 only two outputs working and they don't match. HOT 1
- Handle missing external clock, either fallback to internal oscillator or switching off output HOT 2
- VCXO Calibration Issue
- Si5351.h and AtTiny3216 HOT 1
- The comments in the title block of SI5351.set_freq(freq, clk) say freq units are Hz. I think they are Hz*100ULL. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from si5351arduino.