Programming Microcontrollers – low power, small footprints, & fast prototypes, using Arduino, Atmel, & GForth

This article explains how to use the Arduino toolchain to program microcontrollers from the Arduino IDE using their bootloaders, and also burning bootloaders directly onto bare microcontroller chips. It covers developing interactively with Forth (rapid prototyping), and moving your creations from a development board (Nano, Uno) to a standalone, low-cost, low-power, small footprint chip such as the ATMega328P or ATTiny85 or ATTiny84. Each of these microcontrollers is powerful, inexpensive, and allows using 3V batteries directly without the need to boost voltage to 5V. Additionally, we describe how to build an inexpensive (under £5), standalone 3-chip Atmel AVR universal bootloading programmer that you can use to program all of the chips above.
Continue reading this article…

Seven Fields of Computer Programming: A Brief Survey

Written July 7th, 2012, Revised Jan 12th, 2013, Updated & extended Jan 25th, 2020

There are at least seven distinct fields of computer programming that have less to do with languages and more to do with the target platform, desired functionality, and intended user. This article provides a short introduction to each, intended as a brief orienting survey. These are:
(1) Bare metal programming, not requiring an operating system,
(2) Application programming, in which an operating system is presumed,
(3) Mathematical computing and algorithms, from matrix computations and statistical learning to wavelet compression and cryptography,
(4) Web or Client-Server programming, in which the application lives in a client browser in communication with content generated on-the-fly from programs running on central servers,
(5) Mobile or App programming,
(6) Cloud programming, and
(7) Exotic programming (traditional super-computing, quantum computing, biological computing/soft robotics, deep machine learning).

Continue reading this article…

Notepad++ (Text Editor)

If you haven’t done so already, you may want to start by reading the Preface to the Computing Series: Software as a Force Multiplier, Sections 1-3.

1. Notepad++: a programmable, extensible, feature-rich text editor

NotePad++ (NPP) is an open-source programmer’s text editor with outstanding built-in features that can be further enhanced with powerful plugins and extensively customized with your own configurations. NPPs features include syntax highlighting for a large collection of programming languages, code folding, recordable macros, cloned views, selectable shortcuts, tabbed documents, and a host of other capabilities.
But it is the plugins and customization that NPP an invaluable power-tool, capable of far more than text editing. NPP can serve as an automation engine, a complex calculator (for example between hex, binary, and decimal), or a light-weight IDE for any toolchain you wish. It is the second application (after Total Commander) which I install on a Windows computer.

This article describes a few of the dozens of capabilities. It also shares a pre-configured Notepad++ package that I use (20.0MB compressed, 50.0MB uncompressed, download here), which contains the configurations and capabilities I use. The file is portable and self-contained: just unpack NPP to your drive (in a separate folder to your current running instance) and run notepad++.exe from there.1

Notepad++, by Don Ho, multi-view with syntax highlghting

Notepad++, by Don Ho, multi-view with syntax highlghting


Continue reading this article…

  1. You don’t want to overwrite your current instance, as capabilities are dependent on version of the plugin, and yours may be different than mine.

Coding for pre-schoolers: a ‘Turtle Logo’ in Forth

*New!* (29 Aug 2020) – Turtle Logo v1.8 (portable) is available! Developer kit with source code included. Suitable from ages 3 years to adult. (970 lines of Forth code).


1. Inspiring the next generation of technology builders.

A challenge facing parents and teachers is how to help children develop ‘builder’ relationships with technology rather than being limited to the passive consumption of content created by others. The consensus on what’s important for older kids and adults is clear: coding. This enables children to participate in the creation of their own technological “micro-worlds” — environments rich in educational potential.[14]

This autumn, spurred by having our own young children (one aged 4 years, the other 16 months), we began an experiment, the result of which is a Turtle Logo program for Windows computers (freely downloadable) that is simple enough to be accessible for children from 3 years and older, while providing an extensible platform that can grow with the child.

The long-term goal is to enable children to express their creativity, artistry, and natural ‘builder’ impulses using coding, computer graphics, and robotics as readily as the previous generation could using paints, brushes, and building blocks.

Turtle Logo - Inspiring the next generation of technology builders.

Turtle Logo – Inspiring the next generation of technology builders.

Continue reading this article…

Analysis of Visitor Statistics: Data Mining in-the-Small

(Statistics and Data Mining I)

For a variety of reasons, meaningful website visitation and visitor behavior statistics are an elusive data set to generate. This article introduces the visitor statistics problem, and describes seven challenges that must be overcome by statistical and data analysis techniques aiming for accurate estimates. Along the way, we’ll encounter the “Good News Cheap, Bad News Expensive” Paradox of Data Mining — or, why information is often used “as-is”.

This article is the first in a series on algorithms, statistics and data analysis techniques (using free and open source tools) using the visitor statistics problem as a vehicle for illustration.

Continue reading this article…

Bare Bones Programming: The C Language

…for Embedded and Low-Level Systems Development

C provides the convenience of learning one language while retaining the ability to target a variety of platforms including modern operating systems (Linux, Windows, Mac), real-time operating systems, systems-on-a-chip, and a host of microcontrollers for embedded development. And if you have to “mov” the bits around yourself (device drivers, DMA controllers), you can do that too. This is a significant efficiency over assembly languages which are essentially chip-specific control codes and therefore require understanding the architecture of the target chip.

Continue reading this article…

A Versatile Toolchain for x86 Assembly: Debug, NASM, TCC, and Forth


A common misconception is that assembly language programming is a relic of the past. This is certainly not the case, and assembly language remains a core knowledge area for embedded systems development, digital design, and algorithm development in the 21st century.

A second misconception, especially amongst those who are only familiar with higher level languages (Python, Ruby, C#/.NET, Perl), is that assembly language is a defective programming language and therefore not worth the time to invest in.

But assembly language is more than ‘just another general purpose programming language’. It is actually the control signal specification for the microprocessor or microcontroller that will be running the instructions, and whose digital design must be reasonably well understood in order to get it to work successfully.

Furthermore, higher level languages often use simpler toolchains hidden behind slick integrated development environments (IDEs). These toolchains consist of various software components (pre-processor, compiler, assembler, linker, loader) which take the high level code and transform it to executable machine code that can run on the target processor, often passing through an intermediate stage generating assembly code. Familiarity with this toolchain can help evaluate how much overhead the high-level tools introduce on the code, which is an important part of understanding how much you’re trading.

In this article, we’ll look first take a look at the software toolchain involved in general terms, before turning to specific tools you can use on a modern Windows computer (through Windows 11) to target an x86 chip (no longer in your PC but in a DOS Emulator). Similar skills and approaches carry over to the toolchain for the Atmel 328P and ATTiny 85 with a graphics application (TinyPhoto) on the ATTiny85 here.
Continue reading this article…

Stats: 1,066,417 article views since 2010 (March update)

Dear Readers:

Welcome to the conversation!  We publish long-form pieces as well as a curated collection of spotlighted articles covering a broader range of topics.   Notifications for new long-form articles are through the feeds (you can join below).  We love hearing from you.  Feel free to leave your thoughts in comments, or use the contact information to reach us!

Reading List…

Looking for the best long-form articles on this site? Below is a curated list by the main topics covered.

Mathematics-History & Philosophy

  1. What is Mathematics?
  2. Prehistoric Origins of Mathematics
  3. The Mathematics of Uruk & Susa (3500-3000 BCE)
  4. How Algebra Became Abstract: George Peacock & the Birth of Modern Algebra (England, 1830)
  5. The Rise of Mathematical Logic: from Laws of Thoughts to Foundations for Mathematics
  6. Mathematical Finance and The Rise of the Modern Financial Marketplace
  7. A Course in the Philosophy and Foundations of Mathematics
  8. The Development of Mathematics
  9. Catalysts in the Development of Mathematics
  10. Characteristics of Modern Mathematics

Electronic & Software Engineering

  1. Electronics in the Junior School - Gateway to Technology
  2. Coding for Pre-Schoolers - A Turtle Logo in Forth
  3. Experimenting with Microcontrollers - an Arduino development kit for under £12
  4. Making Sensors Talk for under £5, and Voice Controlled Hardware
  5. Computer Programming: A brief survey from the 1940s to the present
  6. Forth, Lisp, & Ruby: languages that make it easy to write your own domain specific language (DSL)
  7. Programming Microcontrollers: Low Power, Small Footprints & Fast Prototypes
  8. Building a 13-key pure analog electronic piano.
  9. TinyPhoto: Embedded Graphics and Low-Fat Computing
  10. Computing / Software Toolkits
  11. Assembly Language programming (Part 1 | Part 2 | Part 3)
  12. Bare Bones Programming: The C Language

Pure & Applied Mathematics

  1. Fuzzy Classifiers & Quantile Statistics Techniques in Continuous Data Monitoring
  2. LOGIC in a Nutshell: Theory & Applications (including a FORTH simulator and digital circuit design)
  3. Finite Summation of Integer Powers: (Part 1 | Part 2 | Part 3)
  4. The Mathematics of Duelling
  5. A Radar Tracking Approach to Data Mining
  6. Analysis of Visitor Statistics: Data Mining in-the-Small
  7. Why Zero Raised to the Zero Power IS One

Technology: Sensors & Intelligent Systems

  1. Knowledge Engineering & the Emerging Technologies of the Next Decade
  2. Sensors and Systems
  3. Unmanned Autonomous Systems & Networks of Sensors
  4. The Advance of Marine Micro-ROVs

Math Education

  1. Teaching Enriched Mathematics, Part 1
  2. Teaching Enriched Mathematics, Part 2: Levelling Student Success Factors
  3. A Course in the Philosophy and Foundations of Mathematics
  4. Logic, Proof, and Professional Communication: five reflections
  5. Good mathematical technique and the case for mathematical insight

Explore…

Timeline