There is something special with interpreters on bare metal - Page 1
Forum section: electronics / general

author: RoGeorge
author_rank: Super Contributor
timestamp: March 20, 2021, 03:52:10 pm
content: Tested MicroPython on ESP8266, and it almost felt like ZX81 or a ZX Spectrum with BASIC.There is something very rewarding when using an interpreter on bare metal, not sure why it feels like that. I'm not new to Python, and not new to microcontrollers, but when combined the two it's different. I don't think it's strictly related to Python, because it felt very similar with how BASIC was on home computers or on a BasicStamp MCU.Strange that Lua on the same ESP8266 doesn't seem that nice. Maybe because I never used Lua before.It looks like there are three requirements to get that special dopamine kick:1. - interpreted language2. - runs on bare metal3. - easy to useAnybody else noticed how nice an interpreter running on bare metal is, with no OS and no compile/upload involved?

author: ogden
author_rank: Super Contributor
timestamp: March 20, 2021, 04:09:41 pm
content: Quote from: RoGeorge on March 20, 2021, 03:52:10 pmEvery good tool have it's use and obviously you can get satisfaction during use of suchThou do not get overexcited because there is no such thing as universal tool. There will be many cases where compile/upload is better solution for someone else to get satisfaction

author: rstofer
author_rank: Super Contributor
timestamp: March 23, 2021, 04:45:28 pm
content: Back when 8085s were king, I did a lot of development work. One of my favorite tools was Palo Alto Tiny Basic which implemented an integer Basic that was pretty much ideal for prototyping. Features could be added for specific IO devices.

author: ogden
author_rank: Super Contributor
timestamp: March 23, 2021, 05:44:59 pm
content: Interpreter on microcontroller is very useful when rapid changes of software is part of the job. One (but not only) example - control of scientific experiment. Sometimes it is much easier to let scientist just change variables in the actual code, most likely write code himself rather than hire programmer to build extremely flexible software which inevitably will be obsolete before even finished.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: March 23, 2021, 05:59:52 pm
content: Quote from: RoGeorge on March 20, 2021, 03:52:10 pmI understand - I get the same feeling with a project I'm developing on a Zynq system, although it's not interpreted. I have a number of "peripherals" built on the FPGA such as controller an external DDS, ADC, programmable analog bandpass filters, programmable clock generator etc.I've written a simple C program that accepts commands via the terminal to the Zynq. Each one can have its own particular arguments and it behaves/feels like running commands in a bash terminal - except I know it isn'tand that I know exactly what is going on behind the scenes. It definitely reminds me of POKEing numbers into various parts of my ZX-81 RAM and seeing what happened.

author: MadTux
author_rank: Frequent Contributor
timestamp: March 24, 2021, 05:21:40 pm
content: It's probably just like an extreme CISC processor, ie MicroPython instructions are converted into RISC µ-instruction routines, basically the same instruction set that the ESP8266 understands.Only difference is that the interpreter decodes the MicroPython instructions on hardware level instead on software level.Don't think that you'll get much differences as a user, apart the memory/CPU resources that are saved by the the hardware level interpreter....

author: DiTBho
author_rank: Super Contributor
timestamp: March 24, 2021, 06:46:39 pm
content: Quote from: rstofer on March 23, 2021, 04:45:28 pmI have never played with it, was the 8085 a kind of 8080 with a built-in serial and minimal external circuits?

author: DiTBho
author_rank: Super Contributor
timestamp: March 24, 2021, 06:50:41 pm
content: Quote from: RoGeorge on March 20, 2021, 03:52:10 pmI have here a couple of circuits for a radio-telescope, they have a Forth interpreter built-into setup the working environment in a way that looks similar to the OpenForth you can find on a PowerMac computer.Mever played with it yet, but it's a true interpreter and it's able to manage ADC, DAC, powermeters, and stepper motors.

author: MarkR42
author_rank: Regular Contributor
timestamp: March 25, 2021, 11:50:38 am
content: Yes it is super satisfying, to be able to knock up something like an ad-hoc signal generator with a few lines of Python.The esp8266 is not the best chip to do it; it's not really got enough ram and that is quickly exhausted if you try to do networking.But Micropython on the esp32 or pi pico are great!

author: iMo
author_rank: Super Contributor
timestamp: March 25, 2021, 12:43:42 pm
content: Quote from: DiTBho on March 24, 2021, 06:46:39 pmReading this thread makes me pretty nostalgicI built my first uC on 8085, then w/ Z80, then ZX81, ZX Spectrum, .. etc.. etc..8085 is 5V only, crystal clock gen on the chip, with a simple serial and 1 or 2 diffs around interrupts..