Thank you very much for pointing me to DT Interrupts. Much to learn, useful examples, a lot of help for future work. Unfortunately those procedures work with a fixed frequency. New frequency means recompile, reprogram and power up. Changes in frequency while running do not work. This is pointed in the examples.
Then I tried to split the pulse time (miliseconds, var WORD) in pulse.byte0 + 256 x pulse.byte1. Calculated period in miliseconds and period in microseconds, applied the delay. Still trouble calculating the period, too many clock cycles lost with DIV and DIV32. I gave up.
Master board now sends the period directly. No more period calculated from given frequency, no precision wasted with DIV and DIV32.
Problem solved.
Bookmarks