{"id":1075,"date":"2016-05-24T21:20:46","date_gmt":"2016-05-24T21:20:46","guid":{"rendered":"http:\/\/wp.andreas.bieri.name\/myblog\/?p=1075"},"modified":"2016-05-24T21:20:46","modified_gmt":"2016-05-24T21:20:46","slug":"si5351-democode-phase-einstellen","status":"publish","type":"post","link":"http:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/","title":{"rendered":"Si5351 Democode: Phase einstellen"},"content":{"rendered":"<p>Jason ist DIE Anlaufstelle f\u00fcr den Amateurfunk Bastler, was den PLL Chip Si5351 angeht. Er hat auch diverse Bibliotheken geschrieben.<\/p>\n<p><a href=\"http:\/\/nt7s.com\/2014\/06\/si5351-libraries-and-breakout-board\/\">Jason &#8211; Ripples in the Ether<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/etherkit\/Si5351Arduino\">Etherkit auf Github<\/a><\/p>\n<p><span style=\"color: #3366ff;\">\/*<\/span><br \/>\n<span style=\"color: #3366ff;\"> * si5351phase.ino &#8211; Example for setting phase with Si5351Arduino library<\/span><br \/>\n<span style=\"color: #3366ff;\"> *<\/span><br \/>\n<span style=\"color: #3366ff;\"> * Copyright (C) 2015 Jason Milldrum &lt;milldrum@gmail.com&gt;<\/span><br \/>\n<span style=\"color: #3366ff;\"> *<\/span><br \/>\n<span style=\"color: #3366ff;\"> * This program is free software: you can redistribute it and\/or modify<\/span><br \/>\n<span style=\"color: #3366ff;\"> * it under the terms of the GNU General Public License as published by<\/span><br \/>\n<span style=\"color: #3366ff;\"> * the Free Software Foundation, either version 3 of the License, or<\/span><br \/>\n<span style=\"color: #3366ff;\"> * (at your option) any later version.<\/span><br \/>\n<span style=\"color: #3366ff;\"> *<\/span><br \/>\n<span style=\"color: #3366ff;\"> * This program is distributed in the hope that it will be useful,<\/span><br \/>\n<span style=\"color: #3366ff;\"> * but WITHOUT ANY WARRANTY; without even the implied warranty of<\/span><br \/>\n<span style=\"color: #3366ff;\"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\u00a0 See the<\/span><br \/>\n<span style=\"color: #3366ff;\"> * GNU General Public License for more details.<\/span><br \/>\n<span style=\"color: #3366ff;\"> *<\/span><br \/>\n<span style=\"color: #3366ff;\"> * You should have received a copy of the GNU General Public License<\/span><br \/>\n<span style=\"color: #3366ff;\"> * along with this program.\u00a0 If not, see &lt;<a style=\"color: #3366ff;\" href=\"http:\/\/www.gnu.org\/licenses\/\">http:\/\/www.gnu.org\/licenses\/<\/a>&gt;.<\/span><br \/>\n<span style=\"color: #3366ff;\"> *\/<\/span><br \/>\n<span style=\"color: #3366ff;\">\u00a0<\/span><br \/>\n<span style=\"color: #3366ff;\">\/*<\/span><br \/>\n<span style=\"color: #3366ff;\"> * Setting the phase of a clock requires that you manually set the PLL and<\/span><br \/>\n<span style=\"color: #3366ff;\"> * take the PLL frequency into account when calculation the value to place<\/span><br \/>\n<span style=\"color: #3366ff;\"> * in the phase register. As shown on page 10 of Silicon Labs Application<\/span><br \/>\n<span style=\"color: #3366ff;\"> * Note 619 (AN619), the phase register is a 7-bit register, where a bit<\/span><br \/>\n<span style=\"color: #3366ff;\"> * represents a phase difference of 1\/4 the PLL period. Therefore, the best<\/span><br \/>\n<span style=\"color: #3366ff;\"> * way to get an accurate phase setting is to make the PLL an even multiple<\/span><br \/>\n<span style=\"color: #3366ff;\"> * of the clock frequency, depending on what phase you need.<\/span><br \/>\n<span style=\"color: #3366ff;\"> *<\/span><br \/>\n<span style=\"color: #3366ff;\"> * If you need a 90 degree phase shift (as in many RF applications), then<\/span><br \/>\n<span style=\"color: #3366ff;\"> * it is quite easy to determine your parameters. Pick a PLL frequency that<\/span><br \/>\n<span style=\"color: #3366ff;\"> * is an even multiple of your clock frequency (remember that the PLL needs<\/span><br \/>\n<span style=\"color: #3366ff;\"> * to be in the range of 600 to 900 MHz). Then to set a 90 degree phase shift,<\/span><br \/>\n<span style=\"color: #3366ff;\"> * you simply enter that multiple into the phase register. Remember when <\/span><br \/>\n<span style=\"color: #3366ff;\"> * setting multiple outputs to be phase-related to each other, they each need<\/span><br \/>\n<span style=\"color: #3366ff;\"> * to be referenced to the same PLL.<\/span><br \/>\n<span style=\"color: #3366ff;\"> *\/<\/span><\/p>\n<pre>#include \"si5351.h\"\n#include \"Wire.h\"<\/pre>\n<pre>Si5351 si5351;<\/pre>\n<pre>void setup()\n{\n\u00a0 \/\/ Start serial and initialize the Si5351\n\u00a0 Serial.begin(57600);\n\u00a0 si5351.init(SI5351_CRYSTAL_LOAD_8PF, 0);\n\u00a0 \n\u00a0 \/\/ We will output 14.1 MHz on CLK0 and CLK1.\n\u00a0 \/\/ A PLLA frequency of 705 MHz was chosen to give an even\n\u00a0 \/\/ divisor by 14.1 MHz.\n\u00a0 unsigned long long freq = 1410000000ULL;\n\u00a0 unsigned long long pll_freq = 70500000000ULL;<\/pre>\n<pre>\u00a0 \/\/ Set PLLA to the chosen frequency\n\u00a0 si5351.set_pll(pll_freq, SI5351_PLLA);\n\u00a0 \n\u00a0 \/\/ Set CLK0 and CLK1 to use PLLA as the MS source\n\u00a0 si5351.set_ms_source(SI5351_CLK0, SI5351_PLLA);\n\u00a0 si5351.set_ms_source(SI5351_CLK1, SI5351_PLLA);\n\u00a0 \n\u00a0 \/\/ Set CLK0 and CLK1 to output 14.1 MHz with a fixed PLL frequency\n\u00a0 si5351.set_freq(freq, pll_freq, SI5351_CLK0);\n\u00a0 si5351.set_freq(freq, pll_freq, SI5351_CLK1);<\/pre>\n<pre>\u00a0 \/\/ Now we can set CLK1 to have a 90 deg phase shift by entering\n\u00a0 \/\/ 50 in the CLK1 phase register, since the ratio of the PLL to\n\u00a0 \/\/ the clock frequency is 50.\n\u00a0 si5351.set_phase(SI5351_CLK0, 0);\n\u00a0 si5351.set_phase(SI5351_CLK1, 50);\n\u00a0 \n\u00a0 \/\/ We need to reset the PLL before they will be in phase alignment\n\u00a0 si5351.pll_reset(SI5351_PLLA);\n}<\/pre>\n<pre>void loop()\n{\n\u00a0 \/\/ Read the Status Register and print it every 10 seconds\n\u00a0 si5351.update_status();\n\u00a0 Serial.print(\"SYS_INIT: \");\n\u00a0 Serial.print(si5351.dev_status.SYS_INIT);\n\u00a0 Serial.print(\"\u00a0 LOL_A: \");\n\u00a0 Serial.print(si5351.dev_status.LOL_A);\n\u00a0 Serial.print(\"\u00a0 LOL_B: \");\n\u00a0 Serial.print(si5351.dev_status.LOL_B);\n\u00a0 Serial.print(\"\u00a0 LOS: \");\n\u00a0 Serial.print(si5351.dev_status.LOS);\n\u00a0 Serial.print(\"\u00a0 REVID: \");\n\u00a0 Serial.println(si5351.dev_status.REVID);<\/pre>\n<pre>\u00a0 delay(10000);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Jason ist DIE Anlaufstelle f\u00fcr den Amateurfunk Bastler, was den PLL Chip Si5351 angeht. Er hat auch diverse Bibliotheken geschrieben. Jason &#8211; Ripples in the Ether Etherkit auf Github \/* * si5351phase.ino &#8211; Example for setting phase with Si5351Arduino library * * Copyright (C) 2015 Jason Milldrum &lt;milldrum@gmail.com&gt; * * This program is free software: [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[18,119],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v18.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Si5351 Democode: Phase einstellen - Merkbar.<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Si5351 Democode: Phase einstellen - Merkbar.\" \/>\n<meta property=\"og:description\" content=\"Jason ist DIE Anlaufstelle f\u00fcr den Amateurfunk Bastler, was den PLL Chip Si5351 angeht. Er hat auch diverse Bibliotheken geschrieben. Jason &#8211; Ripples in the Ether Etherkit auf Github \/* * si5351phase.ino &#8211; Example for setting phase with Si5351Arduino library * * Copyright (C) 2015 Jason Milldrum &lt;milldrum@gmail.com&gt; * * This program is free software: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/\" \/>\n<meta property=\"og:site_name\" content=\"Merkbar.\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-24T21:20:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"wp_blogadmin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/52.29.166.97\/myblog\/#website\",\"url\":\"http:\/\/52.29.166.97\/myblog\/\",\"name\":\"Merkbar.\",\"description\":\"IT, Elektronik und Mathematik\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/52.29.166.97\/myblog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"de\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/#webpage\",\"url\":\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/\",\"name\":\"Si5351 Democode: Phase einstellen - Merkbar.\",\"isPartOf\":{\"@id\":\"http:\/\/52.29.166.97\/myblog\/#website\"},\"datePublished\":\"2016-05-24T21:20:46+00:00\",\"dateModified\":\"2016-05-24T21:20:46+00:00\",\"author\":{\"@id\":\"http:\/\/52.29.166.97\/myblog\/#\/schema\/person\/47691942dec3f2eb9d34bb8b5507870d\"},\"breadcrumb\":{\"@id\":\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"http:\/\/52.29.166.97\/myblog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Si5351 Democode: Phase einstellen\"}]},{\"@type\":\"Person\",\"@id\":\"http:\/\/52.29.166.97\/myblog\/#\/schema\/person\/47691942dec3f2eb9d34bb8b5507870d\",\"name\":\"wp_blogadmin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/52.29.166.97\/myblog\/#personlogo\",\"inLanguage\":\"de\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/d0dc804558b03f640b22e497ec010c9a?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/d0dc804558b03f640b22e497ec010c9a?s=96&d=mm&r=g\",\"caption\":\"wp_blogadmin\"},\"url\":\"http:\/\/wp.andreas.bieri.name\/myblog\/author\/wp_blogadmin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Si5351 Democode: Phase einstellen - Merkbar.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/","og_locale":"de_DE","og_type":"article","og_title":"Si5351 Democode: Phase einstellen - Merkbar.","og_description":"Jason ist DIE Anlaufstelle f\u00fcr den Amateurfunk Bastler, was den PLL Chip Si5351 angeht. Er hat auch diverse Bibliotheken geschrieben. Jason &#8211; Ripples in the Ether Etherkit auf Github \/* * si5351phase.ino &#8211; Example for setting phase with Si5351Arduino library * * Copyright (C) 2015 Jason Milldrum &lt;milldrum@gmail.com&gt; * * This program is free software: [&hellip;]","og_url":"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/","og_site_name":"Merkbar.","article_published_time":"2016-05-24T21:20:46+00:00","twitter_card":"summary","twitter_misc":{"Verfasst von":"wp_blogadmin","Gesch\u00e4tzte Lesezeit":"3 Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/52.29.166.97\/myblog\/#website","url":"http:\/\/52.29.166.97\/myblog\/","name":"Merkbar.","description":"IT, Elektronik und Mathematik","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/52.29.166.97\/myblog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"de"},{"@type":"WebPage","@id":"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/#webpage","url":"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/","name":"Si5351 Democode: Phase einstellen - Merkbar.","isPartOf":{"@id":"http:\/\/52.29.166.97\/myblog\/#website"},"datePublished":"2016-05-24T21:20:46+00:00","dateModified":"2016-05-24T21:20:46+00:00","author":{"@id":"http:\/\/52.29.166.97\/myblog\/#\/schema\/person\/47691942dec3f2eb9d34bb8b5507870d"},"breadcrumb":{"@id":"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wp.andreas.bieri.name\/myblog\/2016\/05\/24\/si5351-democode-phase-einstellen\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"http:\/\/52.29.166.97\/myblog\/"},{"@type":"ListItem","position":2,"name":"Si5351 Democode: Phase einstellen"}]},{"@type":"Person","@id":"http:\/\/52.29.166.97\/myblog\/#\/schema\/person\/47691942dec3f2eb9d34bb8b5507870d","name":"wp_blogadmin","image":{"@type":"ImageObject","@id":"http:\/\/52.29.166.97\/myblog\/#personlogo","inLanguage":"de","url":"http:\/\/1.gravatar.com\/avatar\/d0dc804558b03f640b22e497ec010c9a?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/d0dc804558b03f640b22e497ec010c9a?s=96&d=mm&r=g","caption":"wp_blogadmin"},"url":"http:\/\/wp.andreas.bieri.name\/myblog\/author\/wp_blogadmin\/"}]}},"_links":{"self":[{"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/posts\/1075"}],"collection":[{"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/comments?post=1075"}],"version-history":[{"count":0,"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/posts\/1075\/revisions"}],"wp:attachment":[{"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/media?parent=1075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/categories?post=1075"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wp.andreas.bieri.name\/myblog\/wp-json\/wp\/v2\/tags?post=1075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}