We'll need a BIOS for CP/M
Theminbios.z80 code used so far only has the minimal functionality needed to get CP/M off the ground. Well… slightly more, to be precise: it can see 256 KB of RAM as virtual disk A: and 256 KB of flash...
View ArticleA µSD, slave SPI, and DMA
Connecting an SD card to a Blue Pill was described in a recent article. With thesdcard.fs code, it’s as simple as calling sd-init, and then sd-read / sd-write for accessing 512-byte blocks.And since...
View ArticleThe virtual floppy jukebox
Times sure have changed: a fingernail-sized 2 GB µSD card of a few dollars can now easily store over a thousand 1.44 MB floppy disk images, while being quicker than the fastest hard drive from the...
View ArticleThe limits of Mac and Mouse
It all started with recent kernel panics on my MacBook Pro laptop, almostevery night, causing me to revisit my setup and choice of technologies. For the record: I’m very attached to my 2014-era “MBP”,...
View ArticleWhy Vim is very different
Ah, the smell of editor wars. Arguments collide. Opinions galore. Lots of heat, so little light…This article was not written for the sake of argument. I just want to highlight why I keep coming back to...
View ArticleTaking it further with i3
This article is about the i3 window manager (and also, further down below, Ranger):Its main distinguishing feature is that is usestiling as visual layout mechanism.While the mouse and...
View ArticleEZ-Retro v2, now with a PCB
As mentioned earlier, theEZ-Retro project could use a PCB for a more compact and robust setup. There is a nice F103 board variant (search for “STM32F103C8T6 ARM Minisystem Development Board STM32“ on...
View ArticleTroubleshooting the EZ-Retro
Here is the eZ80 chip, hand-soldered on the new EZ-Retro v2 PCB:The trouble is: something is very wrong: with my lab power supply set to 3.3V and a 30 mA maximum current limit, the voltage drops to...
View ArticleMecrisp Forth's memory use
The Blue Pill is a widely available and extremely low-cost STM32F103-based µC board which has an amazing amount of features and plenty of memory onboard: 64K flash and 20K RAM.In C/C++, the way...
View ArticleFolie is growing up... slowly
Folie, the “Forth Live Explorer” is starting to shape up. Here’s a summary of what it’s about:a front end for Mecrisp Forth, i.e. a terminal emulator likepicocom or Tera Termeasily find (ctrl-R) and...
View ArticleF103 + USB = Swiss Army Knife
The USB driver for STM32F103 has been around for months and it’s proving to be very stable and usable. The current Mecrisp release nowincludes it, and there’s an F303 port available.The original code...
View ArticleSimple Mecrisp Forth utilities
The default message shown after a reset of Mecrisp Forth is this prompt:Mecrisp-Stellaris RA 2.3.6 for STM32F103 by Matthias KochNothing else, no hint that you can start entering commands. With a...
View ArticleLet's trace, profile, and patch
Although Mecrisp Forth “compiles” source code to machine language, it’s not really a compiler in the traditional sense, as with say C or C++. In Forth, the compilation process and runtime execution are...
View ArticleGenerated code & performance
Let’s look at how the tricks in the previous article end up in code, and their performance effects. First thetrace.fs utility, which needs to insert special calls at the start and end of each word:: a...
View ArticleThink, upload, rinse, repeat
As often mentioned, Forth enables an interactive development approach: you enter commands on the µC itself, and things get done right away. No make, no compile step, no uploads.But that’s an...
View ArticleMulti-platform development
The title of this article is perhaps a bit misleading: it’s not just about developing code which needs to run on different platforms, it’s also about using different programming languages.Over the...
View ArticleMeet the new RF73 driver
There’s a new wireless radio driver in town for the JeeNode Zero and other µC boards running Mecrisp Forth. It’s calledRF73 but it is in fact intended to be used with the RFM70, RFM73, and RFM75. These...
View ArticleInteractive Forth over RF?
Since Mecrisp Forth uses the serial port as its interactive console, the most direct way of connecting to a µC board is as follows (double-line arrows represent wired connections):When using some...
View ArticleRedesigning the JET model
The JET project (JeeLabs Embello Toolkit) is the continuation of the earlier HouseMon project (in turn the successor of JeeBus). It’s been a slow starter, but definitely not shelved. The JET “Hub” has...
View ArticleTurning JET into a live system
The previous article about the redesigned JET model mentioned Folie as sitting between a USB interface and MQTT, presumably to publish received RF messages on MQTT, and to subscribe to an MQTT topic so...
View ArticleA few design changes in rev4
There are not really that many changes from rev3 to rev4 of the JeeNode Zero. The main one was to extend the main header by one more pin, and to move the radio module to other pins so that all of...
View ArticleMaking the silkscreen useful
The JeeNode Zero takes a different approach from most other boards: components are placed on what is considered the bottom of the PCB, with the top free for extensive silk screen labels. Here is the...
View ArticleA board made for tinkering
“Sans paroles” - instead of a thousand words, here is a picture of the new JeeNode Zero rev4:
View ArticleAnalog over wireless
Let’s put the JeeNode Zero to work a bit, i.e. let’s repeatedly measure an analog voltage through its ADC, send the results over to another node via the radio, and display the received readings. We’re...
View ArticleSending multiple values
The previous article showed how to send a value wirelessly from one node to another, as text. While it’s a good example to start off with due to the simplicity, this doesn’t really scale. It’s tedious...
View ArticleA new documentation site
There’s quite a bit of new Forth code in the embello repository on GitHub, and more being added all the time - so it’ll become increasingly important that this code gets documented. There are many...
View ArticleThe JNZ rev4 PCBs are in!
The PCB panels are in! They are produced by PCBcart, and arranged as 10 x 3 units: With a nice blue soldermask + gold plating, just like all the other official boards from JeeLabs. And here’s a...
View ArticleGetting started with a JNZ
One of the features of the JeeNode Zero, is that it takes minimal effort to get started: hook it up via any USB serial interface, using any terminal emulator you like, and you’re all set to go. Here’s...
View ArticleInstalling more drivers in flash
An application written in Mecrisp Forth consists of a number of different parts: The Mecrisp kernel itself: this is 20 KB of Matthias Koch’s hand-crafted assembly code, turning a µC into a Forth...
View ArticleSetting up a remote node
To try out RF communications, we need to go through a number of steps: hook up two JeeNode Zero boards, so we can develop on both in parallel work out the code needed for the receive and send nodes...
View ArticleHow all those JNZs are tested
One of the requirements of the JeeNode Zero rev4, is that each one has to be tested and then end up with the proper software loaded onto it. The obvious way to do this is to connect each board over...
View ArticlePost-mortem of a bug
As everyone knows, the later a bug shows up in production, the more trouble it is to fix… A while ago, a batch of fresh JeeNode Zero rev4 boards was assembled, in itself the result of quite a bit of...
View ArticleConnecting a rotary encoder
This exploration is about connecting a rotary encoder switch for use as an infinitely adustable up/down controller. The basic idea is that there are two switches inside, which generate pulses. In the...
View ArticleCutting the rotary cord
Before moving on to the topic of this article, let’s figure out the problem that came up in the previous one, where adding an OLED display made the rotary encoder readout unreliable. The problem is...
View ArticleMaking an always-on device
It’s all nice and well, but a JeeNode Zero which needs to remain tethered to a host to set it up after each reset is not very useful. Fortunately, this can be fixed using a simple recipe: add these two...
View ArticleSeveral years on a coin cell?
So far, the power consumption of the rotary encoder node has been optimised by taking the current draw from 5.0 mA to 45 µA - that’s an estimated coin cell battery life of 6 months. Unfortunately, this...
View ArticleFaster uploads through SPI
It turns out that a ROM-based serial upload with Folie takes about 22 seconds for a standard Embello install (Mecrisp + always/board/core). While this is fine for occasional re-flashing, it adds quite...
View ArticleEvery possible connection
The Raspberry Pi does not really need an introduction: Linux plus some tinkering pins - who could possibly ask for more? It has all the features needed to create a flexible and powerful programming /...
View ArticleSetting up the Pi software
To turn the Raspberry Pi into a general-purpose uploader / debugger for ARM STM32 chips, we need to set up some software. First of all - the OS. DietPi is a very practical little distribution these...
View ArticleLet's try out the multi-tasker
There’s been a multi-tasker hiding in the Embello repository for some time now. It’s a small variation of the one provided as part of the Mecrisp distribution, also on GitHub. The multi-tasker lets us...
View ArticleSometimes, timers are easier
Multi-tasking is a great mechanism, but there is a drawback: each task needs its own stack. In the case of Forth, it’s even worse because each task needs both a return stack and a data stack. In its...
View ArticleStay busy, but also sleep a lot
One of the examples in the multi.fs code contains this little gem: : sleep ( -- ) [ $BF30 h, ] inline ; \ WFI Opcode, enters sleep mode task: lowpower-task : lowpower& ( -- ) lowpower-task activate...
View ArticleSD cards with FAT files
Those little plastic µSD-to-SD card adapters, of which you may have a bunch lying around since they are often included with new µSD cards, make excellent µSD card sockets: There are many libraries (in...
View ArticleInterrupts, tamed at last
Before going into interrupts, why they’re needed, and why they are tricky, let’s first look into an example which does not use interrupts: writing a pass-through USB-to-serial application. Note that...
View ArticleTying SPI and DMA together
If you consider µCs to be incapable of any “serious” data handling, then you’ll be in for a treat. The following design was created for an upcoming project, which needs a fairly high-speed path for...
View ArticleEZ-Retro: system overview
The EZ-Retro project is about creating a Z80-compatible board capable of running CP/M and based on the eZ80F91 microcontroller from Zilog - it looks like they’re still in business, BTW! That’s “EZ” as...
View ArticleA truly minimal eZ80 setup
To check that the eZ80 chip works, we only need to connect it to the Blue Pill with 6 wires: +3.3V and ground (the eZ80 runs at 3.3V, but it has 5V-tolerant I/O pins) a two-wire “Zilog Debug Interface”...
View ArticleMinimal requirements for CP/M
Even a minimal EZ-Retro setup is very powerful compared to CP/M systems of the 1970’s, costing thousands of dollars, drawing hundreds of Watts, and placed in Boring Bulky Boxes. So let’s start planning...
View ArticlePokeMon, the eZ80 monitor
Out of the factory, the eZ80 is totally ignorant: it comes with 256 KB of empty flash memory. This reads as $FF, which corresponds to the “RST 38h“ instruction, a one-byte call to address $0038 (mixed...
View ArticleBootstrapping CP/M via simh
The next step is actually more of a giant leap: building a working CP/M system from scratch… This can’t be done in one go. Let’s start as simply as possible - which is already pretty steep: decide how...
View Article