Overview
- Object ID : 3804 (2024-03-06 07:31:45)
- Author : evanh
- Content : Code
- Microcontroller : Propeller 2
- Language : SPIN2
- Category : Tool
- Licence : MIT
- Tags : clkset, muldiv64
Content
pllset()
Calculates appropriate clock mode component values to set a requested clock frequency via clkset(). Based heavily on Chip's original Delphi code but with added runtime determination of board crystal mode and frequency. Relies on compile time clock config correctly matching the actual board.
muldiv65()
Performs same function as muldiv64() but with rounding to nearest.
div33()
Performs a 32-bit integer divide but with rounding to nearest.