SI5351 Nano @ 1mhz

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
L10N37
 
Posts: 5
Joined: Tue Feb 14, 2023 6:37 am

SI5351 Nano @ 1mhz

Post by L10N37 »

Just wondering how I can still have the MCU function with the SI5351 clock board when running without external 16MHz oscillator and using internal - MCU should be running at 1mhz.

User avatar
L10N37
 
Posts: 5
Joined: Tue Feb 14, 2023 6:37 am

Re: SI5351 Nano @ 1mhz

Post by L10N37 »

bump.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: SI5351 Nano @ 1mhz

Post by adafruit_support_mike »

Do you want the Si5351 to generate the microcontroller's 1MHz CPU clock, or do you want the microcontroller to use its internal oscillator scaled down to 1MHz, with the Si5351 also running at 1MHz as an external device?

User avatar
L10N37
 
Posts: 5
Joined: Tue Feb 14, 2023 6:37 am

Re: SI5351 Nano @ 1mhz

Post by L10N37 »

Hi there,

Usually i use these SI5351 boards of yours with a 16mhz MCU (generally clone atmega 328P or 168P).

I have a project where I am not using the external 16mhz oscillator for the atmega MCU, it is't required, no point in the extra component / cost.

Only issue is that stops it working with the SI5351 as i believe it affects the i2c, so wondering on what changes i need to make to your code to have the communication between SI5351 and the MCU to still happen.

My app switches frequencies on the fly using a sense pin, but it uses your software to do so. All I had to do was the maths.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: SI5351 Nano @ 1mhz

Post by adafruit_support_mike »

So is the ATmega microcontroller running from its internal RC clock?

User avatar
L10N37
 
Posts: 5
Joined: Tue Feb 14, 2023 6:37 am

Re: SI5351 Nano @ 1mhz

Post by L10N37 »

That's right :) the fuse settings are set accordingly

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: SI5351 Nano @ 1mhz

Post by adafruit_support_mike »

Check your config settings to see if the clock frequency you're using is changing the I2C clock speed. You may need to add some #defines to get the I2C bus back up to 100kHz.

User avatar
L10N37
 
Posts: 5
Joined: Tue Feb 14, 2023 6:37 am

Re: SI5351 Nano @ 1mhz

Post by L10N37 »

I think I have it


#include <Wire.h>

TWBR = ((1 MHz / 100 kHz) - 16) / 2 = 12



This should fix it to 100khz when using 1mhz internal RC (no external clock source provided).

I will test it this weekend.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”