Re: [Amforth] successful compilation with avra

2023-08-28 Thread Jan Kromhout via Amforth-devel
Hello, 

Seems simple to use the avra compiler.
Is it posible to show example how the build is doing?

Cheers,

Jan

Verstuurd vanaf mijn iPad

> Op 28 aug. 2023 om 09:02 heeft Mark Roth  het volgende 
> geschreven:
> 
> You are using the same repo I was for avra Tristan. I just cloned the
> issue-54 branch and built it here. Apart from a couple of 'zero byte in a
> .DB' warnings things do seem to be working fine here as well.
> 
>> On Mon, Aug 28, 2023 at 9:54 AM tristan  wrote:
>> 
>> Hello,
>> 
>> I flashed the hex files created by avra to an uno and, to the extent
>> that getting a serial prompt, defining a word and executing it
>> constitutes a test, it worked perfectly.
>> 
>>> All that being said, I would be very interested to see the
>>> changes, maybe, just maybe we can fix the amForth source tree
>>> enough to make avra happy.
>> 
>> No changes to the source tree were needed to create the uno hex files.
>> The only change made was to edit the Makefile to use avra.
>> 
>> Best wishes,
>> Tristan
>> 
>> 
>>> On 2023-08-27 06:29, Tristan Williams wrote:
>>> Hello Mark, Brian, Erich, George
>>> 
>>> Thank you! A very welcome set of messages on a bank holiday
>>> weekend. For non-windows users having avra as the assembler in the
>>> build chain would go along way in making AmForth more approachable and
>>> maintainable.
>>> 
>>> I think this is the repo for avra that does not have the macro/
>>> parenthesis issue you mention[1]
>>> 
>>> https://github.com/srtlg/avra/tree/development
>>> 
>>> I downloaded it and built it on macOS (requiring only typing 'make')
>>> and updated the AmForth Makefile to run arva. The updated makefile
>>> built the hex files for an uno with AmForth 6.9. I did not experience
>>> any issues with d0< but I recall there were some changes in that
>>> area between 6.8 and 6.9. I've not flashed it yet as I have to dig out
>>> an uno from storage but the hex files are the same size and with zero
>>> diffs when compared with my previous wine/avrasm32 builds.
>>> 
>>> -rw-r--r--  1 tw  staff  29346 26 Aug 17:53 uno.hex
>>> -rw-r--r--  1 tw  staff  29346 26 Aug 16:29 save.hex
>>> -rw-r--r--  1 tw  staff239 26 Aug 17:53 uno.eep.hex
>>> -rw-r--r--  1 tw  staff239 26 Aug 16:29 save.eep.hex
>>> 
>>> 
>>> Best wishes,
>>> Tristan
>>> 
>>> [1] https://github.com/Ro5bert/avra/issues/54
>>> 
>>> 
>>> On 25Aug23 17:12, George Herzog wrote:
 Thanks for your efforts.
 
 People don't often appreciate how much knowledge and effort goes into
 successful compilation of code.
 
 
 
 On Fri, Aug 25, 2023, 3:15 PM Erich Wälde  wrote:
 
> Hello Brian and Mark,
> 
> very nice to see emails on this list :)
> 
> Compiling amforth with avra?
> 
> I have made numerous experiments a long time ago and again more
> recently. If memory serves me well:
> - Amforth had been good with avra, at least in the 4.x range.
> - However, avrasm2.exe could do more clever tricks, and Matthias
> started using those.
> - I did make a fork of amForth from Version 5.0, this can be
> assembled with avra, see:
> https://git.sr.ht/~ew/hbv3_am50forth
> - avra received a bit of attention not so long ago (same repo
> you found):
> https://github.com/Ro5bert/avra
>> $ avra --version
>> AVRA: advanced AVR macro assembler (version 1.4.2)
> which among other changes now includes my favourite atmega644p.
> 
> So, I am currently dabbling with my fork again in the hope to
> eventually catch that problem of long term stability. There is
> absolutely no reason, why I have to reprogram one or two of my
> controllers a few times per year, because they do not start up
> after a power cycle, which in turn is done, because the
> communication with that controller ceases to work. I went back
> to amforth 5.0 for simplicity reasons.
> 
> 
> All that being said, I would be very interested to see the
> changes, maybe, just maybe we can fix the amForth source tree
> enough to make avra happy.
> 
> 
> Cheers,
> Erich
> 
> Brian K Navarette  writes:
> 
>> That is awesome news!
>> Brian-in-ohio
>> 
>> 
>> On Thu, Aug 24, 2023 at 2:59 PM Mark Roth 
>> wrote:
>> 
>>> Hello AmForth. It has been some time and quite weird things since
>> last
> I've
>>> been here. I am still using AmForth with my trusty atmega1284p and
> learning
>>> the language as time permits. I remember having heard talk that
>> avra had
>>> gotten (almost) to the point of being able to compile the source
>> tree
> here.
>>> First I tried with 1.3 I think and it failed miserably. Then I
>> found a
> repo
>>> on github (Ro5bert/avra) that seemed to almost but not quite do
>> it. I
> was
>>> getting a pile of errors for macro calls. So looking into the
>> issues I
> saw
>>> that someone had forked that repo and 

Re: [Amforth] how to use bitmask:

2019-07-03 Thread Jan Kromhout via Amforth-devel
Hello,


After trying for a while, I failed to get these three words together.
Do not master the bitmask. Despite the examples and the email. Can someone 
please help me with this.
This is my simple code. The source is from flashForth.
The tree words are setBitmask,clearBitmask and testBitmask.

Thanks for any help.
With kindly regards,

Jan

$24 constant ddrb
$25 constant portb
$4c constant spcr
$4d constant spsr
$4e constant spdr


\ bit masks
%000100 constant mSS( PB2 - pin 10 )
%001000 constant mMOSI  ( PB3 - pin 11 )
%01 constant mMISO  ( PB4 - pin 12 )
%10 constant mSCK   ( PB5 - pin 13 )
$80 constant mSPIF
$40 constant mWCOL


: setBitmask ; ( bitmask port -- )

: clrBitmask ; ( bitmask port -- )

: testBitmask ; ( bitmask port -- flag )

: spi.init ( -- )
  mSCK ddrb setBitmask  \ SCK as output
  mSCK portb clrBitmask \ clock idles low
  mMOSI ddrb setBitmask \ MOSI as output
  mMISO ddrb clrBitmask \ MISO as input
  mMISO portb setBitmask\ activate pull -up on MISO
  mSS ddrb setBitmask   \ SS as output
  mSS portb setBitmask  \ deselect
  $51 spcr c!   \ enable as master with 
cpolarity 0, cphase 0, fosc /16
  $00 spsr c!   \ SPI2X =0 for fosc /16
  spsr c@ drop spdr c@ drop \ will clear SPIF
;

: spi.wait ( -- )
  begin mSPIF spsr testBitmask until 
;



> Op 17 jun. 2019, om 21:31 heeft Matthias Trute  het volgende 
> geschreven:
> 
> Hi Jan,
> 
>> I need to do a  bitmask on register.
> 
> The simplest operations are the ones documented
> in the source file
> 
> \ Use it this way:
> \ PORTD 7 portpin: PD.7  ( define portD pin #7)
> \ PD.7 high  ( turn portD pin #7 on, i.e. set it high-
> level)
> \ PD.7 low   ( turn portD pin #7 off, i.e. set it low-
> level)
> \ PD.7  pulse( turn portD pin #7 for  high and low)
> \ the following words are for "real" IO pins only
> \ PD.7 pin_output( set DDRD so that portD pin #7 is output)
> \ PD.7 pin_input ( set DDRD so that portD pin #7 is input)
> \ PD.7 pin_high? ( true if pinD pin #7 is high)
> \ PD.7 pin_low?  ( true if pinD pin #7 is low)
> \ 
> 
> These word use only one bit.
> 
>> In bitnames.frt there is a word bitmask: How can I use it to do
>> the two actions above?
> 
> Note that the hex coding is used (a single F means $f)
> 
> \ multi bit operation
> \ PORTD F bitmask: PD.F  ( define the lower nibble of port d )
> \ PD.F pin@  ( get the lower nibble bits )
> \ 5 PD.F pin!( put the lower nibble bits, do not change the
> others )
> 
> A bitmask operates on all bits that are 1 in the bitmask. All others
> are unaffected, c! would overwrite all bits.
> 
> Matthias
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] how to use bitmask:

2019-06-17 Thread Jan Kromhout via Amforth-devel
Hello,

I need to do a  bitmask on register.

These are the constants, and mask

$24 constant ddrb
$25 constant portb

\ bit masks
%000100 constant mSS ( PB2 )
%10 constant mSCK ( PB5 )

I wont 
1. to set the bits in ddrb with the bitmask mSS
2. to clear bits in portb with the bitmask mSCK

In bitnames.frt there is a word bitmask: How can I use it to do
the two actions above?

This is mor as a learning to understand working with bitmask.

Thanks for any help.

Jan


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Need some help with the SPI

2019-06-08 Thread Jan Kromhout via Amforth-devel
Hello Tristan,

That’s nice. Please can you explain how to do it?
I know that there are some article thats describe also how to compile forth 
under windows. It had a simple guideline. 
I have that uses for playing with the fp packages. And that was working fine.
But I have removed is from my computer !!

Please someone can help me out with this.

With kindly regards,


Jan




> Op 8 jun. 2019, om 00:29 heeft Tristan Williams  het 
> volgende geschreven:
> 
> Hello Jan,
> 
> Erich puts the case for being able to build AmForth very well.
> 
> I build AmForth on OS X if that is of any help.
> 
> Kind regards,
> 
> Tristan
> 
> 
> On 07Jun19 21:37, Erich Wälde wrote:
>> Hello Jan,
>> 
>> Jan Kromhout via Amforth-devel writes:
>> 
>>> Hello Tristan,Erich
>>> 
>>> This is far over my knowledge, but will give it a try.
>>> 
>>> But when I try to load the spi.frt I get an error here
>>> 
>>> |C|   97|\ send a byte, ignore recieved byte
>>> |S|   98|: c!spi ( c -- )
>>> |S|   99|c!@spi drop
>>> |E=3D ?? -13 6
>> 
>> In avr8/words you will find 3 files:
>>> 2spirw.asm  n-spi.asm  spirw.asm
>> which in turn will define 4 words:
>>> !@spi  n@spi n!spi  c!@spi
>> all of these come to life if you include their .asm files and
>> reassemble.
>> 
>> Rebuilding your project: yes, it might look intimidating the
>> first time. However, think about the gains:
>> 
>> - you can chose another board with a different controller
>> 
>> - you can change the clock crystal to another frequency, e.g. I
>>  strongly prefer baud rate crystals, e.g. 11059200 Hz.
>> 
>> - you can change the baud rate of the serial interface (within
>>  limits).
>> 
>> - you can extend your AmForth system with a large number or words
>>  to fit your project.
>> 
>> - you are not locked to use somehow prebuild .hex files
>> 
>> The sky is the limit! So: Don't give up too soon, please!
>> 
>> This might help if you are linux based:
>> http://amforth.sourceforge.net/UG/linux.html
>> A very long time ago I wrote this:
>> http://amforth.sourceforge.net/pr/Fosdem2011-proceedings-amforth.pdf
>> 
>> If you are Windows based, have a look at=20
>> http://amforth.sourceforge.net/UG/windows.html
>> 
>> Cheers,
>> Erich
>> 
>>> 
>>> Is this also a assembler word?
>>> 
>>> Kindly regards,
>>> 
>>> Jan
>>> 
>>> 
>>> 
>>> 
>>>> Op 7 jun. 2019, om 19:50 heeft Erich Wälde  het 
>>>> volgende geschreven:
>>>> 
>>>> Hello Jan,
>>>> 
>>>> 
>>>> Jan Kromhout writes:
>>>> 
>>>>> Hi Tristan,
>>>>> 
>>>>> What to load in the right sequence to fellow the examples in 
>>>>> http://amforth.sourceforge.net/TG/recipes/SPI.html ?
>>>>> If I have the right sequence of loading the screens I will start as you 
>>>>> mentiod.
>>>>> 
>>>>> Kind regards,
>>>>> 
>>>>> Jan
>>>>> 
>>>>> 
>>>>> 
>>>>> Op 7 jun. 2019, om 19:25 heeft Tristan Williams 
>>>>> mailto:h...@tjnw.co.uk>> het volgende geschreven:
>>>>> 
>>>>> Hi Jan,
>>>>> 
>>>>> No don’t have. Why?
>>>>> 
>>>>> Because words/spirw.asm provides c!@spi which makes using the
>>>>> hardware spi easier, and it is used in the recipes
>>>> 
>>>> you see the filename? "words/spirw.asm"? Please note: .asm
>>>> suffix. This means that in your project directory, you need to
>>>> add one line to the file "dict_appl.inc". Then you need to
>>>> reassemble the project and load the resulting .hex files to your
>>>> controller. I strongly recommend learning this workflow, if you
>>>> didn't already.
>>>> 
>>>> Cheers,
>>>> Erich
>>>> 
>>>> 
>>>>> 
>>>>> http://amforth.sourceforge.net/TG/recipes/SPI.html
>>>>> 
>>>>> Separately, if you haven't read it already
>>>>> 
>>>>> https://en.wikipedia.org/wiki/Serial_Peripheral_Interface
>>>>> 
>>>>> will help a lot, as will starting with a simple SPI device (e.g. io
>>>>> expander, digital potentiometer) first.
>&g

Re: [Amforth] Need some help with the SPI

2019-06-07 Thread Jan Kromhout via Amforth-devel
Hello Tristan,Erich

This is far over my knowledge, but will give it a try.

But when I try to load the spi.frt I get an error here

|C|   97|\ send a byte, ignore recieved byte
|S|   98|: c!spi ( c -- )
|S|   99|c!@spi drop
|E= ?? -13 6 

Is this also a assembler word?

Kindly regards,

Jan




> Op 7 jun. 2019, om 19:50 heeft Erich Wälde  het volgende 
> geschreven:
> 
> Hello Jan,
> 
> 
> Jan Kromhout writes:
> 
>> Hi Tristan,
>> 
>> What to load in the right sequence to fellow the examples in 
>> http://amforth.sourceforge.net/TG/recipes/SPI.html ?
>> If I have the right sequence of loading the screens I will start as you 
>> mentiod.
>> 
>> Kind regards,
>> 
>> Jan
>> 
>> 
>> 
>> Op 7 jun. 2019, om 19:25 heeft Tristan Williams 
>> mailto:h...@tjnw.co.uk>> het volgende geschreven:
>> 
>> Hi Jan,
>> 
>> No don’t have. Why?
>> 
>> Because words/spirw.asm provides c!@spi which makes using the
>> hardware spi easier, and it is used in the recipes
> 
> you see the filename? "words/spirw.asm"? Please note: .asm
> suffix. This means that in your project directory, you need to
> add one line to the file "dict_appl.inc". Then you need to
> reassemble the project and load the resulting .hex files to your
> controller. I strongly recommend learning this workflow, if you
> didn't already.
> 
> Cheers,
> Erich
> 
> 
>> 
>> http://amforth.sourceforge.net/TG/recipes/SPI.html
>> 
>> Separately, if you haven't read it already
>> 
>> https://en.wikipedia.org/wiki/Serial_Peripheral_Interface
>> 
>> will help a lot, as will starting with a simple SPI device (e.g. io
>> expander, digital potentiometer) first.
>> 
>> Kind regards,
>> 
>> Tristan
>> 
>> 
>> Verstuurd vanaf mijn iPad
>> 
>> Op 7 jun. 2019 om 17:25 heeft Tristan Williams 
>> mailto:h...@tjnw.co.uk>> het volgende geschreven:
>> 
>> Hello Jan,
>> 
>> A quick question first.
>> 
>> You have built your AmForth hex files with words/spirw.asm ?
>> 
>> Kind regards,
>> 
>> Tristan
>> 
>> On 07Jun19 17:06, Jan Kromhout via Amforth-devel wrote:
>> Hello
>> 
>> I have take a close look into SPI routines.
>> I really not understand them.
>> 
>> I need simple make a connection withe the arduino in amForth.
>> The basics I understand how to make a pin high or low etc.
>> But I don’t know how to start to initialize the SPI etc.
>> Can someone help me with this or give a simple example?
>> The interface is using the standard pins for the SPI.
>> 
>> I mark the part of the code with <===? where I have trouble to 
>> convert to amForth.
>> 
>> Thanks for any help.
>> 
>> Cheers,
>> 
>> Jan
>> 
>> 
>> #include "SPI.h"
>> 
>> #define SCK_PIN   13
>> #define MISO_PIN  12
>> #define MOSI_PIN  11
>> #define SS_PIN10
>> 
>> void umFPU_begin(void)
>> {
>>  digitalWrite(SS_PIN, HIGH);
>>  pinMode(SS_PIN, OUTPUT);
>>  umFPU_reset();
>> }
>> 
>> //--- reset -
>> 
>> void umFPU_reset()
>> {
>> digitalWrite(SS_PIN, LOW);
>> 
>> // disable SPI.Master
>> SPI.end();   <===?
>> 
>> // reset the FPU
>> digitalWrite(MOSI_PIN, HIGH);
>> for (byte i = 0; i < 80; i++)
>> {
>>  digitalWrite(SCK_PIN, HIGH);
>>  digitalWrite(SCK_PIN, LOW);
>> }
>> digitalWrite(MOSI_PIN, LOW);
>> 
>> delay(10);
>> 
>> // enable SPI.Master
>> SPI.setDataMode(SPI_MODE0);
>> SPI.setBitOrder(MSBFIRST);
>> SPI.setClockDivider(SPI_CLOCK_DIV4);
>> SPI.begin();  <===?
>> 
>> digitalWrite(SS_PIN, HIGH);
>> }
>> 
>> byte umFPU_read(void)
>> {
>> byte bval;
>> digitalWrite(SS_PIN, LOW);
>> umFPU_readDelay();
>> bval = SPI.transfer(0); <===?
>> digitalWrite(SS_PIN, HIGH);
>> return bval;
>> }
>> 
>> void umFPU_write_1(byte b1)
>> {
>> digitalWrite(SS_PIN, LOW);
>> SPI.transfer(b1);  <===?
>> digitalWrite(SS_PIN, HIGH);
>> }
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net<mailto:Amforth-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/amforth-de

Re: [Amforth] Need some help with the SPI

2019-06-07 Thread Jan Kromhout via Amforth-devel
Hello Tristan,

No don’t have. Why?

Verstuurd vanaf mijn iPad

> Op 7 jun. 2019 om 17:25 heeft Tristan Williams  het volgende 
> geschreven:
> 
> Hello Jan,
> 
> A quick question first.
> 
> You have built your AmForth hex files with words/spirw.asm ?
> 
> Kind regards,
> 
> Tristan
> 
>> On 07Jun19 17:06, Jan Kromhout via Amforth-devel wrote:
>> Hello
>> 
>> I have take a close look into SPI routines.
>> I really not understand them.
>> 
>> I need simple make a connection withe the arduino in amForth.
>> The basics I understand how to make a pin high or low etc.
>> But I don’t know how to start to initialize the SPI etc.
>> Can someone help me with this or give a simple example?
>> The interface is using the standard pins for the SPI.
>> 
>> I mark the part of the code with <===? where I have trouble to 
>> convert to amForth.
>> 
>> Thanks for any help.
>> 
>> Cheers,
>> 
>> Jan
>> 
>> 
>> #include "SPI.h"
>> 
>> #define SCK_PIN   13
>> #define MISO_PIN  12
>> #define MOSI_PIN  11
>> #define SS_PIN10
>> 
>> void umFPU_begin(void)
>> {
>>digitalWrite(SS_PIN, HIGH);
>>pinMode(SS_PIN, OUTPUT);
>>umFPU_reset();
>> }
>> 
>> //--- reset -
>> 
>> void umFPU_reset()
>> {
>>  digitalWrite(SS_PIN, LOW);
>> 
>>  // disable SPI.Master
>>  SPI.end();   <===?
>> 
>>  // reset the FPU
>>  digitalWrite(MOSI_PIN, HIGH);
>>  for (byte i = 0; i < 80; i++)
>>  {
>>digitalWrite(SCK_PIN, HIGH);
>>digitalWrite(SCK_PIN, LOW);
>>  }
>>  digitalWrite(MOSI_PIN, LOW);
>> 
>>  delay(10);
>> 
>>  // enable SPI.Master
>>  SPI.setDataMode(SPI_MODE0);
>>  SPI.setBitOrder(MSBFIRST);
>>  SPI.setClockDivider(SPI_CLOCK_DIV4);
>>  SPI.begin();  <===?
>> 
>>  digitalWrite(SS_PIN, HIGH);
>> }
>> 
>> byte umFPU_read(void)
>> {
>>  byte bval;
>>  digitalWrite(SS_PIN, LOW);
>>  umFPU_readDelay();
>>  bval = SPI.transfer(0); <===?
>>  digitalWrite(SS_PIN, HIGH);
>>  return bval;
>> }
>> 
>> void umFPU_write_1(byte b1)
>> {
>>  digitalWrite(SS_PIN, LOW);
>>  SPI.transfer(b1);  <===?
>>  digitalWrite(SS_PIN, HIGH);
>> }
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Need some help with the SPI

2019-06-07 Thread Jan Kromhout via Amforth-devel
Hello

I have take a close look into SPI routines.
I really not understand them.

I need simple make a connection withe the arduino in amForth.
The basics I understand how to make a pin high or low etc.
But I don’t know how to start to initialize the SPI etc.
Can someone help me with this or give a simple example?
The interface is using the standard pins for the SPI.

I mark the part of the code with <===? where I have trouble to convert 
to amForth.

Thanks for any help.

Cheers,

Jan


#include "SPI.h"

#define SCK_PIN   13
#define MISO_PIN  12
#define MOSI_PIN  11
#define SS_PIN10

void umFPU_begin(void)
{
digitalWrite(SS_PIN, HIGH);
pinMode(SS_PIN, OUTPUT);
umFPU_reset();
}

//--- reset -

void umFPU_reset()
{
  digitalWrite(SS_PIN, LOW);

  // disable SPI.Master
  SPI.end();   <===?

  // reset the FPU
  digitalWrite(MOSI_PIN, HIGH);
  for (byte i = 0; i < 80; i++)
  {
digitalWrite(SCK_PIN, HIGH);
digitalWrite(SCK_PIN, LOW);
  }
  digitalWrite(MOSI_PIN, LOW);

  delay(10);

  // enable SPI.Master
  SPI.setDataMode(SPI_MODE0);
  SPI.setBitOrder(MSBFIRST);
  SPI.setClockDivider(SPI_CLOCK_DIV4);
  SPI.begin();  <===?

  digitalWrite(SS_PIN, HIGH);
}

byte umFPU_read(void)
{
  byte bval;
  digitalWrite(SS_PIN, LOW);
  umFPU_readDelay();
  bval = SPI.transfer(0); <===?
  digitalWrite(SS_PIN, HIGH);
  return bval;
}

void umFPU_write_1(byte b1)
{
  digitalWrite(SS_PIN, LOW);
  SPI.transfer(b1);  <===?
  digitalWrite(SS_PIN, HIGH);
}

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] SPI interface on the arduino

2019-06-04 Thread Jan Kromhout via Amforth-devel
Hello,

I need to read and write to the SPI interface (bus) on the arduino. (pin 
10,11,12,13)
Wich words are the best to use?

Thanks for any help.
Cheers,

Jan

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Problem loading hex file into 328p

2019-04-20 Thread Jan Kromhout via Amforth-devel
Hello,

I use these with a pololu programmer v2.1

Laad de nieuwe versie:
avrdude -p m328p -c avrispv2 -P /dev/tty.usbmodem00230362 -U efuse:w:0xFF:m -U 
hfuse:w:0xD9:m -U lfuse:w:0xFF:m -U flash:w:amforth.hex:i -U 
eeprom:w:amforth.eep.hex:i

And it works great, no problems at all.


Cheers,

Jan



> Op 20 apr. 2019, om 00:12 heeft Michael Picco  het 
> volgende geschreven:
> 
> Hello,
> 
> I've bought some extra atmega328P-U parts and attempted to install the 
> Amforth files using the AVR Pocket Programmer from Sparkfun. The first couple 
> of attempts ended in failure and I got nothing back from the Arduino Uno when 
> hooking it up using Putty on my Linux box.  I was able to use the programmer 
> to reinstall the optiboot and was successful, so it appears that the 
> programmer is doing as intended.
> 
> Does the Amforth loading procedure involve setting the fuses?
> 
> The command line being used is: avrdude -p m328p -c usbtiny -U 
> flash:w:uno.hex -U eeprom:w:uno.eep.hex -v
> 
> Any help is greatly appreciated!
> 
> Kind regards,
> 
> Michael
> 
> K6MLE
> 
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Installation of most current version

2019-04-07 Thread Jan Kromhout via Amforth-devel
Hello Michael

I use the Pololu avr programmer v2.1 on my macbook, this works great!

Cheers,

Jan

> Op 7 apr. 2019, om 05:31 heeft Michael Picco  het 
> volgende geschreven:
> 
> Hello Jan,
> Thank you for that!  I've located the hex files.
> What I can't seem to locate is my old AVRIPSmkII programmer.  I notice that 
> it's been obsoleted by Atmel!  Can you suggest a more current model?
> Thanks again!
> Michael
> K6MLE
> 
> 
> 
> On 4/6/2019 11:35 AM, Jan Kromhout via Amforth-devel wrote:
>> Hello Michael,
>> 
>> amForth has in the download the complete hex files!
>> 
>> Cheers,
>> 
>> Jan
>> 
>>> Op 6 apr. 2019, om 20:20 heeft Michael Picco  het 
>>> volgende geschreven:
>>> 
>>> Hello,
>>> 
>>> I am trying to get back to amForth after a hiatus (last used 5.2).
>>> 
>>> Is there a set of compiling instructions suited for version 6.7 using Atmel 
>>> Studio 7?
>>> 
>>> Thank you in advance!
>>> 
>>> Michael
>>> 
>>> 
>>> 
>>> 
>>> ___
>>> Amforth-devel mailing list for http://amforth.sf.net/
>>> Amforth-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>> 
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Installation of most current version

2019-04-06 Thread Jan Kromhout via Amforth-devel
Hello Michael,

amForth has in the download the complete hex files!

Cheers,

Jan

> Op 6 apr. 2019, om 20:20 heeft Michael Picco  het 
> volgende geschreven:
> 
> Hello,
> 
> I am trying to get back to amForth after a hiatus (last used 5.2).
> 
> Is there a set of compiling instructions suited for version 6.7 using Atmel 
> Studio 7?
> 
> Thank you in advance!
> 
> Michael
> 
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] ATmega4809 Curiosity Nano

2019-03-06 Thread Jan Kromhout via Amforth-devel
A nice board to play with it.
What is the internal frequency? Found only that there is a 32k crystal mounted 
on the board.


Cheers,

Jan

> Op 6 mrt. 2019, om 09:56 heeft Tristan Williams  het 
> volgende geschreven:
> 
> 
> I would like to try and see if I can get AmForth running on the
> ATmega4809 IC and specifically on the ATmega4809 Curiosity Nano [1]   
> 
> The ATmega4809 is a relatively new IC and so does not have a directory
> in amforth-6.8/avr8/devices. Consequently it does not have the part
> specific .frt , .asm , .inc , .py and .pyc files. These files suggest
> that they are automatically generated. Is this something I can do from
> the amforth-6.8 distribution?
> 
> 
> Kind regards and best wishes,
> Tristan
> 
> [1] 
> https://www.mouser.co.uk/ProductDetail/Microchip-Technology/DM320115?qs=%2Fha2pyFaduiAZmPfOK2UmyqtV8moWySwmqCNZ1CsG6c%3D
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Error in example multitasking at amforth.sourceforge.net

2019-02-25 Thread Jan Kromhout via Amforth-devel
Hello,

When I look to the example of multitasking I think something is wrong. This is 
the code at amforth.sourceforge.net :

: starttasker
  task_demo task-init
  \ create TCB in RAM
  start-demo
  \ activate tasks job
  onlytask
  task_demo tcb>tid alsotask
  multi
;

I think this is the right one

: starttasker
  task_demo task-init
  \ create TCB in RAM
  start-demo
  \ activate tasks job
  onlytask
  task_demo tib>tcb alsotask  \ <===
  multi
;


Cheers
Jan


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Soft Serial Port

2019-02-17 Thread Jan Kromhout via Amforth-devel
Tristan,

Loading my Mega with forth was a succes. After loading my fix amount of 
screens, witch are the same as on the Arduino it took significant more time to 
save and load the new
image. Is this by the structure of the Mega?
So far no finding thats worry my. It runs as it should! Great project from your 
side. Will maybe a fix item into the repository of amforth.

With kindly regards,

Jan


> Op 16 feb. 2019, om 22:07 heeft Jan Kromhout via Amforth-devel 
>  het volgende geschreven:
> 
> Tristian,
> 
> Thank, I will start soon to explore this version.
> Let you know my findings.
> 
> With kindly regars,
> 
> Jan
> 
> Verstuurd vanaf mijn iPad
> 
>> Op 16 feb. 2019 om 21:27 heeft Tristan Williams  het 
>> volgende geschreven:
>> 
>> Jan,
>> 
>> My prebuilt hex files for the ARDUINO MEGA 2560 are linked below
>> 
>> https://www.mostlymostly.uk/post/2019.02.16/
>> 
>> Hope this helps and interested to hear how you get on.
>> 
>> Best wishes,
>> Tristan
>> 
>> 
>> 
>>> On 15Feb19 16:47, Jan Kromhout via Amforth-devel wrote:
>>> Tristan,
>>> 
>>> First thanks for the quick response.
>>> Yes I found out the hex file wasn’t working after flashing to the Mega.
>>> My flasher is from Pololu and is working great on my macbook pro and 
>>> avrdude.
>>> 
>>> Is there an possibility to get the hex files from you? 
>>> I’m not a star in compiling this kind of things without a good portion of 
>>> help.
>>> 
>>> My email is krom1109 at hotmail dot com
>>> 
>>> With kindly regards,
>>> 
>>> Jan
>>> 
>>> 
>>> 
>>>> Op 15 feb. 2019, om 16:38 heeft Tristan Williams  het 
>>>> volgende geschreven:
>>>> 
>>>> Jan,
>>>> 
>>>> A number of things.
>>>> 
>>>> The hex file you have found may not be one for the Arduino
>>>> Mega2560. If I remember correctly, the distribution has an appl folder
>>>> for the atmega2561 and the configuration assembler file
>>>> 
>>>> https://sourceforge.net/p/amforth/code/HEAD/tree/trunk/appl/atmega2561/atmega256.asm
>>>> 
>>>> suggests that it was built for an ATmega2561 with an 14.745600MHz crystal 
>>>> and uart1
>>>> hosting the AmForth interpreter.
>>>> 
>>>> I adjusted the AmForth make system (on OSX) to build a custom hex file
>>>> for the Arduino Mega2560 which uses ATmega2560 chip and a 16MHz
>>>> crystal. I also put the AmForth interpreter on uart0. The AmForth
>>>> build system is one of its many strengths, though getting it to work
>>>> on OS X does require a few extra steps.
>>>> 
>>>> I used these fuse values for my Arduino Mega2560
>>>> 
>>>>> avrdude: safemode: Fuses OK (E:FF, H:99, L:CE)
>>>> 
>>>> Finally, what hex programmer you use may be important with the Mega2560. I
>>>> used an avrisp2 compatible programmer and had no problems. However, I can
>>>> confirm that my usbtiny programmer couldn't program my Mega2560 
>>>> successfully.
>>>> 
>>>> Best wishes,
>>>> Tristan
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On 15Feb19 14:20, Jan Kromhout wrote:
>>>>> Tristan,
>>>>> 
>>>>> Found the hex files for the Mega, but don’t found the fuse values.
>>>>> Please can you help me out with these.
>>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Jan
>>>>> 
>>>>> 
>>>>> 
>>>>>> Op 15 feb. 2019, om 13:21 heeft Jan Kromhout  het 
>>>>>> volgende geschreven:
>>>>>> 
>>>>>> Tristan,
>>>>>> 
>>>>>> Thank. Where to find the hex files for the mega, and what fuse settings 
>>>>>> you have used.
>>>>>> I wont to play with it this evening. Verry exciting how it works.
>>>>>> Cheers,
>>>>>> 
>>>>>> Jan
>>>>>> 
>>>>>> Verstuurd vanaf mijn iPad
>>>>>> 
>>>>>>> Op 15 feb. 2019 om 12:45 heeft Tristan Williams  het 
>>>>>>> volgende geschreven:
>>>>>>> 
>>>>>>> Jan,
>>>&g

Re: [Amforth] Soft Serial Port

2019-02-16 Thread Jan Kromhout via Amforth-devel
Tristian,

Thank, I will start soon to explore this version.
Let you know my findings.

With kindly regars,

Jan

Verstuurd vanaf mijn iPad

> Op 16 feb. 2019 om 21:27 heeft Tristan Williams  het 
> volgende geschreven:
> 
> Jan,
> 
> My prebuilt hex files for the ARDUINO MEGA 2560 are linked below
> 
> https://www.mostlymostly.uk/post/2019.02.16/
> 
> Hope this helps and interested to hear how you get on.
> 
> Best wishes,
> Tristan
> 
> 
> 
>> On 15Feb19 16:47, Jan Kromhout via Amforth-devel wrote:
>> Tristan,
>> 
>> First thanks for the quick response.
>> Yes I found out the hex file wasn’t working after flashing to the Mega.
>> My flasher is from Pololu and is working great on my macbook pro and avrdude.
>> 
>> Is there an possibility to get the hex files from you? 
>> I’m not a star in compiling this kind of things without a good portion of 
>> help.
>> 
>> My email is krom1109 at hotmail dot com
>> 
>> With kindly regards,
>> 
>> Jan
>> 
>> 
>> 
>>> Op 15 feb. 2019, om 16:38 heeft Tristan Williams  het 
>>> volgende geschreven:
>>> 
>>> Jan,
>>> 
>>> A number of things.
>>> 
>>> The hex file you have found may not be one for the Arduino
>>> Mega2560. If I remember correctly, the distribution has an appl folder
>>> for the atmega2561 and the configuration assembler file
>>> 
>>> https://sourceforge.net/p/amforth/code/HEAD/tree/trunk/appl/atmega2561/atmega256.asm
>>> 
>>> suggests that it was built for an ATmega2561 with an 14.745600MHz crystal 
>>> and uart1
>>> hosting the AmForth interpreter.
>>> 
>>> I adjusted the AmForth make system (on OSX) to build a custom hex file
>>> for the Arduino Mega2560 which uses ATmega2560 chip and a 16MHz
>>> crystal. I also put the AmForth interpreter on uart0. The AmForth
>>> build system is one of its many strengths, though getting it to work
>>> on OS X does require a few extra steps.
>>> 
>>> I used these fuse values for my Arduino Mega2560
>>> 
>>>> avrdude: safemode: Fuses OK (E:FF, H:99, L:CE)
>>> 
>>> Finally, what hex programmer you use may be important with the Mega2560. I
>>> used an avrisp2 compatible programmer and had no problems. However, I can
>>> confirm that my usbtiny programmer couldn't program my Mega2560 
>>> successfully.
>>> 
>>> Best wishes,
>>> Tristan
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>> On 15Feb19 14:20, Jan Kromhout wrote:
>>>> Tristan,
>>>> 
>>>> Found the hex files for the Mega, but don’t found the fuse values.
>>>> Please can you help me out with these.
>>>> 
>>>> Cheers,
>>>> 
>>>> Jan
>>>> 
>>>> 
>>>> 
>>>>> Op 15 feb. 2019, om 13:21 heeft Jan Kromhout  het 
>>>>> volgende geschreven:
>>>>> 
>>>>> Tristan,
>>>>> 
>>>>> Thank. Where to find the hex files for the mega, and what fuse settings 
>>>>> you have used.
>>>>> I wont to play with it this evening. Verry exciting how it works.
>>>>> Cheers,
>>>>> 
>>>>> Jan
>>>>> 
>>>>> Verstuurd vanaf mijn iPad
>>>>> 
>>>>>> Op 15 feb. 2019 om 12:45 heeft Tristan Williams  het 
>>>>>> volgende geschreven:
>>>>>> 
>>>>>> Jan,
>>>>>> 
>>>>>> There is a link "source" in the text, but below is the url from the
>>>>>> link. 
>>>>>> 
>>>>>> https://www.mostlymostly.uk/files/source/uart1.forth
>>>>>> 
>>>>>> Tristan
>>>>>> 
>>>>>> 
>>>>>>> On 15Feb19 11:15, Jan Kromhout via Amforth-devel wrote:
>>>>>>> Hi Tristan,
>>>>>>> 
>>>>>>> How can I acces the source, the link shows only an overview!
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> 
>>>>>>> Jan
>>>>>>> 
>>>>>>> Verstuurd vanaf mijn iPad
>>>>>>> 
>>>>>>>> Op 15 feb. 2019 om 09:21 heeft Tristan Williams  het 
>>>>>>>> volgende geschreven:
>>>>>&

Re: [Amforth] Soft Serial Port

2019-02-15 Thread Jan Kromhout via Amforth-devel
Tristan,

First thanks for the quick response.
Yes I found out the hex file wasn’t working after flashing to the Mega.
My flasher is from Pololu and is working great on my macbook pro and avrdude.

Is there an possibility to get the hex files from you? 
I’m not a star in compiling this kind of things without a good portion of help.

My email is krom1109 at hotmail dot com

With kindly regards,

Jan



> Op 15 feb. 2019, om 16:38 heeft Tristan Williams  het 
> volgende geschreven:
> 
> Jan,
> 
> A number of things.
> 
> The hex file you have found may not be one for the Arduino
> Mega2560. If I remember correctly, the distribution has an appl folder
> for the atmega2561 and the configuration assembler file
> 
> https://sourceforge.net/p/amforth/code/HEAD/tree/trunk/appl/atmega2561/atmega256.asm
> 
> suggests that it was built for an ATmega2561 with an 14.745600MHz crystal and 
> uart1
> hosting the AmForth interpreter.
> 
> I adjusted the AmForth make system (on OSX) to build a custom hex file
> for the Arduino Mega2560 which uses ATmega2560 chip and a 16MHz
> crystal. I also put the AmForth interpreter on uart0. The AmForth
> build system is one of its many strengths, though getting it to work
> on OS X does require a few extra steps.
> 
> I used these fuse values for my Arduino Mega2560
> 
>> avrdude: safemode: Fuses OK (E:FF, H:99, L:CE)
> 
> Finally, what hex programmer you use may be important with the Mega2560. I
> used an avrisp2 compatible programmer and had no problems. However, I can
> confirm that my usbtiny programmer couldn't program my Mega2560 successfully.
> 
> Best wishes,
> Tristan
> 
> 
> 
> 
> 
> 
> 
> 
> On 15Feb19 14:20, Jan Kromhout wrote:
>> Tristan,
>> 
>> Found the hex files for the Mega, but don’t found the fuse values.
>> Please can you help me out with these.
>> 
>> Cheers,
>> 
>> Jan
>> 
>> 
>> 
>>> Op 15 feb. 2019, om 13:21 heeft Jan Kromhout  het 
>>> volgende geschreven:
>>> 
>>> Tristan,
>>> 
>>> Thank. Where to find the hex files for the mega, and what fuse settings you 
>>> have used.
>>> I wont to play with it this evening. Verry exciting how it works.
>>> Cheers,
>>> 
>>> Jan
>>> 
>>> Verstuurd vanaf mijn iPad
>>> 
>>>> Op 15 feb. 2019 om 12:45 heeft Tristan Williams  het 
>>>> volgende geschreven:
>>>> 
>>>> Jan,
>>>> 
>>>> There is a link "source" in the text, but below is the url from the
>>>> link. 
>>>> 
>>>> https://www.mostlymostly.uk/files/source/uart1.forth
>>>> 
>>>> Tristan
>>>> 
>>>> 
>>>>> On 15Feb19 11:15, Jan Kromhout via Amforth-devel wrote:
>>>>> Hi Tristan,
>>>>> 
>>>>> How can I acces the source, the link shows only an overview!
>>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Jan
>>>>> 
>>>>> Verstuurd vanaf mijn iPad
>>>>> 
>>>>>> Op 15 feb. 2019 om 09:21 heeft Tristan Williams  het 
>>>>>> volgende geschreven:
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> I've linked (below) some AmForth words I've written to help me use the
>>>>>> second hardware serial port on an AVR atmega mcu, should there be one.
>>>>>> 
>>>>>> https://www.mostlymostly.uk/post/2019.02.01/
>>>>>> 
>>>>>> 
>>>>>> Tristan
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ___
>>>>>> Amforth-devel mailing list for http://amforth.sf.net/
>>>>>> Amforth-devel@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>>>>> 
>>>>> 
>>>>> 
>>>>> ___
>>>>> Amforth-devel mailing list for http://amforth.sf.net/
>>>>> Amforth-devel@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>>>>> 
>>>> 
>>>> 
>>>> ___
>>>> Amforth-devel mailing list for http://amforth.sf.net/
>>>> Amforth-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>>> 
>>> 
>>> ___
>>> Amforth-devel mailing list for http://amforth.sf.net/
>>> Amforth-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Soft Serial Port

2019-02-15 Thread Jan Kromhout via Amforth-devel
Hi Tristan,

How can I acces the source, the link shows only an overview!

Cheers,

Jan

Verstuurd vanaf mijn iPad

> Op 15 feb. 2019 om 09:21 heeft Tristan Williams  het 
> volgende geschreven:
> 
> 
> 
> I've linked (below) some AmForth words I've written to help me use the
> second hardware serial port on an AVR atmega mcu, should there be one.
> 
> https://www.mostlymostly.uk/post/2019.02.01/
> 
> 
> Tristan
> 
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Soft Serial Port

2019-01-24 Thread Jan Kromhout via Amforth-devel
Hello,

Is soft-serial implemented in amForth.
I wont to connect a serial device to the arduino.

Cheers,

Jan



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Butterfly

2019-01-20 Thread Jan Kromhout via Amforth-devel
Hi Martin,

Thanks for the link, found the hex files.
Do you know where the find the the fuse settings?
Can I use the “amforth-shell.py” for programming the Butterfly? 

Mit freundlichem Gruß
Jan


> Op 20 jan. 2019, om 08:40 heeft Martin Bitter  het 
> volgende geschreven:
> 
> Hi Jan,
> 
> in amforth 6.3 there is a folder .../appl/avr-butterfly/
> 
> Regards
> 
> Martin
> 
> 
> 
> Am Samstag, 19. Januar 2019, 19:00:25 CET schrieb Jan Kromhout:
>> Hello,
>> 
>> Is there an amForth hex file for the Butterfly available?
>> 
>> Cheers,
>> 
>> Jan
>> 
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> -- 
> Getippt im 9-Fingersystem von mir selbst.
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] String

2019-01-18 Thread Jan Kromhout via Amforth-devel
Hi Matthias,

I have read that but it is not working.

 : test s" test " type ;  => no output
 : test s" test “ ;  => no output 

I don’t know what is wrong!

Jan


> Op 18 jan. 2019, om 15:50 heeft Matthias Trute  het volgende 
> geschreven:
> 
> Hi Jan,
> 
>> I try this and notting is happens. How do I use this to print a
>> string when I run a compiled word?
> 
> please have a look at
> 
> http://amforth.sourceforge.net/TG/recipes/Simple-Strings.html
> 
> it should answer your question(s)
> 
> Matthias
> 
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] String

2019-01-18 Thread Jan Kromhout via Amforth-devel
Hello,


I try this and notting is happens. How do I use this to print a string when I 
run a compiled word?


  : test s" test " type ; 


Cheers,

Jan
 


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Need some help to construct an .asm file

2018-12-25 Thread Jan Kromhout via Amforth-devel
Thanks for the rsponse.

Merry Christmad,

Jan

Verstuurd vanaf mijn iPad

> Op 25 dec. 2018 om 10:36 heeft Matthias Trute  het volgende 
> geschreven:
> 
> Am Montag, den 24.12.2018, 17:51 + schrieb Jan Kromhout:
>> Hello,
>> 
>> I wont to write my own routine in assembler as a learning goal.
>> Have looked into a lot of asm routines, but can’t figure out how to
>> add two doubles into R16 to R23
>> and after the calculation put R16 to R19 back to the stack.
>> 
>> Can I use R16 to R19 freely for my own use, or should I take another
>> set.
>> 
>> The calculation between is no problem.
>> 
>> Please can someone help me out with this,
>> and any help is appriciated!
> 
> The registers that are free to use in own assembly words
> are documented here:
> http://amforth.sourceforge.net/TG/AVR8.html#register-mapping
> 
> The mapping between the temp-Names and the actual registers
> can be found at avr8/macros.asm.
> 
> If you want to go deep into the assembler programming, esp.
> within amforth, I'd strongly recommend, that you study the
> code very carefully. It contains optimizations and macros
> that are not trivially to understand. Adding two double 
> numbers (that is 2x4 avr registers) is more on the
> trivial side however. look at words/d-plus.asm.
> 
> Matthias
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Assembler listing of some words

2018-12-21 Thread Jan Kromhout via Amforth-devel
Hello Erich,

This was helpfull

Cheers,

Jan





> Op 21 dec. 2018, om 17:15 heeft Erich Wälde  het 
> volgende geschreven:
> 
> Hello Jan,
> 
> Jan Kromhout via Amforth-devel writes:
> 
>> Hello,
>> 
>> I was looking into some words (.asm).
>> Can someone explain me why the content of the first data word is different.
>> PLUSSTORE => .dw $ff02
>> RSHIFT => .dw $ff06
>> PLUS => .dw $ff01
> 
> I'm sure this is explained somewhere, maybe in the technical guide. But
> I did not find it in 20 seconds, so here we go:
> 
> 
>> $ cat ./avr8/words/plusstore.asm
>> VE_PLUSSTORE:
>>.dw $ff02
>>.db "+!"
>>.dw VE_HEAD
>> ...
> 
> The first .dw entry is "some number", where the low part "02" is the length
> of the string to come. That string is "+!", 2 bytes.
> 
> The high part "ff" is a flags thing. "immediate" words are different:
> 
>> $ cat ./common/words/then.asm
>> ...
>> VE_THEN:
>>.dw $0004
>>.db "then"
>> ...
> 
> There might be other values, but I'm not sure.
> 
> This stuff is implementation dependant and may be all different in other
> Forth implementations.
> 
> 
> 
> Cheers,
> Erich
> 
> --
> May the Forth be with you ...
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Assembler listing of some words

2018-12-21 Thread Jan Kromhout via Amforth-devel
Hello,

I was looking into some words (.asm).
Can someone explain me why the content of the first data word is different.
PLUSSTORE => .dw $ff02
RSHIFT => .dw $ff06
PLUS => .dw $ff01

Cheers,

Jan


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] get-recognizer & set-recognizer

2018-12-21 Thread Jan Kromhout via Amforth-devel
Hello Erich,

Thanks, I’m just binding in the assembler file. That is done for now.
Will give it a try this afternoon.

The last definition is

: place-rec ( xt -- )
  get-recognizer
  dup >r
  1-  n>r
  swap
  nr> drop r> 1+
  set-recognizer
;
But when I take a look in recognizer.frt the words are
"get-recognizers" and "set-recognizers". I think that these are the same as 
mention in “place-rec”.

The reason to use the FP package is to educate and entertaining.
Try to implement the BMP280 in forth, and would do that with FP.
Have trouble to do that in double math. (perhaps later on)

Cheers,

Jan


> Op 21 dec. 2018, om 14:03 heeft Erich Wälde  het 
> volgende geschreven:
> 
> Hello Jan,
> 
> 
>> Found the missing words!!
> Cool.
> 
>> The package is now loading complete.
>> But it is not working.
>> When  input a float or a double the system is crashing.
> not cool.
>> 
>> Has someone some experience with this package?
> Not me. But see below.
> 
> 
>> I have read there is also a FP package in assembler, where could I
>> find that?
> There is another repository with "community contributed" files.
> On the amforth homepage
> http://amforth.sourceforge.net/ 
> 
> Click on "Community" (the first entry in the title area), this will
> point you to
> https://sourceforge.net/p/amforth/community/HEAD/tree/ 
> 
> 
> where you find a subdirectory  "floatingpoint"
> 
> This is old and possibly outdated material, so do not despair.
> 
> 
> ---
> 
> I would like to make you aware, that floating point calculations can
> often be replaced by "scaled integer" operations.
> 
> Examples:
> 
> 1. handle a Temperature in 1/10 or 1/100 degrees
> 
> Say a thermometer sensor is providing readings with 1/10 degree
> resolution. That means, a reading of 245 really means 24.5 C.
> Then there is no need to convert this to floating point, because you can
> create a function to "print" the value with 1 digit behind the decimal
> point.
> 
>>> ver
>> amforth 6.6 ATmega644P ok
>>> : .f1  <# # [char] . hold #s #> type ;
>> ok
>>> 245 s>d .f1
>> 24.5 ok
> 
> (I had to remember that <# ... #> formatting handles double values :-)
> 
> 
> 
> 2. to handle calculations in scaled integer, the programmer decides, how
> many bits of a given value are considered to be the fractional part. For
> a complex example look here:
> https://sourceforge.net/p/amforth/community/HEAD/tree/ewlib/sht75.fs 
> 
> 
> The word sht.H.raw>lin converts the sensor reading from its raw value to
> the "linear" value by applying a correction.
> 
> \ H_25 [%] = c1 + c2*Hraw + c3*Hraw^2
> \ 12bit:c1=-4 c2=0.0405  c3=-2.8e-6
> 
> I have scaled the calculation by 10^7 and thus eliminated the need to
> work with floating point.
> 
> 
> I'm not saying you must always use scaled integer. I'm just saying: if
> you don't know this technique, check it out, and maybe it fits your
> needs.
> 
> See
> Leo Brodie -- Starting Forth:
> http://home.iae.nl/users/mhx/sf.html 
> Chapter 7.
> 
> 
> 
> Cheers,
> Erich
> 
> 
> 
> 
>> 
>> Cheers,
>> 
>> Jan
>> 
>> 
>>> Op 21 dec. 2018, om 10:55 heeft Jan Kromhout  het 
>>> volgende geschreven:
>>> 
>>> Hello,
>>> 
>>> Try to load the Floating point package.
>>> How do, or find I the words get-recognizer and set-recognizer?
>>> 
>>> What is the meaning of the word "place-rec" and what is the input?
>>> 
>>> Thanks for any help.
>>> 
>>> Cheers
>>> 
>>> Jan
>>> 
>>> 
>>> |S|  930|: place-rec ( xt -- )
>>> |S|  931|  get-recognizer
>>> |E= ?? -13 14
>>>  /Users/jankromhout/Documents/amforth-6.7/tools
>>> Error: Error in line sent
>>> 
>>> 
>>> 
>>> : place-rec ( xt -- )
>>> get-recognizer
>>> dup >r
>>> 1-  n>r
>>> swap
>>> nr> drop r> 1+
>>> set-recognizer
>>> ;
>>> 
>>> ___
>>> Amforth-devel mailing list for http://amforth.sf.net/
>>> Amforth-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>> 
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> --
> May the Forth be with you ...
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/ 
> Amforth-devel@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/amforth-devel 
> 

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Floating point

2018-12-19 Thread Jan Kromhout via Amforth-devel
Hello,

Found the float.fth file. 
After loading the neccesary files tried to compile the filed

Two things are missing and can’t find them in the AmFort-6.7 directory.
1. What is the definition of d>s
2: Could not found these asm files.
; needed for recognizer
.include "words/get-recognizer.asm"
.include "words/set-recognizer.asm"

 Please can someone help me out with this?

Cheers,

Jan

> Op 18 dec. 2018, om 20:40 heeft Jan Kromhout via Amforth-devel 
>  het volgende geschreven:
> 
> Hello,
> 
> I would like to play with the floating point package. 
> Has anyone integrated the floting point in AmForth.
> Can not assemble a version for myself. Can someone please help me with
> a version for the Arduino (hex file).
> I’am running now version 6.7
> 
> Cheers,
> 
> Jan
> 
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Floating point

2018-12-18 Thread Jan Kromhout via Amforth-devel
Hello,

I would like to play with the floating point package. 
Has anyone integrated the floting point in AmForth.
 Can not assemble a version for myself. Can someone please help me with
a version for the Arduino (hex file).
I’am running now version 6.7

Cheers,

Jan




___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] buffer:

2018-12-06 Thread Jan Kromhout via Amforth-devel
Martin,

Thanks.
When I construct this and make a buffer of 1024 and after the buffer I create a 
dummy so I can calculate the difference.
‘ dummy - ‘ buffer = 1029. Thats means there is a space of 1024 bytes or words 
available.

How can I store/read a byte or word to the location?

This I have tried,

(ATmega328P)> $ff festspeicher 100 + c!
Timed out waiting for ok response


Groeten 

Jan





> Op 6 dec. 2018, om 20:56 heeft Martin Bitter  het 
> volgende geschreven:
> 
> 1024 fl.buffer: festspeicher


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] buffer:

2018-12-06 Thread Jan Kromhout via Amforth-devel
Dank je wel Martin,

Some questions.

How to do this when I wont to place it in FLASH.

How to write and acces RAM?

How to write and acces in FLASH?

Met vriendelijke groet,

Jan

> Op 6 dec. 2018, om 20:20 heeft Martin Bitter  het 
> volgende geschreven:
> 
> Am Donnerstag, 6. Dezember 2018, 20:06:45 CET schrieb Jan Kromhout via 
> Amforth-devel:
> 
> Maybe this helps: 
> 
> Variable buffer 1024 allot 
> 
> This gives a buffer in RAM 
> 
> Or do you need it in FLASH?
> 
> tot ziens
> 
> Martin
> 
> 
> 
>> Thanks Martin,
>> 
>> What I wont is a buffer of 1024 bytes.
>> 
>> Is that posible in amForth?
>> 
>> Cheers,
>> 
>> Jan
>> 
>>> Op 6 dec. 2018, om 20:03 heeft Martin Bitter  online.de>
>>> het volgende geschreven:
>>> 
>>> Daag Jan,
>>> 
>>> see below ...
>>> 
>>> Hope it helps!
>>> 
>>> Regards Martin
>>> 
>>> BTW You'r marching through 1009 * 16  words in memory - is that what 
> you
>>> want?
>>> 
>>> Am Donnerstag, 6. Dezember 2018, 19:46:33 CET schrieb Jan 
> Kromhout via
>>> 
>>> Amforth-devel:
>>>> Hello,
>>>> 
>>>> I have make a buffer, after loading the program I aspect that all
>>> 
>>> locations
>>> 
>>>> will be zero. When take a look there are some places with values!
>>>> 
>>>>  /Users/jankromhout/Documents/amforth-6.7/tools
>>>> (ATmega328P)> clearBuffer
>>>> ok
>>>> (ATmega328P)> .Buffer
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 12288 56 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>>>> 
>>>> After clearing the locations there will be values on some locations.
>>>> 
>>>> What do I wrong?
>>>> 
>>>> Cheers,
>>>> 
>>>> Jan
>>>> 
>>>> 
>>>> 
>>>> marker --SSD1306--
>>>> 
>>>> 
>>>> \ size of display for memory buffer
>>>> 128 constant SSD1306_LCDWIDTH
>>>> 64  constant SSD1306_LCDHEIGHT
>>>> 
>>>> SSD1306_LCDHEIGHT SSD1306_LCDWIDTH * 8 / constant BUFFERSIZE
>>>> 
>>>> BUFFERSIZE 2 * buffer: buffer
>>>> 
>>>> : buffer!
>>>> 
>>>> buffer + !
>>>> ;
>>>> 
>>>> : buffer@
>>>> 
>>>> buffer + @
>>>> ;
>>>> 
>>>> \ display buffer inhoud
>>>> 
>>>> : .Buffer
>>>> 
>>>> [ 1024 15 - ] literal 0 do
>>> 
>>> [ buffersize 2 * 16 / ] literal 0 do
>>> 
>>>> 16 0 do
>>>> j i + buffer@ .
>>> 
>>> J 16 * i + buffer@
>>> 
>>>> loop
>>>> cr
>>>> 16 +loop
>>>> ;
>>>> 
>>>> : clearBuffer
>>>> 
>>>> 1024 0 do
>>>> 
>>>>   0 i buffer!
>>>> 
>>>> loop
>>>> 
>>>> ;
>>>> ___
>>>> Amforth-devel mailing list for http://amforth.sf.net/
>>>> <http://amforth.sf.net/> Amforth-devel@lists.sourceforge.net
>>>> <mailto:Amforth-devel@lists.sourceforge.net>
>>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>>>> <https://lists.sourceforge.net/lists/listinfo/amforth-devel>
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> -- 
> Getippt im 9-Fingersystem von mir selbst.
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] buffer:

2018-12-06 Thread Jan Kromhout via Amforth-devel
Thanks Martin,

What I wont is a buffer of 1024 bytes.

Is that posible in amForth?

Cheers,

Jan



> Op 6 dec. 2018, om 20:03 heeft Martin Bitter  het 
> volgende geschreven:
> 
> Daag Jan,
> 
> see below ...
> 
> Hope it helps!
> 
> Regards Martin
> 
> BTW You'r marching through 1009 * 16  words in memory - is that what you 
> want?
> 
> Am Donnerstag, 6. Dezember 2018, 19:46:33 CET schrieb Jan Kromhout via 
> Amforth-devel:
>> Hello,
>> 
>> I have make a buffer, after loading the program I aspect that all 
> locations
>> will be zero. When take a look there are some places with values!
>> 
>>  /Users/jankromhout/Documents/amforth-6.7/tools
>> (ATmega328P)> clearBuffer
>> ok
>> (ATmega328P)> .Buffer
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 12288 56 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
>> 
>> After clearing the locations there will be values on some locations.
>> 
>> What do I wrong?
>> 
>> Cheers,
>> 
>> Jan
>> 
>> 
>> 
>> marker --SSD1306--
>> 
>> 
>> \ size of display for memory buffer
>> 128 constant SSD1306_LCDWIDTH
>> 64  constant SSD1306_LCDHEIGHT
>> 
>> SSD1306_LCDHEIGHT SSD1306_LCDWIDTH * 8 / constant BUFFERSIZE
>> 
>> BUFFERSIZE 2 * buffer: buffer
>> 
>> : buffer!
>> 
>> buffer + !
>> ;
>> 
>> : buffer@
>> 
>> buffer + @
>> ;
>> 
>> \ display buffer inhoud
>> 
>> : .Buffer
>> 
>> [ 1024 15 - ] literal 0 do
> [ buffersize 2 * 16 / ] literal 0 do
>> 16 0 do
>> j i + buffer@ .
> J 16 * i + buffer@ 
> 
>> loop
>> cr
>> 16 +loop
>> ;
>> 
>> : clearBuffer
>> 
>>  1024 0 do
>>0 i buffer!
>>  loop
>> ;
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/ 
>> <http://amforth.sf.net/>
>> Amforth-devel@lists.sourceforge.net 
>> <mailto:Amforth-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel 
>> <https://lists.sourceforge.net/lists/listinfo/amforth-devel>
> 
> 
> -- 
> Getippt im 9-Fingersystem von mir selbst.
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/ <http://amforth.sf.net/>
> Amforth-devel@lists.sourceforge.net 
> <mailto:Amforth-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/amforth-devel 
> <https://lists.sourceforge.net/lists/listinfo/amforth-devel>

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] buffer:

2018-12-06 Thread Jan Kromhout via Amforth-devel
Hello,

I have make a buffer, after loading the program I aspect that all locations 
will be zero.
When take a look there are some places with values!

 /Users/jankromhout/Documents/amforth-6.7/tools
(ATmega328P)> clearBuffer
 ok
(ATmega328P)> .Buffer
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 12288 56 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

After clearing the locations there will be values on some locations.

What do I wrong?

Cheers,

Jan



marker --SSD1306--


\ size of display for memory buffer
128 constant SSD1306_LCDWIDTH
64  constant SSD1306_LCDHEIGHT

SSD1306_LCDHEIGHT SSD1306_LCDWIDTH * 8 / constant BUFFERSIZE

BUFFERSIZE 2 * buffer: buffer

: buffer!
buffer + !
;

: buffer@
buffer + @
;

\ display buffer inhoud
: .Buffer
[ 1024 15 - ] literal 0 do
16 0 do
j i + buffer@ .
loop
cr
16 +loop
;

: clearBuffer
  1024 0 do
0 i buffer!
  loop
;
___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Forward declaration for recursive word

2018-12-05 Thread Jan Kromhout via Amforth-devel
Hello


I wont to use the forward declaration “forward:” to solve my recursive word 
roll.

Is this use of forward: correct?

forward: roll

: roll
  dup 0<  \ 0<=
  if
drop
  else
swap >r 1- roll r> swap
then
;

When I look into the definition of forward: I find the word “iplace”.

When I look for this word in the dictionary I can’t find it.

Do I a search with grep -nr ‘iplace’ amforth-6.7 grep is find only

dup 1- swap @i here iplace here count ( copy to temporary ram)


What is this iplace?

Cheers,

Jan Kromhout




___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] Clock Works

2018-11-10 Thread Jan Kromhout via Amforth-devel
Hello,

Find the source!!

Cheers,

Jan



> Op 10 nov. 2018, om 16:26 heeft Jan Kromhout via Amforth-devel 
>  het volgende geschreven:
> 
> Hello,
> 
> Where can I download the software of the articles of Clock Works.
> The link https://wiki.forth-ev.de/doku.php/projects:clockworks 
> <https://wiki.forth-ev.de/doku.php/projects:clockworks> gives the message.
> 
> 
> 
> Dieses Thema existiert noch nicht
> 
> Cheers,
> 
> Jan
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] I2C Generic

2018-11-10 Thread Jan Kromhout via Amforth-devel
Tristan,

This is my simple code.
The address of the SA1064 is $38

I have checked with the arduino for save playing the frequency of the bus 
should be less than 100 kHz.
When I translate the simple code of the arduino to amForth I get this, but no 
results.
Even no results with deleting the begin and end.
This device is need only one byte per command, so I have used i2c.c!.
Do you ave a clou?

Cheers

Jan



\ Gravitech display, I2C Generic

marker --gravitech--

$38 constant 7SEG  \ I2C address for 7-Segment

PORTC 4 portpin: SDA
PORTC 5 portpin: SCA
SDA pin_output
SCA pin_output

: initI2C
  i2c.init.default
;

\ Configure 7-Segment to 12mA segment output current, Dynamic mode,
\ and Digits 1, 2, 3 AND 4 are NOT blanked

: init7SEG
  \ 7SEG i2c.begin
 0 7SEG i2c.c!
71 7SEG i2c.c!
  \ i2c.end
;

: Send7SEG  ( Number Digit )
  \ 7SEG i2c.begin
7SEG i2c.c!  \ Digit
7SEG i2c.c!  \ Number
  \ i2c.end
;

: test7SEG
  \ i2c.detect
  \ 7SEG i2c.begin
0 7SEG i2c.c!
%01000111 7SEG i2c.c!
  \ i2c.end

  \ 7SEG i2c.begin
1   7SEG i2c.c!  \ Digit
$7d 7SEG i2c.c!  \ Number
  \ i2c.end
;


> Op 10 nov. 2018, om 17:15 heeft Tristan Williams  het 
> volgende geschreven:
> 
> Jan,
> 
> Have a look at the source your-amforth/common/lib/hardware/i2c.frt
> and the comments at the top of the file.
> 
> i2c.c! i2c.c@ i2c.n! i2c.n@ i2c.m!n@ already have the i2c.begin and
> i2c.end within the respective word. I don't know the Gravitech shield
> but if you are sending multiple bytes i2c.n! might be useful.   
> 
> Best wishes,
> Tristan
> 
> On 09Nov18 19:21, Jan Kromhout wrote:
>> Hi,
>> 
>> This is my first step on the I2C road.
>> I have a Gravitech shield for the Arduino, that work well.
>> The code is very simple, and I have translate it to Forth.
>> The display is not working.
>> I include the Forth code. What is wrong?
>> Thangs for any help.
>> 
>> Cheers,
>> 
>> Jan
>> 
>> \ Gravitech display, I2C Generic
>> 
>> marker --gravitech--
>> 
>> $38 constant 7SEG  \ I2C address for 7-Segment
>> 
>> / Configure 7-Segment to 12mA segment output current, Dynamic mode,
>> / and Digits 1, 2, 3 AND 4 are NOT blanked
>> 
>> : init7SEG
>>  7SEG i2c.begin
>>0 7SEG i2c.c!
>>%01000111 7SEG i2c.c!
>>  i2c.end
>> ;
>> 
>> : Send7SEG  ( Digit Number )
>>  7SEG i2c.begin
>>swap 7SEG i2c.c! \ Digit
>>7SEG i2c.c!  \ Number
>>  i2c.end
>> ;
>> 
>> 
>> /* Configure 7-Segment to 12mA segment output current, Dynamic mode,
>> and Digits 1, 2, 3 AND 4 are NOT blanked */
>> 
>>  Wire.beginTransmission(_7SEG);
>>  Wire.write(0);
>>  Wire.write(B01000111);
>>  Wire.endTransmission();
>> 
>> 
>> /***
>> Function Name: Send7SEG
>> 
>> Purpose:
>>   Send I2C commands to drive 7-segment display.
>> /
>> 
>> void Send7SEG (byte Digit, byte Number)
>> {
>>  Wire.beginTransmission(_7SEG);
>>  Wire.write(Digit);
>>  Wire.write(Number);
>>  Wire.endTransmission();
>> }
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] I2C Generic

2018-11-09 Thread Jan Kromhout via Amforth-devel
Thanks Erich,

Do I need this to start every time I use I2C  

i2c.init.default

Cheers,

Jan

> Op 9 nov. 2018, om 20:56 heeft Erich Wälde  het volgende 
> geschreven:
> 
> Hello Jan,
> 
> your i2c address: "$38", is this the 7bit address? You might
> need to shift it by one position to "$70".
> 
> Just an idea.
> Cheers,
> Erich
> 
> Jan Kromhout writes:
> 
>> Hi,
>> 
>> This is my first step on the I2C road.
>> I have a Gravitech shield for the Arduino, that work well.
>> The code is very simple, and I have translate it to Forth.
>> The display is not working.
>> I include the Forth code. What is wrong?
>> Thangs for any help.
>> 
>> Cheers,
>> 
>> Jan
>> 
>> \ Gravitech display, I2C Generic
>> 
>> marker --gravitech--
>> 
>> $38 constant 7SEG  \ I2C address for 7-Segment
>> 
>> / Configure 7-Segment to 12mA segment output current, Dynamic mode,
>> / and Digits 1, 2, 3 AND 4 are NOT blanked
>> 
>> : init7SEG
>>  7SEG i2c.begin
>>0 7SEG i2c.c!
>>%01000111 7SEG i2c.c!
>>  i2c.end
>> ;
>> 
>> : Send7SEG  ( Digit Number )
>>  7SEG i2c.begin
>>swap 7SEG i2c.c! \ Digit
>>7SEG i2c.c!  \ Number
>>  i2c.end
>> ;
>> 
>> 
>> /* Configure 7-Segment to 12mA segment output current, Dynamic mode,
>> and Digits 1, 2, 3 AND 4 are NOT blanked */
>> 
>>  Wire.beginTransmission(_7SEG);
>>  Wire.write(0);
>>  Wire.write(B01000111);
>>  Wire.endTransmission();
>> 
>> 
>> /***
>> Function Name: Send7SEG
>> 
>> Purpose:
>>   Send I2C commands to drive 7-segment display.
>> /
>> 
>> void Send7SEG (byte Digit, byte Number)
>> {
>>  Wire.beginTransmission(_7SEG);
>>  Wire.write(Digit);
>>  Wire.write(Number);
>>  Wire.endTransmission();
>> }
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> -- 
> May the Forth be with you ...
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


Re: [Amforth] External Interrupt Mask Register

2018-11-05 Thread Jan Kromhout via Amforth-devel
Tristan,

I have found the datasheet.

Cheers,

Jan

Verstuurd vanaf mijn iPad

> Op 5 nov. 2018 om 11:26 heeft Jan Kromhout  het 
> volgende geschreven:
> 
> Tristan,
> 
> Thanks again for your hulp.
> Please can you provide me the link to download the datasheet your mention. 
> When I look to the 
> datasheets they only have about 25 pages!!.
> 
> Cheers,
> 
> Jan
> 
> 
>> Op 5 nov. 2018, om 09:47 heeft Tristan Williams  het 
>> volgende geschreven:
>> 
>> Jan,
>> 
>>> The address is $1d. When I look to the documentation te bits 0 and 1
>>> are R/W and the other bits are only Read (With a initial value of 0)
>>> When I do the command $1d c@ . I get a value of 0001000. How is that
>>> possible? Or do I something wrong?
>> 
>> The answer to this lies in the memory map of the AVR.  If you look at
>> page 72 in the datasheet you will see the address for EIMSK given as
>> 
>> 0x1D (0x3D)
>> 
>> Yes, two addresses.
>> 
>> To see the contents of EIMSK in AmForth using c@ you need
>> 
>> $3d c@
>> 
>> For the why see page 19 of the datasheet combined with a
>> Google of "avr memory map offset $20" 
>> 
>> The file amforth-root/avr8/devices/atmega328p/atmega328p.frt contains 
>> 
>> &61 constant EIMSK\ External Interrupt Mask Register
>> 
>> (where &61 is $3d) along with the other constants and is a very useful
>> file.
>> 
>> Tristan
>> 
>> 
>> 
>> 
>> 
>> 
>> ___
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
> 
> 
> 
> ___
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Question about Timer

2018-11-03 Thread Jan Kromhout via Amforth-devel
I agree with that. I came to the same conclusion. Checked yesterday also the 
code and found no action on this address.
Tristian gave me a hint, and I will try it.

Cheers,

Jan

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Question about Timer-1

2018-11-02 Thread Jan Kromhout via Amforth-devel
Hi,

I have take a look into the excellent work of Erich Walde “Clock Works”.
When I walk trough the code I see that Timer1 is used freely.

Is it correct that I can use this timer with his interrupts freely without any 
harm/restrictions for Amforth?

Cheers,

Jan



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Thanks

2018-10-31 Thread Jan Kromhout via Amforth-devel
Hi,

Thanks all, information was very helpful.

Cheers,

Jan


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Coolterm as terminal

2018-10-26 Thread Jan Kromhout via Amforth-devel
Tristan,

I’m using an original Arduino-Uno

The next thing is to figure out how to include some of the .frt files. Docu is 
hard to understand.

It is working now with
MacBook-Pro-van-Jan-6:tools jankromhout$ ./amforth-shell.py -p 
/dev/tty.usbmodem1421 -s 38400 -i —rtscts

I greatly appreciated your help

Cheers

Jan



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Coolterm as terminal

2018-10-25 Thread Jan Kromhout via Amforth-devel
Tristan,

Thanks for the help this day. It is “working” but wen I type in a command a get 
an error back from
amForth. See my output.
Anny idee what is going wrong?

Cheers

Jan

Last login: Thu Oct 25 18:54:18 on ttys000
MacBook-Pro-van-Jan-6:~ jankromhout$ cd 
/Users/jankromhout/Documents/amforth-6.7/tools 
MacBook-Pro-van-Jan-6:tools jankromhout$ ./amforth-shell.py -p 
/dev/tty.usbmodem1411 -s 38400 -i
|I=appl_defs: 0 loaded
|I=Entering amforth interactive interpreter
|I=getting MCU name..
|I=successfully loaded register definitions for atmega328p
|I=getting filenames on the host
|I=  Reading /Users/jankromhout/Documents/amforth-6.7/avr8/devices/atmega328p
|I=  Reading /Users/jankromhout/Documents/amforth-6.7/avr8/lib
|I=  Reading .
|I=getting filenames from the controller
(ATmega328P)> 
(ATmega328P)> 10
 ?? -13 8 
(ATmega328P)> 10 20 + .
 ?? -13 6 
(ATmega328P)> 


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Coolterm as terminal

2018-10-25 Thread Jan Kromhout via Amforth-devel
Thanks Tristan,

When I run it get the error “no module named serial”
Check my versions of Python and when I type "import serial” there is no 
problem. So I don’t know how to fix this!

Cheers,

Jan



___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Coolterm as terminal

2018-10-24 Thread Jan Kromhout via Amforth-devel
Tristan,

I have tried to get it working without any result, I use macOS High Sierra.
Do you have tips to get it running?
Do you use Python 2 or 3

Cheers,

Jan


___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Coolterm as terminal

2018-10-24 Thread Jan Kromhout via Amforth-devel
Hello,

I use Coolterm as terminal. Is it posible to use “include" to load several 
screens with one command?

This as example like this

#include install/2-fetch.frt
#include install/2-store.frt
#include install/quotations.frt
#include install/search-name.frt
#include install/find-name.frt
#include install/defined.frt
#include install/dot-s.frt
#include install/dumper.frt
#include install/dump.frt
#include install/question.frt
#include install/builds.frt
#include install/bitnames.frt

Cheers,

Jan





___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] How to make a Full system

2018-10-24 Thread Jan Kromhout via Amforth-devel
Hi,

I try to compile a full system, but most of the time I don’t know the sequens 
of loading the
individual files. Is there some overview how to load these files (sequence)?

When the building system is complete is it possible to make a backup of the 
system and 
load this afterwards (make a uno.eep.hex and uno.hex file with AverDude)

Cheers

Jan

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Arduino nano

2018-10-23 Thread Jan Kromhout via Amforth-devel
Hi,

I have an Arduino Nano 328P, can I load it with  the forth of the Arduino Uno?
If posible can I use the same fuse settings as my Arduino Uno?

Cheers,

Jan

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] How to download complete set of data from source forge.net

2018-10-16 Thread Jan Kromhout via Amforth-devel
Hello,

In https://sourceforge.net/p/amforth/code/HEAD/tree/releases/ 
 I found the release 6.7.
How can I complete download this in one to my computer?

Thanks for any help.

Jan Kromhout
Hellevoetsluis-NL
___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] A good editor/terminal for MacOSX

2018-10-15 Thread Jan Kromhout via Amforth-devel
Hello,

What is a good editor/terminal to type in Forth, and also send the Forth files 
to the Arduino?

Thanks for any help.

Jan Kromhout
Hellevoetsluis-NL

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel


[Amforth] Question

2018-10-15 Thread Jan Kromhout via Amforth-devel
Hello,

It’s a while ago that I implemented AmForth (4.8) on a Arduino.

Now I am a little confused. Where to find the source with all libs like 
postpone.frt.
Cannot find them.



Please can you help me out?

With kindly regards,

Jan Kromhout
Hellevoetsluis-NL

___
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel