Learn to Program MCUs with uLISP
Circuit Cellar|October 2024
Part 1: Crash Course Offers Insight Into Pioneering Language
Raul Alvarez Torrico
Learn to Program MCUs with uLISP

Lisp is a Turing-complete programming language, based on Alonso Church's lambda calculus. It was designed by John McCarthy and published in his 1960 paper, "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I" [1]. Of its many dialects, Common Lisp and Scheme are the best known, along with the newer Racket and Clojure.

Lisp pioneered many programming language ideas now commonly in use [2], such as higher order functions, recursion, lexical closures, dynamic typing, tree data structures, automatic garbage collection, and the read-eval-print loop (REPL). I've been programming in Common Lisp and Scheme as a hobby for many years. Recently, I discovered uLisp, a version designed to run on microcontrollers (MCUs) [3]. As a fan of Lisp and embedded systems, for the past few years, I've been willing to try the uLisp platform and write about it.

In this article I begin by discussing very simple uLisp examples that showcase basic syntax and programming concepts. Then, I discuss some extensions to the language that deal specifically with MCU-related functionalities, such as general-purpose input/ output and I2C serial data communications. I present some hardware examples using Seeed Studio's Wio Terminal development board and the Sensirion SGP30 gas sensor. Nevertheless, uLisp support as well a few other MCU platforms.

To follow the topics discussed here, you just need a basic knowledge of microcontrollers and the Arduino platform.

ULISP CRASH COURSE

uLisp is available for many MCU boards in five versions [4]. The version of uLisp that you wish to use can be downloaded free from uLisp.​com:

1) AVR: for Arduino Mega 2560, ATmega 1284, and AVR DA/DB series.

2) AVR-Nano: for Arduino UNO, Arduino Nano, and Arduino Every.

3) ARM: for Arduino Zero and MKTZero, Adafruit MO, M4, PyBadge/PyGamer, nrf52840 and Clue, BBC Micro Bit, Teensy 40/4.1, RP2040-based boards, and others.

Denne historien er fra October 2024-utgaven av Circuit Cellar.

Start din 7-dagers gratis prøveperiode på Magzter GOLD for å få tilgang til tusenvis av utvalgte premiumhistorier og 9000+ magasiner og aviser.

Denne historien er fra October 2024-utgaven av Circuit Cellar.

Start din 7-dagers gratis prøveperiode på Magzter GOLD for å få tilgang til tusenvis av utvalgte premiumhistorier og 9000+ magasiner og aviser.

FLERE HISTORIER FRA CIRCUIT CELLARSe alt
Build an Interactive Kinetic Wall
Circuit Cellar

Build an Interactive Kinetic Wall

Using a Raspberry Pi 4 and Kinect V1 Camera

time-read
10 mins  |
October 2024
Learn to Program MCUs with uLISP
Circuit Cellar

Learn to Program MCUs with uLISP

Part 1: Crash Course Offers Insight Into Pioneering Language

time-read
10+ mins  |
October 2024
Intelligent Automotive Battery Sensor
Circuit Cellar

Intelligent Automotive Battery Sensor

Shunt Resistors and Evaluation Electronics Offer Two Key Components

time-read
4 mins  |
October 2024
Understanding Mesh Circuits How to Use and Calculate Them
Circuit Cellar

Understanding Mesh Circuits How to Use and Calculate Them

Microcontrollers and other digital systems concern mostly ones and zeros but when connections to the real word are needed it can get messy. Stuart writes about mesh analysis and how mesh circuits can be calculated and applied in practical scenarios.

time-read
10+ mins  |
October 2024
Datasheet: Very Cool Micro Machines
Circuit Cellar

Datasheet: Very Cool Micro Machines

Smartphone Cooling Rounds Out Parade of Advanced MEMS

time-read
2 mins  |
October 2024
Improving Patient Outcomes
Circuit Cellar

Improving Patient Outcomes

Device Technology Advances Medical Practices

time-read
10+ mins  |
October 2024
Bringing Cost-Effective, On-Device AI to Home Appliances - Sparse Weights and Interactions Negate GPUs and Cloud Computing
Circuit Cellar

Bringing Cost-Effective, On-Device AI to Home Appliances - Sparse Weights and Interactions Negate GPUs and Cloud Computing

GPU silicon and cloud computing infrastructure are too costly for mass markets devices like refrigerators and washers. By deploying compute resources only to the necessary parts of AI inference, Sparse AI allows product designers to practically incorporate new AI features like natural voice interfaces into their consumer offerings without breaking the bank or electric bill surprises.

time-read
5 mins  |
September 2024
Thin Film Transistor LED Displays - Visual I/O
Circuit Cellar

Thin Film Transistor LED Displays - Visual I/O

To add a resistive touchscreen on top of a TFT display, Jeff explores the technology offerings and libraries needed to accomplish his task. Calibrating the touchscreen's computed coordinates with the actual pixel coordinates of the display proved difficult with a modular framework but separating functions allows easy expansion.

time-read
9 mins  |
September 2024
Mobile APP Development with React Native
Circuit Cellar

Mobile APP Development with React Native

This month, Bob continues his series on mobile app development from an embedded designer's perspective. He programs a React Native app and he offers guidelines for picking a tutorial for React Native. He further explores how it handles concurrency and asynchronous programming. Bob expected a few nuances during the process but to say there were more than a few would be an understatement.

time-read
9 mins  |
September 2024
Power Analysis Over JTAG Ports: Hidden Debug Dangers - Block Side-Channel Analysis Attacks
Circuit Cellar

Power Analysis Over JTAG Ports: Hidden Debug Dangers - Block Side-Channel Analysis Attacks

Small changes in the phase of clock signals can encode power leakages. An attacker can use standard interfaces such as the JTAG port to drive clocks across targets, using them as measurement techniques for sidechannel analysis attacks despite limited physical access. This article demonstrates how you can test devices for vulnerability and how to modify devices to prevent attacks.

time-read
7 mins  |
September 2024