{"id":350,"date":"2022-10-28T10:53:57","date_gmt":"2022-10-28T09:53:57","guid":{"rendered":"https:\/\/fletch.scot\/wp\/?p=350"},"modified":"2022-10-28T10:58:10","modified_gmt":"2022-10-28T09:58:10","slug":"wspr-transmitter-code-and-development","status":"publish","type":"post","link":"https:\/\/fletch.scot\/wp\/?p=350","title":{"rendered":"WSPR Transmitter&#8211;Code and Development"},"content":{"rendered":"<p>The WSPR Transmitter has, of course, firmware code. The D1 Mini runs most of the code, with the PIC12F1640 running the LPF driver.\u00a0I hold the source code in a git repository on a local server.<\/p>\n<p>The D1 Mini code was developed on a Raspberry Pi 4 mostly using <a href=\"https:\/\/www.arduino.cc\/pro\/cli\">Arduino CLI<\/a>\u00a0and vi. I used a couple of helper shell scripts (ardcomp and ardup below) to compile and upload. There are a couple of libraries required: ESP8266 and HCRTC. wspr_rtc_ad9850.ino takes about 19s to compile on Raspberry Pi 4, which is about twice as fast as a Raspberry Pi 3B+.\u00a0<\/p>\n<pre>ardcomp: <br \/>arduino-cli compile --fqbn esp8266:esp8266:d1_mini_clone $*<\/pre>\n<pre>ardup: <br \/>arduino-cli upload -p \/dev\/ttyUSB0 --fqbn esp8266:esp8266:d1_mini_clone $*<\/pre>\n<p>I used a Raspberry Pi 4 because I like to protect the USB ports on expensive computers from the possibility of smoke due to any misadventures I may cause. See my <a href=\"https:\/\/fletch.scot\/wp\/?p=348\">previous post<\/a>.<\/p>\n<p>The PIC code was developed using MPLAB on an HP14S laptop running Windows 10. The USB port is protected (hopefully) by the PICkit 3 dongle that is needed to program the PIC. I\u2019m not a great fan of MPLAB but, once you realise you can ignore all the marketing, it suffices.<\/p>\n<p>The source is in this <a href=\"https:\/\/fletch.scot\/code\/wsprtx.zip\">ZIP file<\/a>. It\u2019s at the stage it was when I made smoke. The code was working&#8211;it was the power supply circuit that was faulty!<\/p>\n<p>My previous posts explain the code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The WSPR Transmitter has, of course, firmware code. The D1 Mini runs most of the code, with the PIC12F1640 running the LPF driver.\u00a0I hold the source code in a git repository on a local server. The D1 Mini code was developed on a Raspberry Pi 4 mostly using Arduino CLI\u00a0and vi. I used a couple &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/fletch.scot\/wp\/?p=350\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WSPR Transmitter&#8211;Code and Development&#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":[40,56],"class_list":["post-350","post","type-post","status-publish","format-standard","hentry","tag-firmware","tag-wspr"],"_links":{"self":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/350","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=350"}],"version-history":[{"count":4,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/350\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=\/wp\/v2\/posts\/350\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fletch.scot\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}