Am Samstag, den 28.01.2017, 10:46 +0000 schrieb Tristan Williams:
> I have successfully written a couple of forth words keypad? and
> keypad
> that use i2c (PCF8574A) and an interrupt to tell me if/what key has
> been pressed on my keypad. This is currently completely independent
> of
> the keyboard buffer. What I would like to do is to take the value
> that
> would placed on the data stack by keypad and instead insert it into
> the
> keyboard buffer.

The trunk revision has a word called >rx-buf that appends a character
from the data stack to the command input buffer. It is used in the
usart interrupt word as follows

: isr-rx usart-data-port c@ dup 3 = if cold then >rxbuf ;

(the code 3 = is the check for ctrl-C that resets the system).
IIRC Erich uses this word to communicate via an RS485 network.

> I hope then to take advantage of a recogniser to view (say) 350*700
> as
> an xy coordinate and finally free my cnc (assisted) xy table from its
> umbilical connection to my computer. I am sure it can be done without
> this, but to do so seems like going in the wrong direction.
> 
> The internals of the keyboard buffer and recognisers are new areas
> for
> me so I would grateful for any hints as to where to start.

The >rx-buf is new, as described above. The recognizer stuff is
currently in a discussion with the Forth language gurus, and got
4 revisions so far (the 4th beeing worked on currently). A good
starting point (because I made it ;) ) is 
http://amforth.sourceforge.net/Recognizers.html

Despite it's name the RFD text itself is (should be) readable for
starters too. It has a lot of discussion topics and examples after 
the formal standard section, just scroll down a few pages. A lot 
of (working) examples are at http://theforth.net/tag/recognizer

Matthias
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to