Re: [Amforth] Overwritten timer1

2018-11-02 Thread Tristan Williams
Jan, If you want to see different frequencies using your code I think you will need to reset TCNT1 to the value you want in your overflow isr. : timer1.isr \ toggle output PD7 togglePD7 \ reset TCNT1 your-value TCNT1 ! ; However, using CTC mode would be more accurate and effi

[Amforth] Overwritten timer1

2018-11-02 Thread Jan Kromhout
Thanks Tristian, Yes, I’m looking for something i can use for multplexing 7-segment displays. But still strange I can’t use this timer freely. How could we figger out where this oceurs? But still thanks again for your helpfull remarks. Cheers, Jan Verstuurd vanaf mijn iPad ___

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)

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

2018-11-02 Thread Jan Kromhout
Hi, I have taken the TIMER_1 example, and make some small change. Instead of the timer1.tick I toggle pin-7 of the Arduino. With the values as in the listing I measure a frequency of 15,2 Hz with my scoop. When I change some of the preload value by hand no change is seeing. Frequency is staying

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

[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 __