Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #40721

Re: Arduino Due - small FORTH Computer - Multitasking

From Paul Rubin <no.email@nospam.invalid>
Newsgroups comp.lang.forth
Subject Re: Arduino Due - small FORTH Computer - Multitasking
Date 2015-07-21 00:32 -0700
Organization A noiseless patient Spider
Message-ID <878uaavucv.fsf@jester.gateway.sonic.net> (permalink)
References (6 earlier) <mobo4n$a6h$1@speranza.aioe.org> <moigk7$o2o$1@newsserver.rrzn.uni-hannover.de> <55ace835.268192831@news.eternal-september.org> <87oaj6wtq4.fsf@jester.gateway.sonic.net> <55ad7a05.305521608@news.eternal-september.org>

Show all headers | View raw


stephen@mpeforth.com (Stephen Pelc) writes:
>>> Even the Lite compiler comes with full source code for the target.
>>Does that include the target-resident interpreter
> That's what I just said, so yes.

Oh neat, thanks!  Is there a url where I can download it?  I had
expected "compiler" was a cross-compiler where "source code for the
target" meant an address interpreter that would run headless code sent
by the closed-source compiler.  The text interpreter running on the
target sounded different so I had to ask for clarification.

> If code speed doesn't matter, use a Linux system to soak up all
> those free cycles. It's interesting that a Raspberry Pi is cheaper
> than an Arduino.

There are some expensive Arduinos but the entry level ones are much
cheaper than an RPi, plus they are way smaller and use much less power.
If you include the sub-Arduinos based on the ATTiny85, some of them are
really small and cheap:

  https://www.olimex.com/Products/Duino/AVR/OLIMEXINO-85S/
  http://digistump.com/products/1

They are too small (8k flash) to run a good resident Forth, but it would
be really cool to support them with a cross compiler.

> Being able to write interrupt handlers in high-level is the killer
> item for any high-level language. I haven't written an ARM/Cortex ISR
> in assembler for 10-15 years except to prove that I still know how.

Hmm, I guess that could be an issue for some things.  But even on an 8
Mhz part (the 5 volt AVR's are 12-16 mhz) you can usually afford a few
microseconds per interrupt, which is enough to run a bit of threaded
interpreted Forth code.

> The AVR only has three address registers. That's good enough for C's
> single frame stack, but not for Forth.

I'm not sure but I thought the AVR had a hardware stack pointer that
(like the program counter) is independent of the general purpose
registers.  So with subroutine threading you don't need an address
register (pair) for the R stack.  You can relative CALL to an address
within 2k words of the current pc in one 16-bit instruction word, which
should work out nicely for a small Forth.  I haven't looked at Amforth
though.

> A Cortex-M0 makes a far better Forth engine than an AVR ... and is
> probably cheaper.  We had an AVR target for while - it was swept aside
> by ARM.

The AVR has its good points including the PDIP-packaged (breadboard
friendly) Atmega328 having >2x more capacity than the MSP430G2553 while
costing around the same.  There aren't many PDIP ARM's.  Plus the AVR
can drive quite a lot of current from its gpio pins, enough to run stuff
like relays and leds.  Hardware guys tell me features like this keep the
AVR attractive.  I get the impression that ARMs are harder to program at
the low level, but I haven't tried it yet.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Arduino Due - small FORTH Computer - Multitasking Mark Wills <markwills1970@gmail.com> - 2015-07-14 08:13 -0700
  Re: Arduino Due - small FORTH Computer - Multitasking Mark Wills <markwills1970@gmail.com> - 2015-07-14 08:16 -0700
  Re: Arduino Due - small FORTH Computer - Multitasking Paul Rubin <no.email@nospam.invalid> - 2015-07-14 09:23 -0700
    Re: Arduino Due - small FORTH Computer - Multitasking Mark Wills <markwills1970@gmail.com> - 2015-07-15 04:03 -0700
      Re: Arduino Due - small FORTH Computer - Multitasking Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-07-15 14:02 +0200
        Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-15 16:34 +0000
          Re: Arduino Due - small FORTH Computer - Multitasking Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-07-16 12:26 +0200
            Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-16 12:10 +0000
            Re: Arduino Due - small FORTH Computer - Multitasking Gary Bergstrom <forthprgrmr@gmail.com> - 2015-07-17 06:48 -0700
            Re: Arduino Due - small FORTH Computer - Multitasking Walter Banks <walter@bytecraft.com> - 2015-07-17 16:21 -0400
              Re: Arduino Due - small FORTH Computer - Multitasking Matthias Koch <matthias.koch@hot.uni-hannover.de> - 2015-07-20 11:57 +0200
                Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-20 12:37 +0000
                Re: Arduino Due - small FORTH Computer - Multitasking Gary Bergstrom <forthprgrmr@gmail.com> - 2015-07-20 10:42 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-21 11:29 +0000
                Re: Arduino Due - small FORTH Computer - Multitasking Paul Rubin <no.email@nospam.invalid> - 2015-07-20 11:48 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-20 22:53 +0000
                Re: Arduino Due - small FORTH Computer - Multitasking Paul Rubin <no.email@nospam.invalid> - 2015-07-21 00:32 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-21 08:03 +0000
                Re: Arduino Due - small FORTH Computer - Multitasking Paul Rubin <no.email@nospam.invalid> - 2015-07-21 01:33 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking hughaguilar96@gmail.com - 2015-08-10 16:54 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-07-21 05:18 +0000
                Re: Arduino Due - small FORTH Computer - Multitasking stephen@mpeforth.com (Stephen Pelc) - 2015-07-21 08:20 +0000
                Re: Arduino Due - small FORTH Computer - Multitasking Walter Banks <walter@bytecraft.com> - 2015-07-20 12:09 -0400
                Re: Arduino Due - small FORTH Computer - Multitasking JUERGEN <epldfpga@aol.com> - 2015-07-20 14:02 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking Paul Rubin <no.email@nospam.invalid> - 2015-07-21 15:03 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking visualforth@rocketmail.com - 2015-07-21 21:59 -0700
                Re: Arduino Due - small FORTH Computer - Multitasking Bernd Paysan <bernd.paysan@gmx.de> - 2015-08-03 23:30 +0200
                Re: Arduino Due - small FORTH Computer - Multitasking JUERGEN <epldfpga@aol.com> - 2015-08-10 03:11 -0700

csiph-web