Re: [Flashforth-devel] Microsecond counter problem, please help
Brought to you by:
oh2aun
From: Laszlo K. <Ko...@ce...> - 2021-11-02 11:37:03
|
Fortunately I do not have 'load' command at all. Thank you! Laci ________________________________ From: Stefan <fli...@gm...> Sent: Saturday, October 30, 2021 7:46 PM To: fla...@li... <fla...@li...> Subject: Re: [Flashforth-devel] Microsecond counter problem, please help Did you check the word 'load'? If it exists, Timer1 is used by the system-load-counter. For other purposes TCNT1 is 'read only' then. You could use 'us' (from the 'avr/forth'-subdirectory) to wait for a specified number of microseconds. If Timer1 is free for use -> see timertest.fs greetz bitflipser Am 30.10.2021 um 04:59 schrieb Mikael Nordman: > You have the wrong interrupt vector number. > > #14 constant TIMER1_OVF_vect > > BR Mikael > > On 2021-10-29 14:05, Laszlo Kollar wrote: >> I am newbie in forth and especially MCUs >> I would like to ask for help. >> I would like to write a driver for DHT-22 humidity/thermo sensor. It >> needs measure microsecond resolution changes in pin state, so I wrote a >> small code in order to count microseconds based on this article: >> https://www.reddit.com/r/arduino/comments/1q1chr/using_timer1_to_count_clock_cycles/ >> >> >> I try to implement it but failed in several various ways. >> once it looks like stuck in a infinity reset, sometimes no prompt after >> running, sometimes flood garbage when use 'words' after running the >> code. >> >> What mistake I made in this code? >> Please help me! >> >> Thanks in advance! >> >> László Kollár >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |