Re: [Amforth] Question about Timer1 - is there a bug?

2018-11-04 Thread Matthias Trute
> My leaving question is the word “f_cpu” in the code of Timer1.frt. > When I execute it I get two values on the stack. It's the current clock the controller is running at. It's a double cell number, since the 16bit controllers run too fast to keep this number in a single cell. Matthias ___

Re: [Amforth] Question about Timer1 - is there a bug?

2018-11-03 Thread Jan Kromhout
Hi, Thanks all for the suggestions. After reload the timer after every interrupt it is working great. My leaving question is the word “f_cpu” in the code of Timer1.frt. When I execute it I get two values on the stack. What is the meaning of this two values? Cheers, Jan Op 3 nov. 2018,

Re: [Amforth] Question about Timer1 - is there a bug?

2018-11-03 Thread Richard Burden
Hi Jan I suggest that the ISR has to toggle the pin and re-load the timer1 counter. >From memory timer1 counts upwards and once it overflows it just keeps counting up from zero unless you re-load it. Regards Richard On 11/3/18, Jan Kromhout wrote: > Hi, > > I have taken the TIMER_1 example, an

Re: [Amforth] Question about Timer1 - is there a bug?

2018-11-03 Thread Matthias Trute
> I think some where in amForth TCNT1 is overwritten! I can assure you, that there is no code in plain amforth that overwrites your settings. It's either your code or the hardware itself. Matthias ___ Amforth-devel mailing list for http://amforth.s

Re: [Amforth] Question about Timer1 - is there a bug?

2018-11-02 Thread Tristan Williams
Jan, > I think some where in amForth TCNT1 is overwritten! Indeed. Every time timer1 overflows. > When I change some of the preload value by hand no change is seeing. > Frequency is staying at 15,2 Hz. Yes. You are seeing a frequency of 1600 divided by 8 (for the prescaler)

Re: [Amforth] Question about Timer-1

2018-11-02 Thread Matthias Trute
> Is it correct that I can use this timer with his interrupts freely > without any harm/restrictions for Amforth? Yes, that's correct. Matthias ___ Amforth-devel mailing list for http://amforth.sf.net/ Amforth-devel@lists.sourceforge.net https://li

Re: [Amforth] Question

2018-10-15 Thread John Verne
There is an SVN link off the amforth sourceforge page. As far as I know, this is where the source for the shipped libraries resides. On Mon, Oct 15, 2018, 08:37 Jan Kromhout via Amforth-devel < amforth-devel@lists.sourceforge.net> wrote: > Hello, > > It’s a while ago that I implemented AmForth (4

Re: [Amforth] Question on word dependencies

2016-03-08 Thread Matthias Trute
Am Samstag, den 05.03.2016, 18:53 -0800 schrieb James Bowman: > Revised version of common/lib/anew.frt is below. > Changes: > - use new word FIND-XT > - fix stack action for word-not-found case > - add dependency on marker.frt for MARKER All applied, thank you James! Modification: #require is a a

Re: [Amforth] Question on word dependencies

2016-03-05 Thread James Bowman
Revised version of common/lib/anew.frt is below. Changes: - use new word FIND-XT - fix stack action for word-not-found case - add dependency on marker.frt for MARKER \ POSSIBLY ( "name" -- ) \ Execute _name_ if it exists; otherwise, do nothing. \ Useful implementation factor of `ANEW`.

Re: [Amforth] Question about sbi,cbi

2012-05-11 Thread Matthias Trute
Am 10.05.2012 14:18, schrieb Jan Kromhout: > Hello, > > I'm looking in some code to look how the analog write is working. > I see commands like sbi(…,…) and chi(…,…) SBI means Set Bit in Io-register. CBI in analogy Clear Bit in Io register. The atmegas use a 5bit address range for some IO regist