The AVR version of uLisp now supports Microchip’s ATmega4809 Curiosity Nano evaluation board, which makes a very low-cost platform for running uLisp.
The ATmega4809 provides 48 Kbytes of flash memory, 6 Kbytes of RAM, and 256 bytes of EEPROM, and runs with a 20MHz internal oscillator. The board includes a debugger, providing a USB-to-serial interface:
It’s available from suppliers such as Farnell: Curiosity Nano Evaluation Board
Installing uLisp from the Arduino IDE
- First download the latest AVR version of uLisp from the Download uLisp page.
On the Curiosity Nano board UART3 is connected to the serial port, so you need to add the following directive to the beginning of the uLisp source file to be able to use the serial port to enter Lisp programs:
#define Serial Serial3
Install MCUdude’s MegaCoreX from GitHub, as described in MegaCoreX - How to install.
On the Board menu, under the heading MegaCoreX select Atmega4809.
Check that the subsequent options are set as follows (ignore any other options):
Pinout: "48 pin standard"
Programmer: "Atmel nEDBG (ATSAMD21E18)"
Connect the board to the computer via USB.
Select the device corresponding to the USB port from the Port menu.
Upload uLisp to the board.
You should then be able to select Serial Monitor from the Tools menu, and enter Lisp commands.
The Curiosity Nano has a yellow LED connected to pin 39 which you can flash with the following program:
(defun bli (&optional x) (pinmode 39 t) (digitalwrite 39 x) (delay 1000) (bli (not x)))
Run it by typing:
To exit from the program enter ~ and press Return.