Author: admin

  • Cross-border AM radio: the big thing that’s gone missing

    Back in the early 1980s, The Netherlands had four national radio stations and three of these were on mediumwave. They could be heard far outside our national borders. On the other hand, two Dutch language stations from Belgium could be heard throughout The Netherlands, as well as two French language stations from that country. That was not all you could hear though: there were a bunch of German stations and some English stations to be heard as well. BBC World Service was booming in on 648 kHz. During some years, we had some good pirate stations too.

    Much radio listening still happened on mediumwave, as not all radios had the FM band back then and one of the national radio stations in The Netherlands was on mediumwave only. Starting in 1985, we got an additional national station (Hilversum 5) and it was on mediumwave only, but it took the frequency of Hilversum 1, which became FM-only.

    If your radio had longwave too, you got a bunch of foreign stations: from France, Luxembourg, the UK, Germany and some other countries. After sunset, the mediumwave band came to life and if you took the trouble, you could hear radio stations from all over Europe. These were some of the main national programmes of those countries, hence it was quality stuff. BBC Radio 1 played the latest British pop songs, weeks or sometimes months before they were allowed to enter our country. Radio Moscow once had a Dutch language service on mediumwave, one of the few international broadcasters to have one, along with South Africa (that and an even more objectionable regime and that was on the 16 meter band on shortwave). But at night the mediumwave band was indeed used as another shortwave band, on both sides of the Iron Curtain.

    If you had a good radio and you were skilled with the rotating ferrite bar antenna, you could often pick up two different stations on the same channel. Hearing stations outside Europe was a challenge though, as there were many more European stations occupying those frequencies. Today it’s relatively easy to pick up North Africa for example.

    And of course many, many countries had a presence on shortwave. Back in the day, the 49 meter band was chock full of stations, whatever time of the day you listened. Most European countries were all there, all the time. Higher shortwave bands, like 25m, 19m and 16m gave you the more distant stations. Shortwave was not listened to by everybody though. But everybody got exposed to mediumwave during day-to-day listening. And everybody occasionally heard foreign stations, if only unintentionally.

    We are less exposed to radio stations from other European countries than we were a few decades ago. Since 2003, the FM band in The Netherlands was reorganised and it became very overpopulated, reducing the opportunities to hear foreign stations on that band. DAB has a far shorter reach across the border than FM used to have. We have internet radio now, but some countries (in particular the UK) reduce their internet radio streams to within their own country. With true broadcast radio, there’s nothing between you and the station you want to hear, that can be controlled by governments. You can add jamming stations, but you can’t take radio propagation away. Compare that to the many links that exist between an internet radio station and you.

    Exposure to radio stations from other European countries was a good thing, even if you were not intentionally listening to them. It created an awareness of a being part of a larger Europe. In most places in The Netherlands we have access to over 50 stations on DAB+, but many of these are non-stop computer generated playlist stations without a soul. BBC World Service is actually available on DAB+ in The Netherlands, which is a good thing. But this will only last as long as somebody pays to have it there. And we should have German and French voices as well, plus something from Belgium. Some of those more-of-the-same popular music stations can really be missed and be exchanged for existing foreign radio stations. I know,this is not how commercial radio works. But why should everything work according to the rules of commercial radio?

    The UK is the last country with a significant presence on mediumwave in our part of Europe and it will likely stop by the end of this year. Nobody will bring mediumwave back. But maybe the EU should facilitate airing public radio broadcasts outside national borders, to replace what mediumwave used to do for us naturally. There’s spare capacity on some DAB+ multiplexes, like that of our national public broadcaster NPO. It carries 10 programmes, 2 of which will likely be axed by the end of this year. You can easily have 12 programmes with good audio. Why not get some Belgian, French or German stations there?

  • Why the Dutch keyboard layout never caught on.

    The Netherlands is one of the few countries in Europe that uses the US-QWERTY keyboard layout for computers. Before there were personal computers, we had typewriters and nearly all typewriters sold in The Netherlands had two dead keys: one dead key contained the acute and grave accents and the other contained the diaeresis and circumflex accents. When you press a dead key on a typewriter, the accent is printed, but the carriage does not advance. The next letter you type gets printed under the accent you just typed. The positions of many symbols on the keyboard were not standardised: different brands of typewriters could have the question mark in a different location. The letters always followed the QWERTY layout. Some did have a special key for the letter ij, on others you had to type the letters I and J separately.

    Typewriters in the UK and the USA typically didn’t have dead keys. If you really, really want to type an accented letter, you could type the apostrophe, then backspace and then the letter. The same could we done with the double quote to get something that resembled a letter with an umlaut or diaeresis. In The Netherlands we used to type a comma, then backspace and then the letter C to get a C-cedilla (ç). Typewriters in Germany had dedicated keys for Ä, Ö, Ü and ß. Typewriters in Sweden had Ä, Ö and Å, in Norway and Denmark they had Æ, Ø and Å. Most of them had dead keys for accented letter too.

    France and Belgium had the weird AZERTY layout. French typewriters typically had a single dead key for circumflex and diaeresis, the few letters with acute and grave had their own keys, as did c-cedilla, but all only in lowercase.

    When personal computers were introduced, nearly all European countries standardised on a keyboard layout that was similar to the layout of the local typewriters, except for The Netherlands, that used the US layout, without any support for accented letters. In Dutch, accented letters are infrequent, but they are still important. The IBM-PC allowed you to type arbitrary symbols by holding down the Alt-key and then typing the numeric code of the character on the numeric keypad. For example the letter ë could be had by typing Alt-1-3-7. Oddly enough, this still works in modern Windows, even though it no longer uses that character encoding at all. Yes, the old CP-437 codes are translated to whatever Unicode character is applicable.

    National keyboard layouts other than US-QWERTY, all have one additional key left of the leftmost letter on the lower row. On QWERTY, this means left of the Z key, but on QWERTZ, it’s left of the Y and on AZERTY, it’s left of the W. In most national layouts, this key has the less-than and greater-than symbols..As there is an extra key in that position, the left shift key is much smaller than on the US keyboard. Some US keyboards (ISO layout) have this additional key too, while it is redundant for US-QWERTY. Many typists prefer the true ANSI layout with the wider shift key and the horizontal Enter key, over the ISO layout with the narrow shift key and the vertical Enter key.

    National keyboard layouts other then US-QWERTY, also use the right Alt key (marked as Alt-Gr) to access additional symbols. The ASCII characters @, [, ], { and } often require the Alt-Gr key. Most national keyboard layouts use the keys right of the letters for national letters (like Ä, Æ or Ñ) and/or dead keys, making fewer keys available for symbols. Only the UK keyboard layout does not have national letters or dead keys and is very similar to US-QWERTY. It swaps the @ and double-quote, it puts the £ instead of the # above the 3 and it puts the # on the key normally used by the \ symbol, which moves to the additional key left of the Z.

    Programmers prefer the straight US-QWERTY layout over any national keyboard layout, because of the easy access to square brackets and curly braces, which are used frequently in C and similar programming languages.

    Interestingly enough, the Netherlands does have a national keyboard layout. See https://en.wikipedia.org/wiki/List_of_QWERTY_keyboard_language_variants under Dutch. This keyboard has dead keys, like the old typewriters and shuffles the symbols around quite a bit. the square brackets end up on the key left of the Z. These proper Dutch keyboards are very rare. They may have been used by government institutions and Dutch publishers, but as 99% of the users has US-QWERTY at home, they are used to it and want to use it for work too.

    The reason why the Dutch layout never caught on may be a combination of programmer preference and cost awareness. US keyboards are made in larger series, therefore they tend to be somewhat cheaper. Schools may have selected US-QWERTY because it is more practical for programming.

    In Belgium, even in the Dutch speaking part, AZERTY is still the norm. Some programmers do use QWERTY keyboards, but that’s always a special order.

    At least since the 1990s, Windows lets you configure the US-QWERTY keyboard as US International with dead keys. This changes the following:

    • the apostrophe and double quote key becomes a dead key for acute accent and diaeresis. The same goes for the Caret (circumflex on shift 6) and the grave and tilde key.
    • The right Alt key gives access to many additional symbols and accented letters. Unfortunately for Dutch users, the letters ë and ï are not accessible this way, they require the dead double quote key instead.

    The US International layout with dead keys, is considered the Dutch keyboard layout, but this is not the same as the real Dutch keyboard layout. The big disadvantage is that you need to type an additional space whenever you type an apostrophe or double quote (or caret, left quote or tilde). This is super annoying for programmers, but it can also get in your way when typing just text..

    Linux distributions come with another option: US International with AltGr dead keys. It differs from US international with dead keys in the following way:

    • The dead keys only become dead when you type them with AltGr (the right Alt key). When you type the apostrophe key normally, you just get the apostrophe. It only becomes the dead acute accent key when typed with AltGr.
    • The set of symbols accessible with AltGr (without dead keys) is changed somewhat. the imported Dutch accented letters ë and ï are now in.

    But there are other layouts based on US-QWERTY as well, see for example: https://altgr-weur.eu/

    In Linux you can also configure a Compose key. You can use the right Control key, the right “Windows” key or the Menu key for that purpose. The disadvantage is that it requires three keystrokes to get a composed character. For example you type Compose, followed by /, followed by o to get ø. The advantage is you get access to many more symbols than with just dead keys or Alt-Gr combinations and that these symbols are mostly logical and easy to remember combinations of ASCII characters.

    Finally, Linux allows you to type any arbitrary Unicode character by typing first Ctrl-Shift-u, then the hex code of the desired character and finally Enter. For example Ctrl-shift-u, then the letter e b, then Enter gives you ë.

  • Open source radio receiver projects

    Today’s single-chip radio tuner chips make it possible for hobbyists to construct decent quality broadcast receivers. One chip that has been around for 15 years or so is the Skyworks (formerly known as Silicon Labs) Si4735. This chip contains a full LW/MW/SW/FM radio tuner from antenna to audio. It requires a microcontroller to control it, for example the 8-bit AVR processor used by Arduino. There are many hobbyist and open-source designs based on this chip. The Si4735 is an SDR radio internally, it does all filtering and demodulation on its internal DSP. There is a custom firmware blob for it that can demodulate SSB. However, this firmware blob is not open source. The AVR sends the Si475 its commands to tune to a specified frequency and set its other operating parameters, The AVR controls the display and the user controls of the radio. There are many ready-made Chines radios designed around this chip (or the Si4732) and an Arduino/AVR. This chip gives nearly continuous LW/MW/SW coverage up to 30 MHz.It is also the main part (or the final IF filter/demodulator) of nearly all world band radios currently on the market.

    Another single-chip radio tuner is the TEF-6686, designed by NXP. This chip contains a very capable FM tuner, along with LW, MW and SW. SW coverage is limited to 27 MHz (not 30) and there is no way to do SSB. As microcontrollers are now predominantly 32-bit, the TEF-6686 radios (and some newer Si473x designs too) uses an ESP32 microcontroller. One such open-source design was provided by PE6PVB https://www.pe5pvb.nl. This design has found its way to numerous ready-made Chinese radios too.

    There is also the Skyworks Si4684, a complete FM/DAB+ radio on a chip. PE5PVB designed a very capable DAB+ radio around it, using this chip, an ESP32 and a colour display. As the ESP32 does slide show decoding and display, the software uses nearly all the flash of the ESP32, so the FM side of the chip cannot be accessed using the current software. Unfortunately, there are no ready-made Chinese versions of this radio yet. DAB+ is not a thing in China and many markets these Chinese radios get exported to.,

    As interesting as these projects are, they leave the nitty-gritty radio stuff to a closed-source DSP and the open-source part is only about user control and sometimes RDS decoding or decoding of other digital data that comes with the radio signal. The Pico Rx project is different though. See https://github.com/dawsonjon/PicoRX There a Raspberry Pi Pico does all the hard work of an SDR in software. It uses minimalistic front-end circuitry (a set of analogue multiplexers to act as an IQ mixer and some frontend filters) and uses the on-board circuitry of the Pico itself for the rest, including A/D converters and the I/Q oscillator signal generation. This circuit gives you a capable all-mode HF receiver (0-30 MHz), optionally with a spectrum display. All the DSP stuff is done on the Pico, which is a fairly powerful dual-core 32-bit microcontroller in its own right. The radio can run on batteries and draws little current.

  • Should DAB be on portable shortwave radios?

    At least since the 1970s, portable world band radios have covered the FM broadcast band (and of course mediumwave). People would purchase a radio to listen to shortwave broadcasts when on holiday, but they could also use it as a normal radio while at home. Back in those days there was no internet and international phone calls were prohibitively expensive. Shortwave was often the only viable way to receive information from your home country.when you travelled abroad. Some countries even ran a service to alert specific persons about an urgent situation at home, like an unexpected death. Radio Netherlands was such a station and my father and I were very keen never to skip this broadcast for a single day.

    The market for shortwave receivers has decreased and shortwave listening has shifted from the broadcast bands to the amateur bands. There are far fewer stations broadcasting on shortwave and the ones that remain are mostly either religious propaganda or China Radio International. In the western world. any interesting broadcast could be listened to more conveniently via the internet.

    But as any avid shortwave listener knows, you do not listen to shortwave broadcasts just to get the information, but for the thrill of receiving a signal from a great distance, especially if that signal was not supposed to reach you at all. For example if a religious broadcaster beams from Australia to India, but the signal takes the next hop and reaches Europe too.

    If you live in an apartment with no real possibility to have an outdoor antenna, portable radios are the way to go. Even a nearby park in your home town gives you better reception than when you are at home.

    None of the world band radios currently on the market has DAB+, but I think it should be included for the following reasons:

    • If it was a good idea back then to have FM, why shouldn’t we have DAB+ on today’s world band radios? It’s the main broadcast band in many European countries.
    • Some EU countries (but not The Netherlands) have laws that require all broadcast receivers to support digital radio. Apparently this is not widely enforced for shortwave radios, but why can’t we just have DAB+ on some of these radios anyway?
    • Nearly all DAB+ radios also receive FM, but it is almost always implemented very poorly in terms of usability. One of my Sony DAB+ radios has excellent FM reception, but it mutes for over a second when you tune, even if just one 50 kHz step. This makes it impossible to explore the band by manual tuning. Some other radios refuse to stop on a station that’s too week, but they could hear the station if you do manage to get on that frequency eventually. The least thing we need is a DAB+ radio where the FM band can be manually tuned the same way as on traditional radios. And how much more DX-friendly could we make the DAB-side of things? In terms of manual tuning and useful information to identify a multiplex?
    • When I’m actually travelling, I would want to pack one radio and have coverage of both local DAB+and the other bands such as mediumwave, shortwave and FM. Plus SSB on the amateur bands.

    There are reasons why DAB+ isn’t included on world band radios:

    • DAB+ is only a thing in Europe (and not even in all EU countries) and a few select other countries like Australia. It’s not used in China, where all manufacturers are and not in the USA, where China’s biggest export market is.
    • Radios made by Tecsun (the largest manufacturer), have a numeric-only display. A DAB+ radio needs to be able to display station names. Tecsun radios don’t have RDS on FM either, even if they contain a tuner chip that demodulates the RDS bitstream..
    • Some radios do have 14-segment displays for station names (like the Sangean ATS-909x), even some DAB+ radios do, but for serious DAB+ support you are practically required to have a matrix display. Matrix displays require a more complex CPU to control them and they cannot stay on while the radio is off. Many portable world band radios display the time when they are off, which is very practical when you use your travel radio as an alarm clock. The CPU needs very little power to maintain a 7-segment display.

    There is a whole cottage industry in China that produces longwave, mediumwave, shortwave, FM receivers based on the Si4732 or TEF6686 tuner chips, combined with a colour matrix display and an ESP-32 microcontroller. Some of these have numeric keypads, some of them have airband coverage and some combine the Si4732 (that can do SSB) and the TEF6686 (that has better overall AM and FM reception) in one radio. Some of these designs are open-source. There is a separate open-source design based on the Si4684 that receives DAB+ (even though the chip can do FM, this is not enabled). There are SDRs based on the Raspberry Pi Pico, that can receive 0-30 MHz in all modes with little more than a Raspberry Pi Pico, some analogue multiplexers and frontend filtering.

    The chips exists, the designs exists, so why shouldn’t some hobbyist throw an Si4732 and an SI4684 in one box to create some half decent world band radio with DAB+? Or turn the Raspberry Pico Rx into a capable receiver for 0-30 MHz and pair it with the Si4684 for DAB+ and FM?

  • The 8-bit byte

    Today a byte is always a unit of exactly eight bits. Eight-bit units (bytes, octets), have long been a key part of the TCP/IP protocols, file format specifications and other standards. Disk files have their sizes specified in bytes, not in bits or any other multiple of bits. Pretty much every general-purpose computer architecture invented since the 1970s, addresses memory in 8-bit bytes. If you add one to an address, you get to the next byte in memory, not to the next full word. For the next full word, you have to add 4 or 8 to the address, depending on whether you are on a 32-bit or 64-bit system. In the past, we also had 16-bit systems, where you add 2 to an address for the next word. Because 8-bit bytes are assumed in so many standards, file formats and protocols, they are deeply ingrained in our culture and they are here to stay for the foreseeable future..

    In French, an 8-bit unit is called an “octet”, and this term is also used in some official standards documents. For all practical purposes, byte and octet are synonyms.

    Bytes have not always been 8 bits though. Most mainframes of the 1950s and 1960s had word sizes of 36 bits, but there were also machines with different word sizes, such as 40, 48 or 60 bits. Memory addresses selected full words, so to get to the next full word in memory, you always had to add exactly 1 to the address. Each word contained one number.Text data was stored as a fixed number of characters in each word. The size of a character was often 6 bits. This let you have 64 different characters: 26 (uppercase) letters, 10 decimal digits and a bunch of other symbols. A single 36-word could hold six characters.Instruction sets often contained instructions that helped you compose 36-bit words form single characters and to extract single characters from 36-bit words.

    Not all computers were word-addressable. For example the 1401 addressed memory as single characters. Numbers consisted of a variable number of characters, each of which represented one decimal digit.These machines accessed memory one character at a time, therefore they were slow, just like the early 8-bit microcomputers. But they were suitable for business applications.

    In 1964, IBM decided to define one instruction set architecture for all its computer systems. This became System/360. The word size was 32 bits, the character size as 8 bits and memory was addressed in units of 8-bit bytes. This is exactly the same way as modern 32-bit machines address memory. Characters were 8 bits and IBM defined an 8-bit character set called EBCDIC. To make hardware efficient, it is important that the number of bytes in a single machine word is a power of two. If this were not a power of two, you would have to perform a division to obtain the word address from a byte address. With a power of two, you can just ignore the last few bits of the address (and use these to select one byte in a memory word when doing byte access).

    As the number of bits in a single byte is also a power of two, the number of bits in a whole machine word is a power of two too. This makes it very efficient to implement bitmaps. Bitmaps can implement sets (like in the Pascal programming language), they can represent monochrome graphics and they can keep track of free blocks in memory or on disk. Now that we have these benefits, nobody will ever move away from power-of-two word sizes.

    In 1970, the DEC PDP/11 was a very influential machine that had 8-bit bytes and 16-bit words. As this was one of the main machines that Unix was developed on, this helped Unix to standardise on 8-bit bytes. The first microprocessors were 4-bit but 8-bit microprocessors followed soon. This also helped popularise the 8-bit byte.

    As octal numbers represent 3 bits per digit and 8 is not a multiple of 3, bytes are not a whole number of octal digits. If you write a 16-bit number in octal, the two constituent bytes will have different octal digits from the 16-bit word as a whole. For example the number 27125 is 064765 in octal, but if you break the number into two bytes, they become 0151 and 0365. This is a major pain in the butt. In hexadecimal the number is 0x69f5 and the separate bytes are 0x69 and 0xf5, This is why hexadecimal is vastly more popular than octal today. Each hexadecimal digit represents 4 bits and 8 is a multiple of 4. IBM knew this from the start and went all out on hexadecimal with System/360, but at DEC they were not so smart and they specified everything in octal. Granted, their PDP-11 instruction set contained many 3-bit fields and they came out nicely when written in octal as 16-bit numbers. The Unix and C legacy still contains octal numbers in many places:

    • Leading zero of an integer in C denotes an octal number. 030 means 24, not 30.
    • Octal escapes in string literals in C.
    • The mode parameter in the chmod command
    • The od command indeed displays octal by default.