You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
(5) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
|
Feb
(6) |
Mar
(41) |
Apr
(23) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
(9) |
Oct
(2) |
Nov
(1) |
Dec
(1) |
| 2008 |
Jan
(6) |
Feb
(1) |
Mar
(23) |
Apr
(18) |
May
(21) |
Jun
(13) |
Jul
(34) |
Aug
(5) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(4) |
| 2009 |
Jan
|
Feb
(5) |
Mar
(5) |
Apr
(10) |
May
(1) |
Jun
(11) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(13) |
| 2010 |
Jan
(10) |
Feb
(4) |
Mar
(28) |
Apr
(3) |
May
(38) |
Jun
(22) |
Jul
(92) |
Aug
(154) |
Sep
(218) |
Oct
(45) |
Nov
(20) |
Dec
(1) |
| 2011 |
Jan
(33) |
Feb
(15) |
Mar
(32) |
Apr
(33) |
May
(48) |
Jun
(35) |
Jul
(7) |
Aug
|
Sep
(11) |
Oct
(5) |
Nov
|
Dec
(7) |
| 2012 |
Jan
(56) |
Feb
(11) |
Mar
(6) |
Apr
|
May
(128) |
Jun
(59) |
Jul
(21) |
Aug
(16) |
Sep
(24) |
Oct
(39) |
Nov
(12) |
Dec
(12) |
| 2013 |
Jan
(14) |
Feb
(61) |
Mar
(97) |
Apr
(46) |
May
(13) |
Jun
(23) |
Jul
(12) |
Aug
(25) |
Sep
(9) |
Oct
(81) |
Nov
(73) |
Dec
(45) |
| 2014 |
Jan
(36) |
Feb
(57) |
Mar
(20) |
Apr
(41) |
May
(43) |
Jun
(11) |
Jul
(14) |
Aug
(32) |
Sep
(9) |
Oct
(27) |
Nov
(21) |
Dec
(6) |
| 2015 |
Jan
(14) |
Feb
(23) |
Mar
(1) |
Apr
(19) |
May
(40) |
Jun
(11) |
Jul
(1) |
Aug
(2) |
Sep
(14) |
Oct
(10) |
Nov
(9) |
Dec
(13) |
| 2016 |
Jan
(4) |
Feb
(3) |
Mar
(7) |
Apr
|
May
(4) |
Jun
(13) |
Jul
(8) |
Aug
(3) |
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
(1) |
Mar
(1) |
Apr
(7) |
May
(10) |
Jun
(5) |
Jul
(7) |
Aug
(9) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
(3) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(54) |
Nov
(47) |
Dec
(53) |
| 2019 |
Jan
(23) |
Feb
(24) |
Mar
(19) |
Apr
(15) |
May
(5) |
Jun
(34) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(2) |
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
(7) |
Apr
(7) |
May
(5) |
Jun
(15) |
Jul
(22) |
Aug
(28) |
Sep
(13) |
Oct
(9) |
Nov
(17) |
Dec
(13) |
| 2021 |
Jan
(5) |
Feb
(1) |
Mar
(1) |
Apr
(9) |
May
(21) |
Jun
(9) |
Jul
|
Aug
(6) |
Sep
(16) |
Oct
|
Nov
(1) |
Dec
(6) |
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(21) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
| 2024 |
Jan
(1) |
Feb
(4) |
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2025 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(7) |
Sep
(9) |
Oct
|
Nov
(4) |
Dec
|
|
From: Tristan W. <ho...@tj...> - 2019-09-17 06:34:26
|
Hello,
I have been trying to redirect emit from within a task in a forth
multitasking setup. Redirection works perfectly for me in a word run
from the interpreter but when I try to do it from a task I fail to get
it to work. Below is a stripped down example which aims to redirect
emit to drop - so nothing should be output. The result of go! is
either a mcu reset or a hang. Without the redirection line, the task
runs and I can use the interpreter. Any ideas as to where I am going
wrong very gratefully received.
Regards,
Tristan
\ include ms.frt \ with pause
\ include avr-values.frt
\ include multitask.frt
' emit defer@ Evalue emit.amforth
' emit? defer@ Evalue emit?amforth
: +noop ['] drop is emit ['] true is emit? ;
: -noop emit.amforth is emit emit?amforth is emit? ;
$20 $20 0 task: task1
: tx1.ex
task1 tib>tcb activate
begin
+buzz 1000 ms
\ uncomment one of three lines below
\ 1 +noop . -noop \ works in the interpreter
1 +noop . -noop \ resets the mcu in task
\ +noop -noop \ does not reset mcu in task
-buzz 1000 ms
again
;
: go!
buzz.init
task1 task-init
tx1.ex
onlytask
task1 tib>tcb alsotask
multi
;
|
|
From: Tristan W. <ho...@tj...> - 2019-08-26 15:30:30
|
Hello Martin, > Also, a bug in D0>: > Hmmm, something wrong here I feel: > > > (ATmega2560)> decimal 1553994000. d0> . 1572137999. d0> . > > -1 0 ok Yes, you are right. There is something odd with d0> It seems when the sign[1] of the least significant cell and the most significant cell is the same, d0> gives the right answer. When they are different, d0> gives the wrong answer. [1] with sign defined by state of msb amforth 6.8 ATmega328P Forthduino > 0 0 d. 0 ok > 0 0 d0> . cr 0 > 1 0 d. 1 ok > 1 0 d0> . cr -1 > 0 1 d. 65536 ok > 0 1 d0> . cr -1 > 1 1 d. 65537 ok > 1 1 d0> . cr -1 > -1 0 d. 65535 ok > -1 0 d0> . cr 0 > 0 -1 d. -65536 ok > 0 -1 d0> . cr -1 > -1 -1 d. -1 ok > -1 -1 d0> . cr 0 > -1 1 d. 131071 ok > -1 1 d0> . cr 0 > 1 -1 d. -65535 ok > 1 -1 d0> . cr -1 Kind regards, Tristan On 26Aug19 07:46, Martin Nicholas via Amforth-devel wrote: > Not present in 6.8 as far as I can see. > > > 8.6.2.1270 DU< “d-u-less” DOUBLE EXT > > ( ud1 ud2 -- flag ) > > flag is true if and only if ud1 is less than ud2. > > Also, a bug in D0>: > Hmmm, something wrong here I feel: > > > (ATmega2560)> decimal 1553994000. d0> . 1572137999. d0> . > > -1 0 ok > > Cheers! > > -- > Regards, > > Martin Nicholas. > > E-mail: rep...@mg... (Address will be valid throughout 2019). > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: Martin N. <amf...@mg...> - 2019-08-26 07:03:11
|
Not present in 6.8 as far as I can see. > 8.6.2.1270 DU< “d-u-less” DOUBLE EXT > ( ud1 ud2 -- flag ) > flag is true if and only if ud1 is less than ud2. Also, a bug in D0>: Hmmm, something wrong here I feel: > (ATmega2560)> decimal 1553994000. d0> . 1572137999. d0> . > -1 0 ok Cheers! -- Regards, Martin Nicholas. E-mail: rep...@mg... (Address will be valid throughout 2019). |
|
From: Tristan W. <ho...@tj...> - 2019-08-16 16:32:49
|
Hello Erich, Project was probably too grand a word! I have made a few notes below, though they are not of cookbook standard. https://www.mostlymostly.uk/post/2019.08.09/ kind regards, Tristan On 14Aug19 08:39, Erich Wälde wrote: > Hello Tristan, > > > Thanks again for your help. > You are welcome! > > > I managed to modify applturnkey to read from internal EEPROM, > > which was the missing part of my project to have AmForth use > > the RC oscillator as a clock source. > Glad I could help. It is often only a tiny piece of information, > which opens the door. > > Happy hacking! > Please consider to share more details of your project, > we are all eager to learn from others, aren't we? > > Cheers, > Erich > > > -- > May the Forth be with you ... > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
|
From: Erich W. <ew....@na...> - 2019-08-14 07:02:41
|
Hello Tristan, > Thanks again for your help. You are welcome! > I managed to modify applturnkey to read from internal EEPROM, > which was the missing part of my project to have AmForth use > the RC oscillator as a clock source. Glad I could help. It is often only a tiny piece of information, which opens the door. Happy hacking! Please consider to share more details of your project, we are all eager to learn from others, aren't we? Cheers, Erich -- May the Forth be with you ... |
|
From: Tristan W. <ho...@tj...> - 2019-08-13 20:53:34
|
Hello Erich, Thanks again for your help. I managed to modify applturnkey to read from internal EEPROM, which was the missing part of my project to have AmForth use the RC oscillator as a clock source. kind regards, Tristan On 08Aug19 19:47, Erich Wälde wrote: > Hello Tristan, > > > > > > In avr8/amforth-eeprom.inc the top line is > > > > .dw -1 ; EEPROM Address 0 should not be used > > > > Does this mean that $0 is reserved and used by AmForth internally or > > $0 is not to be used because historically it has been used by other > > programs e.g. storing calibrated OSCCAL value? If it is the latter, > > then it would be very opportune. > > If my memory serves me well, some toolchains keep track of the > number of erase cycles they did, or something such. I do not > know why Matthias has chosen to not use addr 0. But I do not use > it either. Once I have defined an new label at the end, and > used it somewhere else, I tend to forget, where it was. Because > I never have do deal with this address again. > > So, imho not important. > > Cheers, and good luck! > Erich > > > -- > May the Forth be with you ... > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
|
From: Erich W. <ew....@na...> - 2019-08-08 18:34:07
|
Hello Tristan, > > In avr8/amforth-eeprom.inc the top line is > > .dw -1 ; EEPROM Address 0 should not be used > > Does this mean that $0 is reserved and used by AmForth internally or > $0 is not to be used because historically it has been used by other > programs e.g. storing calibrated OSCCAL value? If it is the latter, > then it would be very opportune. If my memory serves me well, some toolchains keep track of the number of erase cycles they did, or something such. I do not know why Matthias has chosen to not use addr 0. But I do not use it either. Once I have defined an new label at the end, and used it somewhere else, I tend to forget, where it was. Because I never have do deal with this address again. So, imho not important. Cheers, and good luck! Erich -- May the Forth be with you ... |
|
From: Tristan W. <ho...@tj...> - 2019-08-07 15:27:30
|
Hello Erich,
Thank you!
I wish to read/write the value from/to a known fixed EEPROM address
from applturnkey using assembler. Thank you for pointing me towards
avr8/amforth-eeprom.inc
In avr8/amforth-eeprom.inc the top line is
.dw -1 ; EEPROM Address 0 should not be used
Does this mean that $0 is reserved and used by AmForth internally or
$0 is not to be used because historically it has been used by other
programs e.g. storing calibrated OSCCAL value? If it is the latter,
then it would be very opportune.
kind regards and thanks,
Tristan
On 07Aug19 12:09, Erich Wälde wrote:
> Hello Tristan,
>
>
> Tristan Williams writes:
>
> > Hello,
> >
> > I would like to modify my AVR build of AmForth to read/write a byte
> > from a known fixed EEPROM address, perhaps from applturnkey. This byte
> > may be written outside of AmForth. Is there a safe area of EEPROM
> > from which to do this or a way making one? Any pointers as to where to
> > look appreciated.
>
>
> Words like "eallot" "Evalue" "e@" "e!" and the like are
> available, let's see ...
>
> | @e | ./avr8/words/fetch-e.asm
> | !e | ./avr8/words/store-e.asm
> | ehere | ./avr8/words/ehere.asm
> | eallot | ./avr8/lib/eallot.frt
> | Evalue | ./avr8/lib/forth2012/core/avr-values.frt
> | 2@e 2!e 2Evalue | ./avr8/lib/2evalue.frt
> | Eallot Ebuffer | ./avr8/lib/forth2012/core/eeprom-buffer.frt
>
>
> So I think, creating an Evalue could help you. There is some
> more text here
> http://amforth.sourceforge.net/TG/recipes/Values.html
>
> You can then wrap such stuff together with applturnkey
> (example):
>
> > : run-turnkey
> > applturnkey \ call the original turnkey first
> >
> > init \ add one time stuff here
> >
> > starttasker \ start the loop!
> > ;
>
>
>
>
> However, if you want to modify AmForth to be assembled with this
> value already, then avr8/amforth-eeprom.inc is the place to
> start. Add another label and value in this file, verify that
> ehere points to the correct (first empty) location after
> assembling, and be sure to add a word, which will retrieve this
> EEprom content and place it on the stack.
>
> Well, I have done this before ... /me searches the archives ...
>
> in a project-local copy of amforth-eeprom.inc I added 2 lines to
> define a location in eeprom
>
> > EE_UBRRVAL:
> > .dw UBRR_VAL ; BAUDRATE
> > +EE_PROMPT_RDY:
> > + .dw XT_PROMPTREADY_INT
>
> This label (EE_PROMPT_RDY) is used in a word defined in asm:
>
> > cat words/prompt-ready.asm
> > ; make prompt_ready a deferred word
> >
> > VE_PROMPTREADY:
> > .dw $ff04
> > .db "p_rd"
> > .dw VE_HEAD
> > .set VE_HEAD = VE_PROMPTREADY
> > XT_PROMPTREADY:
> > .dw PFA_DODEFER1
> > PFA_PROMPTREADY:
> > .dw EE_PROMPT_RDY ; <---- used here
> > .dw XT_EDEFERFETCH
> > .dw XT_EDEFERSTORE
>
> The content of this location is retrieved (edefer@) and should
> be on top of the stack then (it is consumed again by edefer! in
> this case.) The defined "p_rd" is used in Forth code later:
>
> : +stationid
> ['] prompt_rd to p_rd
> ;
> : init
> +stationid
> ...
> ;
>
> In this particular case I made the ready prompt to be a deferred
> word, because I wanted it to print some information (the
> stationID). Nowadays all prompt functions are deferred and I
> don't need to do this any more. But it should give you an idea
> on how to proceed.
>
> There is one more option: the Evalue can live in an external i2c
> EEPROM, too. See
> http://amforth.sourceforge.net/TG/recipes/I2C-Values.html#i2c-values
>
>
> So many options!
> Hope this helps,
>
> Erich
>
> --
> May the Forth be with you ...
>
>
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amf...@li...
> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>
|
|
From: Erich W. <ew....@na...> - 2019-08-07 11:01:48
|
Hello Tristan, Tristan Williams writes: > Hello, > > I would like to modify my AVR build of AmForth to read/write a byte > from a known fixed EEPROM address, perhaps from applturnkey. This byte > may be written outside of AmForth. Is there a safe area of EEPROM > from which to do this or a way making one? Any pointers as to where to > look appreciated. Words like "eallot" "Evalue" "e@" "e!" and the like are available, let's see ... | @e | ./avr8/words/fetch-e.asm | !e | ./avr8/words/store-e.asm | ehere | ./avr8/words/ehere.asm | eallot | ./avr8/lib/eallot.frt | Evalue | ./avr8/lib/forth2012/core/avr-values.frt | 2@e 2!e 2Evalue | ./avr8/lib/2evalue.frt | Eallot Ebuffer | ./avr8/lib/forth2012/core/eeprom-buffer.frt So I think, creating an Evalue could help you. There is some more text here http://amforth.sourceforge.net/TG/recipes/Values.html You can then wrap such stuff together with applturnkey (example): > : run-turnkey > applturnkey \ call the original turnkey first > > init \ add one time stuff here > > starttasker \ start the loop! > ; However, if you want to modify AmForth to be assembled with this value already, then avr8/amforth-eeprom.inc is the place to start. Add another label and value in this file, verify that ehere points to the correct (first empty) location after assembling, and be sure to add a word, which will retrieve this EEprom content and place it on the stack. Well, I have done this before ... /me searches the archives ... in a project-local copy of amforth-eeprom.inc I added 2 lines to define a location in eeprom > EE_UBRRVAL: > .dw UBRR_VAL ; BAUDRATE > +EE_PROMPT_RDY: > + .dw XT_PROMPTREADY_INT This label (EE_PROMPT_RDY) is used in a word defined in asm: > cat words/prompt-ready.asm > ; make prompt_ready a deferred word > > VE_PROMPTREADY: > .dw $ff04 > .db "p_rd" > .dw VE_HEAD > .set VE_HEAD = VE_PROMPTREADY > XT_PROMPTREADY: > .dw PFA_DODEFER1 > PFA_PROMPTREADY: > .dw EE_PROMPT_RDY ; <---- used here > .dw XT_EDEFERFETCH > .dw XT_EDEFERSTORE The content of this location is retrieved (edefer@) and should be on top of the stack then (it is consumed again by edefer! in this case.) The defined "p_rd" is used in Forth code later: : +stationid ['] prompt_rd to p_rd ; : init +stationid ... ; In this particular case I made the ready prompt to be a deferred word, because I wanted it to print some information (the stationID). Nowadays all prompt functions are deferred and I don't need to do this any more. But it should give you an idea on how to proceed. There is one more option: the Evalue can live in an external i2c EEPROM, too. See http://amforth.sourceforge.net/TG/recipes/I2C-Values.html#i2c-values So many options! Hope this helps, Erich -- May the Forth be with you ... |
|
From: Tristan W. <ho...@tj...> - 2019-08-07 08:19:21
|
Hello, I would like to modify my AVR build of AmForth to read/write a byte from a known fixed EEPROM address, perhaps from applturnkey. This byte may be written outside of AmForth. Is there a safe area of EEPROM from which to do this or a way making one? Any pointers as to where to look appreciated. Kind regards, Tristan |
|
From: devin d. <lyo...@gm...> - 2019-07-18 22:54:50
|
I am using the avrdude packaged with winavr. After running the command provided by peter, i was able to get it programmed and greeted with the forth prompt via putty. Thank you for your assistance. Hopefully now i can get started with it and make something interesting. On Wed, Jul 17, 2019 at 12:20 PM Peter Mortensen < spa...@pm...> wrote: > > >>> On 10 Jul 2019, at 21:12, devin davison <lyo...@gm...> wrote: > >>> > >>> I am interested in trying out AmForth on an Arduino Uno. > >>> > >>> I have many of them, from what I understand I can use > >>> one Arduino Uno as the ISP programmer to program others. > >>> I have not found a guide on how to get AmForth onto the > >>> Arduino. Can anyone provide some advice or a link to > >>> some relevant information to get me on track? > >> ... > > > > On 17/07/2019 06:46, devin davison wrote: > > > > Thanks for the info. I am on a Windows machine, using avrdude. I am > trying > > to use the following command, taken from the link provided by Peter C. > > (I replaced the COM port with my COM port, COM8) > > > > *avrdude -p m328p -c avrispmkII -P com8 -U efuse:w:0xFF:m -U > hfuse:w:0xD9:m -U lfuse:w:0xFF:m -U flash:w:uno.hex:i -U > eeprom:w:uno.eep.hex:i* > > > > It does not appear to be working properly. I just get a timeout message > > repeating indefinitely. I can get the command to work and flash the hex > > file if I leave out the fuse settings, but I'm unable to connect via > a serial > > terminal. > > I have the exact same setup. This worked for > me (for the Arduino ISP programmer on COM3): > > > avrdude -pm328p -P\\.\COM3 -carduino -b19200 -U flash:w:uno.hex -U > eeprom:w:uno.eep.hex -U efuse:w:0xfd:m -U hfuse:w:0xd9:m -U > lfuse:w:0xff:m -v > > > Make sure you are actually using a more recent version of AVRDUDE (the > version that comes with > > more recently versions of the Arduino IDE is OK). Some other installed > software may have placed an > > outdated version of AVRDUDE that is started instead, due to the content > of the "PATH" environment > > variable. I once positively found I had to use at least version 6.1 of > AVRDUDE (both the older ones > > that came with a version of AVR-GCC and with Arduino IDE v. 1.0.5 (v. > 5.11) were too old). > > > Regards, > > Peter Mortensen > > > > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
|
From: Peter M. <spa...@pm...> - 2019-07-17 16:20:09
|
>>> On 10 Jul 2019, at 21:12, devin davison <lyo...@gm...> wrote: >>> >>> I am interested in trying out AmForth on an Arduino Uno. >>> >>> I have many of them, from what I understand I can use >>> one Arduino Uno as the ISP programmer to program others. >>> I have not found a guide on how to get AmForth onto the >>> Arduino. Can anyone provide some advice or a link to >>> some relevant information to get me on track? >> ... > > On 17/07/2019 06:46, devin davison wrote: > > Thanks for the info. I am on a Windows machine, using avrdude. I am trying > to use the following command, taken from the link provided by Peter C. > (I replaced the COM port with my COM port, COM8) > > *avrdude -p m328p -c avrispmkII -P com8 -U efuse:w:0xFF:m -U hfuse:w:0xD9:m -U lfuse:w:0xFF:m -U flash:w:uno.hex:i -U eeprom:w:uno.eep.hex:i* > > It does not appear to be working properly. I just get a timeout message > repeating indefinitely. I can get the command to work and flash the hex > file if I leave out the fuse settings, but I'm unable to connect via a serial > terminal. I have the exact same setup. This worked for me (for the Arduino ISP programmer on COM3): avrdude -pm328p -P\\.\COM3 -carduino -b19200 -U flash:w:uno.hex -U eeprom:w:uno.eep.hex -U efuse:w:0xfd:m -U hfuse:w:0xd9:m -U lfuse:w:0xff:m -v Make sure you are actually using a more recent version of AVRDUDE (the version that comes with more recently versions of the Arduino IDE is OK). Some other installed software may have placed an outdated version of AVRDUDE that is started instead, due to the content of the "PATH" environment variable. I once positively found I had to use at least version 6.1 of AVRDUDE (both the older ones that came with a version of AVR-GCC and with Arduino IDE v. 1.0.5 (v. 5.11) were too old). Regards, Peter Mortensen |
|
From: Peter C. H. <pet...@un...> - 2019-07-17 06:03:10
|
Devin, What programmer are you using? If you are not using the AVRISP mkII or a clone then you will need to change "avrispmkII" in the command string to something else. If you are using a second Arduino as programmer "arduino" will probably work. Peter > On 17 Jul 2019, at 06:46, devin davison <lyo...@gm...> wrote: > > Thanks for the info. I am on a windows machine, using avrdude. I am trying > to use the following command , taken from the link provided by Peter C. > (i replaced the com port with my com port, com8) > > *avrdude -p m328p -c avrispmkII -P com8 -U efuse:w:0xFF:m -U hfuse:w:0xD9:m > -U lfuse:w:0xFF:m -U flash:w:uno.hex:i -U eeprom:w:uno.eep.hex:i* > > It does not appear to be working properly, i just get a timeout message > repeating indefinitely. I can get the command to work and flash the hex > file if i leave out the fuse settings, but im unable to connect via serial > terminal. > Any further help is much appreciated. > > On Wed, Jul 10, 2019 at 4:04 PM Peter C. Hauser <pet...@un...> > wrote: > >> You may also find this useful: >> >> https://www.chemie1.unibas.ch/~hauser/open-source-lab/styled/index.html < >> https://www.chemie1.unibas.ch/~hauser/open-source-lab/styled/index.html> >> >> (scroll to the bottom of the page) >> >> >> Peter >> >> >> >>> On 10 Jul 2019, at 21:12, devin davison <lyo...@gm...> wrote: >>> >>> Hello, New around here. I am interested in trying out Amforth on an >> arduino >>> uno. I have many of them, from what I understand I can use one arduino >> UNO >>> as the ISP programmer to program others. I have not found a guide on how >> to >>> get amforth onto the arduino, can anyone provide some advice or a link to >>> some relevant information to get me on track? >>> >>> Thanks >>> >>> --Devin D. >>> >>> _______________________________________________ >>> Amforth-devel mailing list for http://amforth.sf.net/ >>> Amf...@li... >>> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> >> >> _______________________________________________ >> Amforth-devel mailing list for http://amforth.sf.net/ >> Amf...@li... >> https://lists.sourceforge.net/lists/listinfo/amforth-devel >> > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: devin d. <lyo...@gm...> - 2019-07-17 04:46:54
|
Thanks for the info. I am on a windows machine, using avrdude. I am trying to use the following command , taken from the link provided by Peter C. (i replaced the com port with my com port, com8) *avrdude -p m328p -c avrispmkII -P com8 -U efuse:w:0xFF:m -U hfuse:w:0xD9:m -U lfuse:w:0xFF:m -U flash:w:uno.hex:i -U eeprom:w:uno.eep.hex:i* It does not appear to be working properly, i just get a timeout message repeating indefinitely. I can get the command to work and flash the hex file if i leave out the fuse settings, but im unable to connect via serial terminal. Any further help is much appreciated. On Wed, Jul 10, 2019 at 4:04 PM Peter C. Hauser <pet...@un...> wrote: > You may also find this useful: > > https://www.chemie1.unibas.ch/~hauser/open-source-lab/styled/index.html < > https://www.chemie1.unibas.ch/~hauser/open-source-lab/styled/index.html> > > (scroll to the bottom of the page) > > > Peter > > > > > On 10 Jul 2019, at 21:12, devin davison <lyo...@gm...> wrote: > > > > Hello, New around here. I am interested in trying out Amforth on an > arduino > > uno. I have many of them, from what I understand I can use one arduino > UNO > > as the ISP programmer to program others. I have not found a guide on how > to > > get amforth onto the arduino, can anyone provide some advice or a link to > > some relevant information to get me on track? > > > > Thanks > > > > --Devin D. > > > > _______________________________________________ > > Amforth-devel mailing list for http://amforth.sf.net/ > > Amf...@li... > > https://lists.sourceforge.net/lists/listinfo/amforth-devel > > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > |
|
From: Peter C. H. <pet...@un...> - 2019-07-10 20:03:56
|
You may also find this useful: https://www.chemie1.unibas.ch/~hauser/open-source-lab/styled/index.html <https://www.chemie1.unibas.ch/~hauser/open-source-lab/styled/index.html> (scroll to the bottom of the page) Peter > On 10 Jul 2019, at 21:12, devin davison <lyo...@gm...> wrote: > > Hello, New around here. I am interested in trying out Amforth on an arduino > uno. I have many of them, from what I understand I can use one arduino UNO > as the ISP programmer to program others. I have not found a guide on how to > get amforth onto the arduino, can anyone provide some advice or a link to > some relevant information to get me on track? > > Thanks > > --Devin D. > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: John V. <joh...@gm...> - 2019-07-10 19:32:31
|
Check here for the basics: http://amforth.sourceforge.net/UG/amforth_user.html On Wed, 10 Jul 2019 at 15:13, devin davison <lyo...@gm...> wrote: > Hello, New around here. I am interested in trying out Amforth on an arduino > uno. I have many of them, from what I understand I can use one arduino UNO > as the ISP programmer to program others. I have not found a guide on how to > get amforth onto the arduino, can anyone provide some advice or a link to > some relevant information to get me on track? > > Thanks > > --Devin D. > > _______________________________________________ > Amforth-devel mailing list for http://amforth.sf.net/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel > -- [image: --] John Verne [image: https://]about.me/jverne <https://about.me/jverne?promo=email_sig> |
|
From: devin d. <lyo...@gm...> - 2019-07-10 19:13:02
|
Hello, New around here. I am interested in trying out Amforth on an arduino uno. I have many of them, from what I understand I can use one arduino UNO as the ISP programmer to program others. I have not found a guide on how to get amforth onto the arduino, can anyone provide some advice or a link to some relevant information to get me on track? Thanks --Devin D. |
|
From: Erich W. <ew....@na...> - 2019-07-04 08:09:19
|
Dear Jan,
thanks for your message.
see my answer below the text.
Jan Kromhout via Amforth-devel writes:
> 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 )
> %010000 constant mMISO ( PB4 - pin 12 )
> %100000 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
> ;
>
>
your line
> mSCK ddrb setBitmask \ SCK as output
expands to
> $20 $24 setBitmask
so your question is: what is "setBitmask" supposed to be? At first
sight you might want to set
> : setBitmask ( mask addr -- ) c! ; \ no good!
But that would not work well. Setting exaktly 1 bit in 1 register
would work, but setting the second bit in the same register would
overwrite the first set bit. So what would help? Well we need to
1. read the actual content of the register
2. fiddle with the wanted bit
3. write the new content back to the register
> : setBitmask ( mask addr -- )
> \ mask addr
> dup \ mask addr addr
> c@ \ mask addr content 1.
> rot \ addr content mask
> or \ addr new_content 2.
> swap \ new_content addr
> c! \ 3.
> ;
likewise for
> : clearBitmask ( mask addr -- )
> \ mask addr
> dup \ mask addr addr
> c@ \ mask addr content 1.
> rot \ addr content mask
> invert \ addr content !mask
> and \ addr new_content 2.
> swap \ new_content addr
> c! \ 3.
> ;
UNTESTED CODE!
Now, the pattern "read modify write" and "content mask or" and
"content mask invert and" are needed very often. So this is, what
the bitnames library abstracts away for us.
If you look into "amforth/trunk/avr8/lib/bitnames.frt" you find
> \ Turn a port pin on, dont change the others.
> : high ( pinmask portadr -- )
> dup ( -- pinmask portadr portadr )
> c@ ( -- pinmask portadr value )
> rot ( -- portadr value pinmask )
> or ( -- portadr new-value)
> swap ( -- new-value portadr)
> c!
> ;
>
> \ Turn a port pin off, dont change the others.
> : low ( pinmask portadr -- )
> dup ( -- pinmask portadr portadr )
> c@ ( -- pinmask portadr value )
> rot ( -- portadr value pinmask )
> invert and ( -- portadr new-value)
> swap ( -- new-value port)
> c!
> ;
which look suspiciously similar to what I wrote above. The difference
is that this code is tested!
So
> : setBitmask ( mask addr -- ) high ;
> : clearBitmask ( mask addr -- ) low ;
should work in my opinion.
Now, there is one more thing that "bitnames.frt" can do for you.
Instead of writing
> $24 constant ddrb
> %100000 constant mSCK ( PB5 - pin 13 )
> ...
> mSCK ddrb setBitmask \ SCK as output
you could write instead
> #include bitnames.frt
> $25 constant portb
>
> portb 5 portpin: mSCK
> ...
> mSCK high
Now what happens is this:
This line
> portb 5 portpin: mSCK
defines a new word "mSCK". When you call this word it will
place two items on the stack:
1. the bitmask corresponding to 5, namely %0010_0000
2. the address of the portb register, namely $24 (top of stack)
This is exactly what the functions "high" or "low" expect. They will
do the "read modify write" thing for you and all there is left to
write is this:
> mSCK high
isn't this wonderfully short and easy to read? Well, maybe not
at first sight.
So looking at my own spi start code from way back:
> \ 2010-05-24 EW ewlib/spi.fs
> \ spi, using hw interface
> \ needs in dict_appl.inc: .include "words/spirw.asm"
>
> \ words:
> \ +spi ( -- )
> \ -spi ( -- )
> \ ><spi ( x -- x' ) transfer 2 bytes
>
> \ Needs at least these definitions
> \ SPI
> \ $2D constant SPCR \ SPI Control Register
> \ $2F constant SPDR \ SPI Data Register
> \ $2E constant SPSR \ SPI Status Register
>
> \ needs lib/bitnames.frt \ port_pin: high low pin_{out,in}put
> \ ----------------------------------------------------------
>
> \ SPCR (control register)
> \ . 7 SPIE spi interrupt enable
> \ . 6 SPE spi enable
> \ . 5 DORD data order, 0 msb first
> \ . 4 MSTR master/slave mode, 1 master
> \ . 3 CPOL clock polarity, 0 clock low on idle
> \ . 2 CPHA clock phase, 0 sample on leading edge
> \ . 01 SPIR data rate, 00 f/4, 01 f/16, 10 f/64, 11 f/128
> \ SPE | MSTR | SPIR0 ==> $51
>
> \ needs these defined before loading:
> PORTB 4 portpin: /ss
> \ PORTB 5 portpin: _mosi
> \ PORTB 6 portpin: _miso
> \ PORTB 7 portpin: _clk
>
> : +spi ( -- )
> /ss high \ activate pullup!
> _mosi high _mosi pin_output
> _clk low _clk pin_output
> \ _miso pin_pullup_on \ not needed, see datasheet
> $53 SPCR c! \ enable, master mode, f/128 data rate
> ;
> : -spi 0 SPCR c! ;
>
> \ transfer 1 byte: spirw ( c -- c' )
> \ transfer 1 cell: 2spirw ( n1 -- n2 )
Please note, the bit definitions are for a atmega644 and need to
be adjusted accordingly.
There we go: "high" and "low" do their bit as explained above.
Additionally "pin_output" and "pin_input" will deduce
the address of the DataDirectionRegister from the Port address.
No need to pay any attention.
There are two more noteworthy items in function "+spi"
1. /ss high \ activate pullup
*even if nothing is connected to that pin!*
If you do not activate this, your spi unit remains in slave mode iirc.
2. \ _miso pin_pullup_on \ not needed, see datasheet
if I remember correctly, calling this command breaks spi. But I might
be wrong on this.
If you reread the spi section in the datasheet this information
should now stare right at you. It was there on first read, but
you (and I as well :-) did not understand its implications.
Keep going!
So, hopefully this will get you out of this somewhat dark area.
Cheers,
Erich
<snip>
--
May the Forth be with you ...
|
|
From: Jan K. <jan...@ic...> - 2019-07-03 15:14:13
|
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 ) %010000 constant mMISO ( PB4 - pin 12 ) %100000 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 <mt...@we...> 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 <ms> pulse ( turn portD pin #7 for <ms> 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/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: Tristan W. <ho...@tj...> - 2019-06-18 10:28:24
|
Hello Peter, > This was also to automate as much as... I use amforth-shell.py to automate the process of loading AmForth files onto the mcu. I use OS X, so I don't know if it will work on Windows, but I find it indispensable. http://amforth.sourceforge.net/TG/recipes/Upload.html?highlight=amforth%20shell Kind regards, Tristan |
|
From: Matthias T. <mt...@we...> - 2019-06-17 19:31:24
|
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 <ms> pulse ( turn portD pin #7 for <ms> 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 |
|
From: Erich W. <ew....@na...> - 2019-06-17 19:26:11
|
Hello Jan, > 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 ) > %100000 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. There are only 4 lines of text in amforth/trunk/avr8/lib/bitnames.frt > \ 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 ) There is a functional example on this page http://amforth.sourceforge.net/Projects/ClockWorks/08_timezones.html see "Code Details" and therein "Pins to select timezone" Well, in the end there are only 3 important lines: #include bitnames.frt \ define bits 0 and 1 of PORTA as a bitmask named _tz PORTA $03 bitmask: _tz \ set the pins as "input" _tz pin_input \ read the pins --- they are conncted to pullup resistors \ through switches _tz pin@ the result is either 0 1 2 or 3 in this particular case, depending on which of the two bits read as "1". Hope this helps, Erich -- May the Forth be with you ... |
|
From: Peter C. H. <pet...@un...> - 2019-06-17 18:34:35
|
Jan, For a general idea on masks you might want to consult p. 92 of "Starting Forth". If I remember correctly "bitmask:" will create a bitmask, but not do the bit-setting for you. One has to write to the registers to do that (not sure anymore if it is just "c!" or a special version of store for accessing the registers). Peter > On 17 Jun 2019, at 20:13, Jan Kromhout via Amforth-devel <amf...@li...> wrote: > > 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 ) > %100000 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/ > Amf...@li... > https://lists.sourceforge.net/lists/listinfo/amforth-devel |
|
From: Jan K. <jan...@ic...> - 2019-06-17 18:13:11
|
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 ) %100000 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 |
|
From: Peter M. <spa...@pm...> - 2019-06-15 20:39:49
|
>> Corresponding web page: >> http://amforth.sourceforge.net/TG/recipes/Turnkey.html >> >> >> The error message is the non-descriptive: >> >> ?? -13 23 >> >> 'Evalue' was found in: >> >> \lib\forth2012\core\avr-values.frt >> > On 12/06/2019 01:37, Tristan Williams wrote: > Hello Peter and welcome, > > I have just tried the turnkey example from the docs > > http://amforth.sourceforge.net/TG/recipes/Turnkey.html > > and it works for me. > > Your error message[1] ?? -13 23 after the line > > ' turnkey defer@ Evalue tk.amforth > > suggests that you are missing the word Evalue Yes, it turned out I was on the second flash of AmForth (on a separate chip), with "Evalue" being defined on the first chip... (something went wrong and I had to flash AmForth again). > Have you loaded these files on your mcu? > > avr-values.frt > is.frt > ms.frt > defers.frt > > as the line > > ' turnkey defer@ Evalue tk.amforth > > depends on words defined in these files. I have done that now, and it works now! That was probably the crucial step (though I don't understand why(?)). I could also define "tk.custom" and set it up with " ' tk.custom is turnkey ", putting my main init and infinite control loop in there, all in word "mainApplication". After a power cycle, the control loop ran immediately, as it should. The control loop can be terminated by removing a jumper that pulls a digital input low (pulled up externally with 10 kΩ). The jumper is located on my custom Arduino shield. Also, connecting the Arduino Uno to USB while in the control loop (mainApplication) does not reset the I/O and does not disrupt the operation (unlike normally, where, even if powered from a 9 V battery source, connecting will reset - though I cannot rule out power glitches). When the jumper is removed the normal interactive stuff is available. Everything works as it should!! For this try, I had to flash AmForth a third time (due to another incident, an unfortunate paste error...) and used the opportunity to see if I could repeat it. This was also to automate as much as possible (.BAT script calling AVRDUDE for the flashing, launching PuTTY with the profile for this (38400 baud, etc.), and running several AutoIt scripts for the source pasting). There were a few corrections. The fourth time, with a few more changes for automation (mostly focus changes in Windows), should reduce it to moving the chip from the ISP programmer to the Arduino and a single press of Enter when it has been moved. But this is not needed for this first deployment, only for subsequent versions (if there will ever be more). With direct ICSP, just starting the script should be enough. : tk.custom \ Call the previous turnkey action. tk.amforth execute \ Now something specific e.g. \ I_O-setup mainApplication ; Regards, Peter |