Open Inverter, an open source micro-solar inverter

Summary of Open Inverter, an open source micro-solar inverter


SIMPL is an extended, minimal interpretive language derived from Txtzyme, designed to simplify low-level microcontroller interaction. Originally written in C for portability across Arduino, ARM, and FPGA platforms, the author explores rewriting it in Forth to act as a human interface layer. This approach aims to leverage Forth's compilation capabilities while avoiding its complex stack manipulation challenges, using single characters for user-defined words.

Parts used in the SIMPL Project:

  • Txtzyme interpreter
  • Arduino platform
  • ARM platform
  • FPGA soft core processors
  • C programming language
  • Forth virtual machine
  • New soft core FPGA CPU

Txtzyme – A minimal interpretive language and thoughts on simple extensions
Tytzyme was about as easy as a “language” could get, it offered digital input and output, analogue input, rudimentary timing in uS and mS and simple repetitive loops.  It was so simple, and offered so many opportunities for extension, that I decided to write some new functions – and called the extended language SIMPL  – serial interpreted minimal programming language.
open-inverter-an-open-source-micro-solar-inverter
SIMPL – A simple programming language based on Txtzyme
In the last 30 months I have ported SIMPL to Arduino,  ARM and FPGA soft core processors. I have also used the Txtzyme interpreter to help to create assembly language for an entirely new soft core FPGA cpu.
Very often, during initial deveopments, we need a low level human interaction with a new microcontroller, and SIMPL seems to provide that coding framework to allow more complicated applications to be tested and coded.
SIMPL is coded in C – which allows good portability between micros, but recently I have been wondering whether SIMPL would be better coded in Forth, and act as a human interface layer between a Forth virtual machine and the human programmer.
Forth can be a difficult language to master – partly because it involves considerable manipulation of the data stack, and the need to keep track of the stack presents quite a challenge to the new programmer.
Standard Forth consists of a vocabulary of about 180 compound words, which can be entirely synthesised from about 30 primitives.  When ported to a FPGA soft core CPU, optimised for Forth,  most of those 30 primitives are actual native instructions. That makes it fast in execution, but still not the easiest of languages to grasp.
Can we use SIMPL to access a sufficient subset of the Forth vocabulary to allow real programs to be written, but without having to tie our brains in knots over keeping track of the stack?
The beauty of Forth, is that you can compile a new word and give it any name you wish.  In SIMPL terms, this name would be a single alpha or punctuation character. Small alpha characters are reserved for the keywords, whilst capital letters can be used for User defined words.
For more detail: Open Inverter, an open source micro-solar inverter

Quick Solutions to Questions related to SIMPL Project:

  • What is SIMPL?
    SIMPL stands for serial interpreted minimal programming language, an extension of Txtzyme offering digital input/output, analogue input, timing, and loops.
  • How was SIMPL originally coded?
    SIMPL was initially coded in C to ensure good portability between different microcontrollers.
  • Which platforms has SIMPL been ported to?
    The language has been ported to Arduino, ARM, and FPGA soft core processors over the last 30 months.
  • Why consider rewriting SIMPL in Forth?
    The author considers Forth to potentially act as a better human interface layer between a virtual machine and the programmer.
  • What challenge does standard Forth present to new programmers?
    Standard Forth requires considerable manipulation of the data stack, which can be difficult for beginners to track.
  • How are user-defined words represented in SIMPL?
    User-defined words in SIMPL are represented by capital letters, while small alpha characters are reserved for keywords.
  • Can SIMPL access a subset of the Forth vocabulary?
    Yes, the goal is to use SIMPL to access a sufficient subset of the Forth vocabulary to write real programs without complex stack tracking.
  • What is the relationship between SIMPL and the Open Inverter project?
    More details regarding the project can be found at Open Inverter, an open source micro-solar inverter.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter
Scroll to Top