GithubHelp home page GithubHelp logo

pavelmc / si5351mcu Goto Github PK

View Code? Open in Web Editor NEW
60.0 16.0 25.0 88 KB

Arduino Si5351 library tuned for size and click free.

License: GNU General Public License v3.0

C++ 100.00%
arduino si5351 bitx20 click-free pll dds vfo hamradio homebrew co7wt

si5351mcu's People

Contributors

birdwes avatar per1234 avatar stdevpavelmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

si5351mcu's Issues

Strange Level (not frequency) problem around 150.000 Mhz

There is a problem with the level of the signals generated near and around 150.000 MHz.

The signals increase smoothly above the mean set by setPower() as soon as you are reaching 140.000 MHz and drop drastically just about 1Hz above 150.000 MHz (where they shows a maximum peak); they recover slowly and reach normal level as high as 180 Mhz.

Other libs don't show this behavior, the level is ok from 8kHz to about 140MHz, and from ~180Mhz up to 225 Mhz. So bitx users in HF range are safe.

If you use a almost pure resistive load you may not notice this as the effect is almost noticeable, but as soon as you place a LC filter in this band of freqs the effect is evident and noticeable, the peak and dip moves in a span estimated of about 6 dB.

I'm working on the math and logic behind this.

Pavel CO7WT.

Error in Si5351mcu::setFreq() on frequency change if "omsynth[clk] == outdivider", but R changes

If frequencies in steps of powers of 2 are selected, the second set of I2C writes are not executed.

To reproduce, e.g.

setFreq( 0, 100000 )
setFreq( 0, 50000 )
setFreq( 0, 25000 )

re-reading the registers shows that the update has not taken place. Oscilloscope readings confirm this.

Fix will be to change Si5351mcu::setFreq()

if (omsynth[clk] != outdivider) {

The above line needs to additionally check R value against a new cached version of that variable.

Discovered in implementing a test harness for Issue #8.

Suggested Feature: Spread Spectrum Enable/Disable

Great library! That you were able to include as much functionality as you did with as small a footprint is amazing! I have one suggestion for a feature to add, and that is the ability to enable or disable the spread spectrum feature. I know that feature is implemented in the 1.4.X version of Adafruit's library, but your library is much better and I'd love to see that feature added.

25 Mhz Init not working

Hi Pavel,

I found this library and it seems just what I need. I am using a "China" Attinny85 board with an original Adafruit SI5351 breakout board.

I tried a simple program to run 1 clock (0) at 16 Mhz. However when I measure I get an output of 14.8 Mhz instead. I think the Si.init(25000000); command seems to be ignored somehow (The Adafruit uses a 25Mhz crystal.

When I use Si.init(); I get also 14.8 Mhz on the output.

Am I doing something wrong ?

Thanks !

Allow for clock 1 and clock 2 to both run, but at the same frequency and different phase settings

It should be possible to run both clock 1 and clock 2 at the same time if they are set to the same frequency. Why do this? So they can be run 90 degrees apart in phase to drive an I/Q demodulator. It seems that just loading the phase registers with the correct constant and having the PLL run at an even multiple of the desired frequency should do this according the the eitherkit library readme file.

Too high outdivider limits max frequency

In the code is says

if (outdivider < 6) {   // low: below 6

but this limits the max output frequency to 150 MHz with maxPLL of 900MHz.

Should it not be

if (outdivider < 4) {   // low: below 4

No provision for a I2C bad communication or the IC not present

The library has no provision for a bad communication or even the IC not present, the sketch will simply hang and will not work.

It must has a way to alert the user that the IC in not there or even that there is no IC. In it most basic form it must not hang the full sketch for this.

Fixing compiler warnings when using library?

When I upgraded https://github.com/ramapcsx2/gbs-control to the latest library 0.7.1 (cbbd806) and built it in Arduino v1's "Compiler warnings: All" mode, I got many new warnings originating from this library.

I found that the library's header file includes useless const qualifiers on return types, as well as non-pointer scalars (useless in forward-declarations but not definitions), which trigger compiler warnings. Additionally, the source file reg_bank_26 etc. includes bit-shifted integers in a uint8_t array.

I've tried fixing the warnings in my vendored copy, at ramapcsx2/gbs-control#440. I decided to remove unnecessary consts in the header, and suppress -Wnarrowing in the source file rather than fixing the warnings, because adding uint8_t casts was visually harder to read and edit (making the code worse than before).

I also removed trailing whitespace in that PR. Is this something you want to fix upstream to cleanup the code formatting, or leave it in to avoid creating large diffs?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.