108 Serial.println(user_command);
110 switch (user_command)
122 Serial.println(F(
"Invalid command"));
145 Serial.println(F(
"*****************************************************************"));
146 Serial.println(F(
"* DC726A Demonstration Program *"));
147 Serial.println(F(
"* *"));
148 Serial.println(F(
"* This program demonstrates how to send data to the *"));
149 Serial.println(F(
"* programmable oscillator *"));
150 Serial.println(F(
"* *"));
151 Serial.println(F(
"* Set the baud rate to 115200 and select the newline terminator.*"));
152 Serial.println(F(
"* *"));
153 Serial.println(F(
"*****************************************************************"));
160 Serial.println(F(
"1-Set frequency out"));
161 Serial.println(F(
"2-Manually set OCT and DAC code"));
162 Serial.println(F(
"3-Settings"));
164 Serial.print(F(
"Enter a command:"));
175 Serial.print(F(
"Enter the desired clock freq (KHz):"));
179 Serial.println(freq, 4);
196 Serial.print(F(
"Enter the OCT:"));
204 Serial.print(F(
"Enter the DAC code:"));
208 Serial.println(dac_code);
222 Serial.println(F(
"Output Configuration"));
223 Serial.println(F(
"1-CLK On and CLK INV ON"));
224 Serial.println(F(
"2-CLK Off and CLK INV ON"));
225 Serial.println(F(
"3-CLK On and CLK INV Off"));
226 Serial.println(F(
"4-Power Down"));
228 Serial.print(F(
"Enter a command:"));
232 Serial.println(user_command);
234 switch (user_command)
249 Serial.println(F(
"Invalid command"));
#define LTC6904_CLK_ON_CLK_INV_OFF
Clock on, inverted clock off.
#define LTC6904_CLK_ON_CLK_INV_ON
Clock on, inverted clock on.
LTC6904: 1kHz to 68MHz Serial Port Programmable Oscillator.
unsigned char user_command
static uint8_t set_frequency()
Sets the output frequency.
static void print_prompt()
Prints main menu.
Header File for Linduino Libraries and Demo Code.
uint16_t LTC6904_frequency_to_code(float frequency, uint8_t clk)
Calculates the code necessary to create the clock frequency.
static void print_title()
Prints the title block when program first starts.
static void setup()
Initialize Linduino.
static uint8_t output_config
Keeps track of output configuration.
static void settings()
Configures the output.
static uint8_t manually_set_reg()
Manually Sets OCT and DAC Code.
#define LTC6904_ADDRESS
ADR 0.
#define LTC6904_POWER_DOWN
Powers down clocks.
uint8_t LTC6904_write(uint8_t address, uint16_t code)
Writes 2 bytes.
LT_I2C: Routines to communicate with ATmega328P's hardware I2C port.
void quikeval_I2C_init(void)
Initializes Linduino I2C port.
void quikeval_I2C_connect(void)
Switch MUX to connect I2C pins to QuikEval connector.
#define LTC6904_CLK_OFF_CLK_INV_ON
Clock off, inverted clock on.
static void loop()
Repeats Linduino loop.