Re: Si5351 audio pops and PLL Lockups


Ron Carr
 

You have the Si5351 and your LCD both on the I2C bus.  That is a lot of I2C activity.  ( Personally I think the Wire library is brain dead as it uses interrupts but still blocks until all the activity is done. )

The Wire library has a buffer size of 32.  If the buffer is full, the code just drops the data and sets an error.  So you may be dropping some writes to the Si5351 when things get busy.

Here is the code from the wire library where it drops data...

size_t TwoWire::write(uint8_t data)
{
  if(transmitting){
  // in master transmitter mode
    // don't bother if buffer is full
    if(txBufferLength >= BUFFER_LENGTH){
      setWriteError();
      return 0;
    }

To see if this is the issue you could edit the library to increase the buffer size.  The file to change is Wire.h.

On my computer ( I installed to directory Arduino ) the path is:   C:\Arduino\hardware\arduino\avr\Libraries\Wire\src
If you have other versions of Wire in your own libraries, then you will need to find the one the compiler uses.

Ron   K1URC

Join main@4SQRP.groups.io to automatically receive all group messages.