{"id":279,"date":"2021-06-06T17:11:38","date_gmt":"2021-06-06T16:11:38","guid":{"rendered":"https:\/\/fletch.scot\/wp\/?p=279"},"modified":"2021-06-06T21:25:23","modified_gmt":"2021-06-06T20:25:23","slug":"si5351a-vfo-for-ic-based-receiver","status":"publish","type":"post","link":"https:\/\/fletch.scot\/wp\/?p=279","title":{"rendered":"Si5351a VFO for IC Based Receiver"},"content":{"rendered":"<p>This is a drop-in replacement for a Colpitt\u2019s oscillator as the local oscillator for the mixer in a direct conversion receiver using a NE602. So it has no frills \u2014 it just generates a square wave at the required frequencies. The tuning is done with a rotary encoder. The receiver I want it for works on the CW part of the 40m band so the VFO tunes from 7.000 MHz to 7.020 MHz. An LED lights when a frequency limit has been hit. The encoder button is used to toggle the tuning rate between fast (1000 Hz per click) and slow (100 Hz per click). These can be changed to any pair of values, as can the frequency limits.<\/p>\n<p>A Si5351a synthesiser is used to generate the square wave. It is controlled by a PIC micro-controller.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"PIC 887 VFO Layout.png\" src=\"https:\/\/fletch.scot\/wp\/wp-content\/uploads\/2021\/06\/PIC-887-VFO-Layout.png\" alt=\"PIC 887 VFO Layout\" width=\"535\" height=\"374\" border=\"0\" \/><\/p>\n<p>I wanted to use a small 8-pin PIC for this to make the VFO have a small footprint. I chose a PIC12F1840 which has the I2C built-in needed to drive the Si5351a. But I found that I couldn\u2019t program this PIC with my ageing PICkit2. So I tried my even more ancient K150 programmer \u2014 no joy here either. So I\u2019ve had to use a PIC16F887 for now \u2014 even though it must be twenty times bigger. I considered bit-banging the I2C with a PIC12F683 or a PIC12F688, but it looks pretty onerous and I don\u2019t want to spend my time chasing I2C errors. It may be the time has come to move on from PICs though I haven\u2019t seen any alternatives that appeal yet.<\/p>\n<p>The code traps encoder turns as interrupts and works out which way the encoder is turning. The debounced encoder button and frequency changes are done in the main (endless) loop. The Si5351a I2C is driven using a port of Hans Summer\u2019s Si5351a Arduino demo. Thanks Hans! I\u2019m also using one of <a href=\"http:\/\/www.hanssummers.com\/weaver\/323-synth.html\">Hans\u2019 Si5351a module kits<\/a>. I \u2018trimmed\u2019 the 27 MHz crystal by changing the value of SI_XTAL_FREQ in si5351a.h to 27003934 which gave the expected frequencies as seen on my ancient\u00a0<a href=\"http:\/\/www.radiomuseum.org\/r\/racal_uhf_frequency_counter_9916.html\">RACAL-DANA 9916<\/a> frequency counter.<\/p>\n<p>Here are the <a href=\"https:\/\/fletch.scot\/code\/vfo-icbasedrx.zip\">source files and make file<\/a> to build the VFO.<\/p>\n<p>I haven\u2019t tried this in the receiver yet, but it\u2019s hopefully useful as it is.<\/p>\n<p>Sometimes an encoder turn isn\u2019t seen, but this doesn\u2019t seem to be too obvious in use. I intend to fix that when I port the code to whatever PIC replacement I choose.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a drop-in replacement for a Colpitt\u2019s oscillator as the local oscillator for the mixer in a direct conversion receiver using a NE602. So it has no frills \u2014 it just generates a square wave at the required frequencies. The tuning is done with a rotary encoder. The receiver I want it for works &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/fletch.scot\/wp\/?p=279\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Si5351a VFO for IC Based Receiver&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[34],"class_list":["post-279","post","type-post","status-publish","format-standard","hentry","tag-radio"],"_links":{"self":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=279"}],"version-history":[{"count":3,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions"}],"predecessor-version":[{"id":282,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/279\/revisions\/282"}],"wp:attachment":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}