Hello Unregistered ,
Originally Posted by Art ...For the 20MHz example where the constant is 03B7h, it's the reverse of this: FFFFh - 03B7h = C348h (49992 decimal), 49992 + 8 = 50000 (it must take eight instruction cycles to reload the timer) 50000 / 10000 = 5 5 x 4 = 20MHz ... Art. For the next guy that needs to incorporate the Prescaler into Art's formula (like when you want to calculate Preload for faster oscillators): 65535 - (((( MHz / Prescaler ) / 4 ) x 10000 ) - 8 ) Then set T1CON prescaler accordingly.
My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices. Not as dumb as yesterday, but stupider than tomorrow!
Forum Rules
Bookmarks