Shop Learn
P2 Taqoz Forth V2.8: Some Tools, VALUE, Simple Local Variables, Dcf77 — Parallax Forums

P2 Taqoz Forth V2.8: Some Tools, VALUE, Simple Local Variables, Dcf77

Christof Eb.Christof Eb. Posts: 538
edited 2021-09-30 07:11 in ForthSpace

Update

AutoE.fth:

  • org set to $7a000
  • memo. updated

Hi,
thanks to Bob's create-does>, included you will find:

  • VALUE type variables - Update now PASM code
  • cpuVar type variables, which are separate for each cog
  • Local variables for the common man adopted from Mark Wills http://turboforth.net/resources/simple_locals.html - I find them often very helpful for better readability and in words, which otherwise need a lot of stack juggling.
  • gettext utility, which receives text from terminal and saves it to SD-card
  • Dcf77, which receives the time and date, if you have got a receiver. Otherwise deactivate the last line.

I have now called this file Auto*.fth to be saved as auto.f. To autoload this at bootup:

: aload
    " auto.f" FOPEN$ if @FILE FLOADS then
;

!INITS

' aload +INIT

BACKUP BIX

Enjoy! Christof

Comments

  • Very nice. Thank you.

    I'd consider adding a tiny bit of information for the new user that the heartbeat example can easily be customized to output the heartbeat to any (reasonably selected) pin on any P2 board or that it relates specifically to the KISS board (where the pin #57 is connected to the green LED). I know it's obvious to us, the KISS boards users, but may not be so obvious to the users of other fine P2 boards.

  • @Maciek said:
    Very nice. Thank you.

    I'd consider adding a tiny bit of information for the new user that the heartbeat example can easily be customized to output the heartbeat to any (reasonably selected) pin on any P2 board or that it relates specifically to the KISS board (where the pin #57 is connected to the green LED). I know it's obvious to us, the KISS boards users, but may not be so obvious to the users of other fine P2 boards.

    You are very much right. I hesitated to post this part of the file. This heart beat is just some gadget of very limited use and was for me a test how to use polls. To use / for this is quite silly too, as it needs a lot of time.... :-)

  • Updated, due to problems with variable space.

Sign In or Register to comment.