Field of work | M.Sc. Thesis |
Data Comm |
Medical | Data Comm |
Product Control |
Sound & Vibration |
Data Comm |
Sound & Vibration |
Hearing (Medical) |
Teaching | OOP C++/java |
TCP/IP | TCP/IP | ||||||
Host OS Lang |
Vax VMS DCL |
Vax VMC DCL |
hp unix C |
PC Win/DOS C |
PC DOS C |
PC Windows MFC/C++ |
PC Linux C/Python |
PC Win/Linux |
PC Windows C#/Python |
CPU OS Lang |
8051 – PLM/ASM |
8086 MTOS/DOS Pascal/Asm +Modula2 |
8051 kernel32 C/Asm |
68008 OS-9 C |
PC Windows MFC/C++ |
PC Linux C/Asm |
ARM WinCE/Linux C |
ARM – C |
|
DSP OS Lang |
TMS320 – ASM |
PDP11 RT11 ASM |
AMD2901 – Custom |
MC56k Custom C |
Author’s Journey – Embedded Platforms
The table above describes the embedded platforms I have worked with over the years. Hardware Platforms, Operating Systems and Languages are named. There’s a horizontal lane for hosts, targets and DSP targets – and “teaching” on top. The header shows the application domain.
The M.Sc. thesis and the PDP11 stuff were both pre-studies, the rest made it into real products sold. The Production Control job was a sparetime-thing, very different from designing COTS (Commercial Of-The-Shelf) boxes, which is the type of products I normally work with.
Even though some years were spent purely in the PC-world, most of the time I have worked with embedded systems. The table has no rows for managing, general networks and databases. These domains have taken up a lot of time, and I wrote a book about “SQL Server with C#” in 2018.
The last many years I have worked with Internet technologies – TCP/IP/Ethernet and WiFi.
Reflections on the Embedded Platforms
CPUs
Arm Cortex M. In my current job we use variants of Cortex-M.
This is used as inspiration for Microcontrollers with C.
Arm Cortex-A – NXP i.MX7. This is a modern System-on-Chip (SoC) from NXP. It has two ARM Cortex A7 cores and a single Cortex ARM M4 core. We used it in B&K’s Sound-Level meter 2245 which was released in 2019. It runs Linux on the two A7 cores. I purely had a manager role in this project.
The work here inspired Embedded Software for the IoT.
intel 80×86. I used to program a lot of assembler on the 8086 in embedded systems in the old days. In the modern Windows PCs I have used C++ and C# on PCs – see SQL Server with C# Applications.
TI TMS320. This was the very first DSP from Texas Instruments, the TMS320C10. It was the second DSP the world saw. I later tried the very first one, the NEC7720, in a small part-time job. As I recall it, assembler was the only way to program the DSPs back then, but it was a big step forward compared to bit-slice (see below). Today, DSPs are mainly programmed in C. Many have operating systems.
intel 8051. A classic microcontroller – that is, a microprocessor with a few built-in peripherals. The first I used, was the 8052, which had slightly more resources than the original 8051. Later, in another company, we used two Siemens SAB 80535 – built around the same core. This was to get access to two HDLC serial ports. Thus we had moved a small step closer to the modern SoC – System on Chip.
Digital PDP11. From good old Digital. This had a 10 Mbyte hard drive at the size of my Roomba vacuum cleaner – and sounded like it. This was my first job after graduating as M.Sc. I clearly remember chasing a problem so long, that I decided that the problem was a faulty RAM-board. I wrote a diagnostics routine to prove it. This halfway convinced my manager, and I got the permission to buy a new board at Digital. The board was plugged in – and my program worked. Looking back – credits to my boss. Incidentally, the best book I have read about PDP11 was written by a chemical engineer.
AMD 2901 bit-slice. I am happy I got to try this. Bit-slice is a number of discrete components that you add, kind of LEGO-like, to build a CPU. We used five 4-bit Arithmetic-Logic-Units together with Multiplier and Sequencer. With this we could create our own 20-bit DSP. This design took up 4 double Europe Boards. When coding, it was all about keeping the multiplier occupied – all the time. It only took me a week to code a radix-4 FFT. We were all impressed with the efficiency of our design and home-grown language. Today that’s a simple library call.
I learned an important lesson: The FFT was fast because the HW was structured for it. However, following the FFT I needed to reorganize the output, as the nature of an FFT is that output-samples are spread-out in the buffer. We had not designed a socalled bit-reverse-addressing HW, and this process took the same time as the complex FFT.
Operating Systems
FreeRTOS. I used this RTOS for experiments when I was writing Microcontrollers with C. Like the older MTOS and kernel-32, It is basically a small core that is linked together with the source – creating a monolith. This makes it “Bare-Metal” in relation to the GNU tools.
It is distributed under the MIT open-source license, and many configuration tools makes it easy to add FreeRTOS to an embedded project. CMSIS-RTOS for Arm supports FreeRTOS.
Linux. Great OS with tons of users, drivers and Board-Support-Packages. I like the use of stdin & stdout, and old-style use of parameters to programs, instead of new APIs each day. I first programmed Linux in a project where we were building a TOE – TCP Offload Engine.
Windows CE. Microsoft’s small, realtime OS. It works. Unfortunately nobody writes drivers for it. I have little personal direct feel for it. Still, I know it pretty well, as a manager.
Windows. Still the most used on PCs. I have used it since Windows 3.1 – the one which gave us “True Types” – making my stupid printer usable. Windows NT was a huge step forward in terms of robustness and programming environment.
MTOS. This was my first meeting with a real-time-operating-system. Aka RTOS. It was like many other of the time.
OS-9. I really loved this small OS. It was years before Linux, but it was a realtime, unix-like (posix) kernel. Fantastic. However, there was no big internet community to browse for answers. I learned it in the slow way.
RT-11. This was naturally used on the PDP11. Very rudimentary. Once in a-while an input-sample got hugely delayed. I realized that the OS update of its “wall-clock” had top priority, and thus interfered with my A/D-conversion. This was the standard system. I had to disable the wall clock before sampling, and re-enable it afterwards. Looking back I think that there must have been some kind of config I overlooked. This cannot be standard behavior.
DOS. I have spent countless hours on testing DR-DOS instead of MS-DOS, and writing strange autoexec.bat and config.sys files for family and friends. I don’t miss it. Writing my first TSR in assembler was, however, fun. Terminate-Stay-Resident was a way to have background programs in a single-task OS. My first experience with databases was on DOS, using Modula-2 programming on – I think – a dBase III thing.
kernel-32. Yet a small locally designed RTOS. It had a limited feature set, but the debug-feature that allowed you to dump the contents of all pools and queues was great. We used it for 8052, and were forced to get it extended with “bank-switching”, to make room for all our programs. Very interesting, and extremely time-consuming.
Programming Languages
Python. Great language, with a refreshing view of how to define blocks. ScaPy – a library for Python – is a great tool for making legal as well as illegal Ethernet and IP packets for testing. I use Python for all the DSP and some of the network samples in my book “Embedded Software for the IoT”.
Java. I taught this language, and used it for test-tools later, but never got around to use it in embedded systems. Many people in the company did not want garbage collection, which made sense to me. However, I never understood why the same people wanted to use embedded C# the next minute.
C. C51 from Keil. C for the 68k-family with OS-9. HP C. Microsoft C. And later C++ and C#. My experience with C# is from PC-programming. I wrote a database program, interfacing to SQL-Server as well as Oracle. This became the red thread in my book “SQL Server with C#”.
PLM. This was the PLM51-derivate. It was like a simple version of C without pointers.
Modula-2. A language ahead of its time. From JPI – an offspring of Borland.
It was a great language, but could not compete with both Borland and Microsoft.
ASM. Each assembler is different from the one before. I liked the PDP and the 68k more than intel’s. They were much more “orthogonal”. This means that e.g. all register instructions work the same way on all registers. The most complex assembler was the 80×86 – used in an embedded project. For some time we used segment-registers that were 16-bit wide, like the normal registers, but were only shifted 4-bits left before they were added to the address. This gave us a 20-bit address space where we could have had 32-bit. Naturally, the world got the 32-bit version later. I dare not think how many hours, programmers all over the world spent on this steppingstone.
Short Bio
I graduated as Master of Science (Electronics) in 1984, with a thesis on “Time-Delay Spectrometry” – a Digital Signal Project. Two years later I graduated as Bachelor of Echonomics (Marketing).
I have since then worked mainly with Telecommunication, Medical Electronics and Sound & Vibration in the private industry – and a bit with Battery-Management Systems. In parallel with my “normal work” I taught at the Danish Technical University for 10 years. Main subjects here: Object Oriented Programming (C++ and Java) and the Internet Protocol Stack.
Later I took a so-called “Mini MBA” to brush-up my old Bachelor of Economics, and in the following year I took a “Board-Member Masterclass”.
You can find me in many ways – please see: Contact page.