dinsdag 17 november 2020

FORTH on Arduino -2-

When i wrote FORTH on Arduino -1- i had some open questions. Now i have some answers and info how to proceed. I did not try it yet. However i like to post it as a short quick update about  eForth in my 'FORTH on Arduino' series.

- To trick the Arduino so it will start a special Forth word if no terminal input is received within a certain time or depending on a High or Low value on an Arduino pin to create a simple reconfigurable embedded Forth system. should be quite easy. In the book 'eForth and Zen' and especially the ForthArduino_1.pdf  ( Tao of Arduino ) by Dr. Chen-Hanson Ting is info how to create a turn key system that, after a reset or at power on starts with Forth word.
A quote from chapter  "3.6 Build a Turnkey Application" where a forth word APPL is created:

To turnkey this application so that it executes APPL command on booting-up, type the following commands:
' APPL 'BOOT ! \ store address of APPL in variable 'BOOT
$100 ERASE \ erase flash
$100 $100 WRITE \ save RAM $100-17F to flash $100-17F
$180 ERASE \ erase flash if this page is used
$180 $180 WRITE \ save RAM $180-1FF to flash $180-1FF

- Using I2C can be done in different way. i would like to use the Arduino library and interface this to Forth. This to also know how to use other Arduino libraries and code that already works in a 'plain Arduino environment'.  I am still looking for more info about this.
Another option is controlling the IO pins fir I2C direct from within Forth as e.g. explained in   https://arduino-forth.com/article/arduino_I2Cinterface


Geen opmerkingen: