[Flashforth-devel] Microsecond counter problem, please help
Brought to you by:
oh2aun
From: Laszlo K. <Ko...@ce...> - 2021-10-29 15:55:22
|
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 |