Serial Wombat Arduino Library

Loading...
Searching...
No Matches
Public Member Functions | List of all members
SerialWombat18ABOscillatorTuner Class Reference

A class which tunes the oscillator on a Serial Wombat 18AB chip. More...

`#include <SerialWombat.h>`

## Public Member Functions
| SerialWombat18ABOscillatorTuner (SerialWombatChip &serialWombatChip)
| Class constructor for SerialWombat18OscillatorTuner.
void | update ()
| Call periodically to tune the SW18AB oscillator to reported millis.

## Detailed Description

A class which tunes the oscillator on a Serial Wombat 18AB chip.

This class is designed to be called periodically in the program main loop. It compares the 1mS execution frame count to the millis() funciton provided by the host. When at least 10 seconds of execution have occured the class compares the counts and issues a command to tune the Serial Wombat Chip's oscillator slightly slower or faster. This can reduce the error in the Serial Wombat's 32MHz nominal clock to less than +/- 0.1% vs. the +/- 1.5% limit in the datasheet. Simply call update() periodically and the class will take care of the rest. Allow up to 10 calls at least 10 seconds apart each to reach optimal timing. See the example sketch for an example.

Definition at line 1622 of file SerialWombat.h.

## Constructor & Destructor Documentation

## ◆ SerialWombat18ABOscillatorTuner()

SerialWombat18ABOscillatorTuner::SerialWombat18ABOscillatorTuner | ( | SerialWombatChip & | serialWombatChip | ) |
| inline

Class constructor for SerialWombat18OscillatorTuner.

Parameters

  serialWombatChip | The Serial Wombat chip on which the Oscillator will be tuned;

Definition at line 1633 of file SerialWombat.h.

## Member Function Documentation

## ◆ update()

void SerialWombat18ABOscillatorTuner::update | ( |  | ) |
| inline

Call periodically to tune the SW18AB oscillator to reported millis.

Definition at line 1638 of file SerialWombat.h.