diff options
author | Camil Staps | 2017-01-17 00:15:56 +0100 |
---|---|---|
committer | Camil Staps | 2017-01-17 00:15:56 +0100 |
commit | e10fb3b11a6f57bfcf845c1bf07ea069052b6e52 (patch) | |
tree | 54a1b606d2ae6794672f15d969781bbd69512ce0 | |
parent | Reorganise jade (diff) |
Ham pages
-rw-r--r-- | resources/img/github.png | bin | 0 -> 1714 bytes | |||
-rw-r--r-- | resources/jade/finals/ham/cw-decoder.jade | 77 | ||||
-rw-r--r-- | resources/jade/finals/ham/index.jade | 12 | ||||
-rw-r--r-- | resources/jade/finals/index.jade | 2 | ||||
-rw-r--r-- | resources/jade/include/head.jade | 5 | ||||
-rw-r--r-- | resources/jade/include/layout-ham.jade | 9 | ||||
-rw-r--r-- | resources/jade/include/layout-sidebar.jade | 30 | ||||
-rw-r--r-- | resources/jade/include/layout.jade | 5 |
8 files changed, 135 insertions, 5 deletions
diff --git a/resources/img/github.png b/resources/img/github.png Binary files differnew file mode 100644 index 0000000..8b25551 --- /dev/null +++ b/resources/img/github.png diff --git a/resources/jade/finals/ham/cw-decoder.jade b/resources/jade/finals/ham/cw-decoder.jade new file mode 100644 index 0000000..bc8636b --- /dev/null +++ b/resources/jade/finals/ham/cw-decoder.jade @@ -0,0 +1,77 @@ +extends layout-ham.jade + +block prepend menu + - var page = 'cw-decoder' + - var sections = ['Porting to PIC', 'Finishing', 'Future plans'] + +block subtitle + | CW Decoder +block subtitleDate + | January 2017 + +block subtitle-right + +githubLink('camilstaps/CWDecoder') + +block page + h4 Introduction + p. + We discuss a small PIC-based CW decoder, a great help for a beginning ham. + The base is taken from Budd Churchward WB7FHC's #[a(href='http://www.mypetarduino.com/ReadCode/readCode.01.html') Arduino-based decoder]. + My own source code, for a PIC16F88, is #[a(href='https://github.com/camilstaps/CWDecoder') on GitHub]. + + h4 Porting to PIC + p. + While the project is great, I was unable to resign myself to use an Arduino. + Arduino is nice for prototyping, but too many people use it as an end product, wasting space and resources. + Worst of all, they fail to learn principles of electrical engineering and programming on minimal architectures. + p. + Hence, I decided to port the project to a PIC microcontroller. + PIC is a wide range of microcontrollers developed by #[a(href='http://microchip.com') Microchip]. + For this project, a simple 8-bit chip is more than enough. + The only thing we need to look out for is that the clock is fast enough. + I went with the #[a(href='http://www.microchip.com/wwwproducts/en/pic16f88') PIC16F88] which has 5MIPS, for the simple reason that I had it in stock. + Anything will do. + p. + Porting the Arduino code (which is a C++ dialect) to C is relatively easy. + The only complication is the <code>millis()</code> function. + On Arduino, this returns the number of milliseconds since startup. + This is part of the Arduino bootstrapping code, which we do not have on PIC, so a small wrapper for this function had to be written. + The same functionality can be achieved with a timer and an interrupt service routine (which is, I assume, the way it works on Arduino as well). + p. + For the LCD I used a 4x40 display with green backlight. + It is #[a(href='http://www.ekenrooi.net/lcd/lcd.shtml') HD44780]-based but has two control chips, which can be turned on and off using two enable lines. + My #[a(href='https://github.com/camilstaps/HD44780_PIC') HD44780_PIC] C library can deal with this, as well as with 4- and 8-bit interface. + (This is all done through preprocessing <code>#define</code> statements so it does not slow down the code.) + p. + Other than these two points, porting the code was straightforward and no major changes have been made. + + h4 Finishing + p. + There was not much space left next to the display. + I had just enough space for the LED, the reset button and the volume button. + The LED is absolutely necessary on the front for feedback. + p. + The 4x40 LCD performs very well. + A 4x20 or perhaps 2x40 would do the job as well, but I wouldn't go smaller than that. + Sometimes characters are missed or noise is interpreted as a character, so you should expect that perhaps 80% of the character space is used for the actual text. + p. + There is no need to place the frequency potentiometer on the front because it should be fixed to your side tone. + I found that a high-precision potentiometer is very useful to adjust the frequency. + The bandwidth of the audio mixer is relatively narrow. + + h4 Future plans + p. + I intend to make the decoded text not only available on the LCD but also on the UART module. + The RX pin is used already, but one-way communication will be enough. + This way, another module could log QSOs to an SD card, another idea I have been playing with. + p. + Another addition I'd like to make is a fix-frequency button. + This would disable the automatic adaption to the current speed. + It could be pressed at the start of a QSO and released afterwards. + I hope that in this way the decoder can become less sensitive to background noise. + p. + Lastly, some status information would be nice on the LCD. + Concretely, I'm thinking about the estimated WPM. + This should be fairly simple to implement. + It could also be useful to have an accuracy estimation. + Figures that could be used for this are the standard deviation on the length of dits and dahs and the amount of jitter during a dit or dah. diff --git a/resources/jade/finals/ham/index.jade b/resources/jade/finals/ham/index.jade new file mode 100644 index 0000000..5b1121d --- /dev/null +++ b/resources/jade/finals/ham/index.jade @@ -0,0 +1,12 @@ +extends layout-ham.jade + +block prepend menu + - var page = 'home' + +block subtitle + | Home + +block page + p. + This is a collection of some Ham radio related projects of mine. + Perhaps it will be larger than this one day. diff --git a/resources/jade/finals/index.jade b/resources/jade/finals/index.jade index d6d0341..81baa53 100644 --- a/resources/jade/finals/index.jade +++ b/resources/jade/finals/index.jade @@ -109,7 +109,7 @@ block content h2 Other interests ul - li I am a radio amateur (#[a(href="https://www.hamqth.com/PD7LOL") PD7LOL]). I am primarily active on 20m with CW. + li I am a radio amateur (#[a(href="/ham") PD7LOL]). I am primarily active on 20m with CW. li I am a community moderator at the #[a(href="https://philosophy.stackexchange.com") Philosophy Stack Exchange]. li Making paper cuts, such as #[a(href="/assets/img/papercut.png") this one] or #[a(href="/assets/img/papercut-whales.png") that one]. li I have been a volunteer in the #[a(href="http://www.taize.fr/") Taizé] community in 2013-14. diff --git a/resources/jade/include/head.jade b/resources/jade/include/head.jade index e5de38b..7099c24 100644 --- a/resources/jade/include/head.jade +++ b/resources/jade/include/head.jade @@ -1,6 +1,7 @@ title - block title - | Camil Staps + block titleContainer + block title + | Camil Staps meta(charset='utf-8') meta(http-equiv='X-UA-Compatible', content='IE=edge') diff --git a/resources/jade/include/layout-ham.jade b/resources/jade/include/layout-ham.jade new file mode 100644 index 0000000..09bb3b7 --- /dev/null +++ b/resources/jade/include/layout-ham.jade @@ -0,0 +1,9 @@ +extends layout-sidebar.jade + +block title + | PD7LOL + +block append menu + - var base_url = '/ham/' + +menuItem('home' == page, base_url, 'Home') + +menuItem('cw-decoder' == page, base_url + 'cw-decoder.html', 'CW Decoder') diff --git a/resources/jade/include/layout-sidebar.jade b/resources/jade/include/layout-sidebar.jade new file mode 100644 index 0000000..6e4610b --- /dev/null +++ b/resources/jade/include/layout-sidebar.jade @@ -0,0 +1,30 @@ +extends layout.jade + +block append titleContainer + | – + block subtitle + +block content + div.row + div.col-lg-3.col-md-4 + ul.nav.nav-pills.nav-stacked + block menu + mixin menuItem(active, link, text) + li(role='presentation', class=active ? 'active' : '') + a(href=link)= text + + + div.col-lg-7.col-md-6 + h3(style={'margin-top': 0}) + block subtitle + | + small + block subtitleDate + div.col-lg-2.col-md-2.text-right + block subtitle-right + mixin githubLink(repo) + a(href='https://github.com/' + repo, target='_blank', title='Source on GitHub') + img(src='/assets/img/github.png', alt='GitHub') + + div.col-lg-9.col-md-8.text-justify + block page diff --git a/resources/jade/include/layout.jade b/resources/jade/include/layout.jade index 0e1ef16..685be88 100644 --- a/resources/jade/include/layout.jade +++ b/resources/jade/include/layout.jade @@ -6,8 +6,9 @@ html(lang="en") body .container h1 - block title - | Camil Staps + block titleContainer + block title + | Camil Staps hr block content |