PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Loading...
Searching...
No Matches
Si4735-D60 Single Side Band (SSB) support

Single Side Band (SSB) implementation.
First of all, the SSB patch content is not part of this library. The patches used here were made available by Mr. Vadim Afonkin on his Dropbox repository. Please note that the author of this library does not encourage anyone to use the SSB patches content for commercial purposes. In other words, while this library supports SSB patches, the patches themselves are not a part of this library. More...

Functions

uint16_t SI4735::getAntennaTuningCapacitor ()
 Get the Antenna Tuning Capacitor value.
 
void SI4735::setAvcAmMaxGain ()
 Sets the Avc Am Max Gain to maximum gain (0x7800)
 
void SI4735::setAvcAmMinGain ()
 Sets the Avc Am Max Gain to minimal gain (0x1000)
 
void SI4735::setAvcAmDefaultGain ()
 Sets the Avc Am Max Gain to default gain (0x2A80)
 
uint8_t SI4735::getCurrentAvcAmMaxGain ()
 Get the current Avc Am Max Gain.
 
void SI4735::setAmSoftMuteMaxAttenuation (uint8_t smattn=0)
 Sets the Am Soft Mute Max Attenuation.
 
void SI4735::setSsbSoftMuteMaxAttenuation (uint8_t smattn=0)
 Sets the SSB Soft Mute Max Attenuation object.
 
void SI4735::setSsbIfAgcReleaseRate (uint8_t param=140)
 Sets the number of milliseconds the low IF peak detector.
 
void SI4735::setSsbIfAgcAttackRate (uint8_t param=4)
 Sets the IF AGC attack rate.
 
void SI4735::setSsbAgcAttackRate (uint16_t parameter)
 Sets the AGC attack rate on SSB mode.
 
void SI4735::setSsbAgcReleaseRate (uint16_t parameter)
 Sets the AGC Release rate on SSB mode.
 
void SI4735::setSBBSidebandCutoffFilter (uint8_t SBCUTFLT)
 
void SI4735::setSSBBfo (int offset)
 Sets the SSB Beat Frequency Offset (BFO).
 
void SI4735::setSSBConfig (uint8_t AUDIOBW, uint8_t SBCUTFLT, uint8_t AVC_DIVIDER, uint8_t AVCEN, uint8_t SMUTESEL, uint8_t DSP_AFCDIS)
 Sets the SSB receiver mode.
 
void SI4735::setSSBDspAfc (uint8_t DSP_AFCDIS)
 Sets DSP AFC disable or enable.
 
void SI4735::setSSBSoftMute (uint8_t SMUTESEL)
 Sets SSB Soft-mute Based on RSSI or SNR Selection:
 
void SI4735::setSSBAutomaticVolumeControl (uint8_t AVCEN)
 Sets SSB Automatic Volume Control (AVC) for SSB mode.
 
void SI4735::setSSBAvcDivider (uint8_t AVC_DIVIDER)
 Sets AVC Divider.
 
void SI4735::setSSBSidebandCutoffFilter (uint8_t SBCUTFLT)
 Sets SBB Sideband Cutoff Filter for band pass and low pass filters.
 
void SI4735::setSSBAudioBandwidth (uint8_t AUDIOBW)
 SSB Audio Bandwidth for SSB mode.
 
void SI4735::setSSB (uint8_t usblsb)
 Set the radio to AM function.
 
void SI4735::setSSB (uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step, uint8_t usblsb)
 
void SI4735::sendSSBModeProperty ()
 Just send the property SSB_MOD to the device. Internal use (privete method).
 
void SI4735::getSsbAgcStatus ()
 Queries SSB Automatic Gain Control STATUS.
 
void SI4735::setSsbAgcOverrite (uint8_t SSBAGCDIS, uint8_t SSBAGCNDX, uint8_t reserved=0)
 Automatic Gain Control setup.
 
si47x_firmware_query_library SI4735::queryLibraryId ()
 Query the library information of the Si47XX device.
 
void SI4735::patchPowerUp ()
 This method can be used to prepare the device to apply SSBRX patch.
 
void SI4735::ssbPowerUp ()
 This function can be useful for debug and test.
 
bool SI4735::downloadPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size)
 Transfers the content of a patch stored in a array of bytes to the SI4735 device.
 
bool SI4735::downloadCompressedPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, const uint16_t *cmd_0x15, const int16_t cmd_0x15_size)
 Deal with compressed SSB patch.
 
void SI4735::loadPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, uint8_t ssb_audiobw=1)
 Loads a given SSB patch content.
 
void SI4735::loadCompressedPatch (const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, const uint16_t *cmd_0x15, const int16_t cmd_0x15_size, uint8_t ssb_audiobw=1)
 Loads the SSB compressed patch content.
 
si4735_eeprom_patch_header SI4735::downloadPatchFromEeprom (int eeprom_i2c_address)
 Transfers the content of a patch stored in an eeprom to the SI4735 device.
 

Detailed Description

Single Side Band (SSB) implementation.
First of all, the SSB patch content is not part of this library. The patches used here were made available by Mr. Vadim Afonkin on his Dropbox repository. Please note that the author of this library does not encourage anyone to use the SSB patches content for commercial purposes. In other words, while this library supports SSB patches, the patches themselves are not a part of this library.

This implementation was tested only on Si4735-D60 and SI4732-A10 devices.

SSB modulation is a refinement of amplitude modulation that one of the side band and the carrier are suppressed.

What does SSB patch means? In this context, a patch is a piece of software used to change the behavior of the SI4735-D60/SI4732-A10 device. There is little information available about patching the SI4735-D60/SI4732-A10.

The following information is the understanding of the author of this project and is not necessarily correct.

A patch is executed internally (run by internal MCU) of the device. Usually, patches are used to fix bugs or add improvements and new features over what the firmware installed in the internal ROM of the device offers. Patches for the SI4735 are distributed in binary form and are transferred to the internal RAM of the device by the host MCU (in this case, Arduino boards).

Since the RAM is volatile memory, the patch stored into the device gets lost when you turn off the system. Consequently, the content of the patch has to be transferred to the device every time the device is powered up.

I would like to thank Mr Vadim Afonkin for making the SSBRX patches available for SI4735-D60/SI4732-A10 on his Dropbox repository. On this repository you have two files, amrx_6_0_1_ssbrx_patch_full_0x9D29.csg and amrx_6_0_1_ssbrx_patch_init_0xA902.csg. The patch content of the original files is in hexadecimal format, stored in an ASCII text file. If you are not using C/C++ or if you want to load the files directly to the SI4735, you must convert the hexadecimal values to numeric values from 0 to 255. For example: 0x15 = 21 (00010101); 0x16 = 22 (00010110); 0x01 = 1 (00000001); 0xFF = 255 (11111111);

ATTENTION: The author of this project cannot guarantee that procedures shown here will work in your development environment. Proceed at your own risk. This library works with the I²C communication protocol to send an SSB extension PATCH to SI4735-D60 and SI4732-A10 devices. Once again, the author disclaims any and all liability for any damage or effects this procedure may have on your devices. Procced at your own risk.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; pages 3 and 5

Function Documentation

◆ getAntennaTuningCapacitor()

uint16_t SI4735::getAntennaTuningCapacitor ( )
inline

Get the Antenna Tuning Capacitor value.

Returns the current antenna tuning capacitor value. The tuning capacitance is 95 fF x READANTCAP + 7 pF.

ON AM or SSB mode, the MULT attribute stores the high byte of READANTCAP and the attribute READANTCAP by itself stores the low byte.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 74,74, 140 and 141.
Returns
uint8_t capacitance

◆ setAvcAmMaxGain()

void SI4735::setAvcAmMaxGain ( )
inline

Sets the Avc Am Max Gain to maximum gain (0x7800)

◆ setAvcAmMinGain()

void SI4735::setAvcAmMinGain ( )
inline

Sets the Avc Am Max Gain to minimal gain (0x1000)

◆ setAvcAmDefaultGain()

void SI4735::setAvcAmDefaultGain ( )
inline

Sets the Avc Am Max Gain to default gain (0x2A80)

◆ getCurrentAvcAmMaxGain()

uint8_t SI4735::getCurrentAvcAmMaxGain ( )
inline

Get the current Avc Am Max Gain.

Returns
uint8_t Current AVC gain index value

◆ setAmSoftMuteMaxAttenuation()

void SI4735::setAmSoftMuteMaxAttenuation ( uint8_t  smattn = 0)
inline

Sets the Am Soft Mute Max Attenuation.

This function can be useful to disable Soft Mute. The value 0 disable soft mute.

Specified in units of dB. Default maximum attenuation is 8 dB. It works for AM and SSB.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); page 158.
Parameters
smattnMaximum attenuation to apply when in soft mute

◆ setSsbSoftMuteMaxAttenuation()

void SI4735::setSsbSoftMuteMaxAttenuation ( uint8_t  smattn = 0)
inline

Sets the SSB Soft Mute Max Attenuation object.

Sets maximum attenuation during soft mute (dB). Set to 0 to disable soft mute.

Specified in units of dB. Default maximum attenuation is 8 dB.

You can use setAmSoftMuteMaxAttenuation instead. Same AM property values.

Parameters
smattnMaximum attenuation to apply when in soft mute.

◆ setSsbIfAgcReleaseRate()

void SI4735::setSsbIfAgcReleaseRate ( uint8_t  param = 140)
inline

Sets the number of milliseconds the low IF peak detector.

Sets the number of milliseconds the low IF peak detector must not be exceeded before increasing the gain. Default value is 140 (approximately 40 dB / s).

Parameters
paramnumber of milliseconds ( from 4 to 248; step 4); default value 0x008C (140).

◆ setSsbIfAgcAttackRate()

void SI4735::setSsbIfAgcAttackRate ( uint8_t  param = 4)
inline

Sets the IF AGC attack rate.

Large values provide slower attack, and smaller values provide faster attack

Parameters
paramnumber of milliseconds ( from 4 to 248; step 4); default value 4.

◆ setSsbAgcAttackRate()

void SI4735::setSsbAgcAttackRate ( uint16_t  parameter)
inline

Sets the AGC attack rate on SSB mode.

Large values provide slower attack, and smaller values provide faster attack..

See also
setSsbAgcAttackRate
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 29
Parameters
parameterRange: 4–248 (The default is 0x04)

◆ setSsbAgcReleaseRate()

void SI4735::setSsbAgcReleaseRate ( uint16_t  parameter)
inline

Sets the AGC Release rate on SSB mode.

Larger values provide slower release, and smaller values provide faster release.

See also
setSsbAgcAttackRate
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 29
Parameters
parameterRange: 4–248 (The default is 0x18)

◆ setSBBSidebandCutoffFilter()

void SI4735::setSBBSidebandCutoffFilter ( uint8_t  SBCUTFLT)
inline
Deprecated:
Use setSSBSidebandCutoffFilter instead.
See also
setSSBSidebandCutoffFilter
Parameters
SBCUTFLT

◆ setSSBBfo()

void SI4735::setSSBBfo ( int  offset)

Sets the SSB Beat Frequency Offset (BFO).

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; pages 5 and 23
Parameters
offset16-bit signed value (unit in Hz). The valid range is -16383 to +16383 Hz.

References SI4735::waitToSend().

◆ setSSBConfig()

void SI4735::setSSBConfig ( uint8_t  AUDIOBW,
uint8_t  SBCUTFLT,
uint8_t  AVC_DIVIDER,
uint8_t  AVCEN,
uint8_t  SMUTESEL,
uint8_t  DSP_AFCDIS 
)

Sets the SSB receiver mode.

You can use this method for:

1) Enable or disable AFC track to carrier function for receiving normal AM signals;

2) Set the audio bandwidth;

3) Set the side band cutoff filter;

4) Set soft-mute based on RSSI or SNR;

5) Enable or disbable automatic volume control (AVC) function.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
AUDIOBWSSB Audio bandwidth; 0 = 1.2kHz (default); 1=2.2kHz; 2=3kHz; 3=4kHz; 4=500Hz; 5=1kHz.
SBCUTFLTSSB side band cutoff filter for band passand low pass filter if 0, the band pass filter to cutoff both the unwanted side band and high frequency component > 2kHz of the wanted side band (default).
AVC_DIVIDERset 0 for SSB mode; set 3 for SYNC mode.
AVCENSSB Automatic Volume Control (AVC) enable; 0=disable; 1=enable (default).
SMUTESELSSB Soft-mute Based on RSSI or SNR.
DSP_AFCDISDSP AFC Disable or enable; 0=SYNC MODE, AFC enable; 1=SSB MODE, AFC disable.

References SI4735::sendSSBModeProperty().

◆ setSSBDspAfc()

void SI4735::setSSBDspAfc ( uint8_t  DSP_AFCDIS)

Sets DSP AFC disable or enable.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
DSP_AFCDIS0 = SYNC mode, AFC enable; 1 = SSB mode, AFC disable

References SI4735::sendSSBModeProperty().

◆ setSSBSoftMute()

void SI4735::setSSBSoftMute ( uint8_t  SMUTESEL)

Sets SSB Soft-mute Based on RSSI or SNR Selection:

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
SMUTESEL0 = Soft-mute based on RSSI (default); 1 = Soft-mute based on SNR.

References SI4735::sendSSBModeProperty().

◆ setSSBAutomaticVolumeControl()

void SI4735::setSSBAutomaticVolumeControl ( uint8_t  AVCEN)

Sets SSB Automatic Volume Control (AVC) for SSB mode.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
AVCEN0 = Disable AVC; 1 = Enable AVC (default).

References SI4735::sendSSBModeProperty().

◆ setSSBAvcDivider()

void SI4735::setSSBAvcDivider ( uint8_t  AVC_DIVIDER)

Sets AVC Divider.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
AVC_DIVIDERSSB mode, set divider = 0; SYNC mode, set divider = 3; Other values = not allowed.

References SI4735::sendSSBModeProperty().

◆ setSSBSidebandCutoffFilter()

void SI4735::setSSBSidebandCutoffFilter ( uint8_t  SBCUTFLT)

Sets SBB Sideband Cutoff Filter for band pass and low pass filters.

0 = Band pass filter to cutoff both the unwanted side band and high frequency components > 2.0 kHz of the wanted side band. (default)

1 = Low pass filter to cutoff the unwanted side band. Other values = not allowed.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
SBCUTFLT0 or 1; see above

References SI4735::sendSSBModeProperty().

◆ setSSBAudioBandwidth()

void SI4735::setSSBAudioBandwidth ( uint8_t  AUDIOBW)

SSB Audio Bandwidth for SSB mode.

0 = 1.2 kHz low-pass filter (default).

1 = 2.2 kHz low-pass filter.

2 = 3.0 kHz low-pass filter.

3 = 4.0 kHz low-pass filter.

4 = 500 Hz band-pass filter for receiving CW signal, i.e. [250 Hz, 750 Hz] with center frequency at 500 Hz when USB is selected or [-250 Hz, -750 1Hz] with center frequency at -500Hz when LSB is selected* .

5 = 1 kHz band-pass filter for receiving CW signal, i.e. [500 Hz, 1500 Hz] with center frequency at 1 kHz when USB is selected or [-500 Hz, -1500 1 Hz] with center frequency at -1kHz when LSB is selected.

Other values = reserved.

If audio bandwidth selected is about 2 kHz or below, it is recommended to set SBCUTFLT[3:0] to 0 to enable the band pass filter for better high- cut performance on the wanted side band. Otherwise, set it to 1.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 24
Parameters
AUDIOBWthe valid values are 0, 1, 2, 3, 4 or 5; see description above

References SI4735::sendSSBModeProperty().

◆ setSSB() [1/2]

void SI4735::setSSB ( uint8_t  usblsb)

Set the radio to AM function.

Todo:
Adjust the power up parameters

Set the radio to SSB (LW/MW/SW) function.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; pages 13 and 14
setAM()
setFrequencyStep()
void SI4735::setFrequency(uint16_t freq)
Parameters
usblsbupper or lower side band; 1 = LSB; 2 = USB

References SI4735::radioPowerUp().

◆ setSSB() [2/2]

void SI4735::setSSB ( uint16_t  fromFreq,
uint16_t  toFreq,
uint16_t  initialFreq,
uint16_t  step,
uint8_t  usblsb 
)

Tunes the SSB (LSB or USB) receiver to a frequency between 150 and 30 MHz.

Via VFO you have 1kHz steps.

Via BFO you have 8Hz steps.

See also
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; pages 13 and 14
setAM()
setFrequencyStep()
void SI4735::setFrequency(uint16_t freq)
Parameters
fromFreqminimum frequency for the band
toFreqmaximum frequency for the band
initialFreqinitial frequency
stepstep used to go to the next channel
usblsbSSB Upper Side Band (USB) and Lower Side Band (LSB) Selection; value 2 (banary 10) = USB; value 1 (banary 01) = LSB.

◆ sendSSBModeProperty()

void SI4735::sendSSBModeProperty ( )
protected

◆ getSsbAgcStatus()

void SI4735::getSsbAgcStatus ( )
protected

Queries SSB Automatic Gain Control STATUS.

After call this method, you can call isAgcEnabled to know the AGC status and getAgcGainIndex to know the gain index value.

See also
AN332 REV 0.8 Universal Programming Guide Amendment for SI4735-D60 SSB and NBFM patches; page 18.

References SI4735::waitToSend().

◆ setSsbAgcOverrite()

void SI4735::setSsbAgcOverrite ( uint8_t  SSBAGCDIS,
uint8_t  SSBAGCNDX,
uint8_t  reserved = 0 
)

Automatic Gain Control setup.

Overrides the SSB AGC setting by disabling the AGC and forcing the gain index that ranges between 0 (minimum attenuation) and 37+ATTN_BACKUP (maximum attenuation).

Parameters
uint8_tSSBAGCDIS This param selects whether the AGC is enabled or disabled (0 = AGC enabled; 1 = AGC disabled);
uint8_tSSBAGCNDX If 1, this byte forces the AGC gain index. if 0, Minimum attenuation (max gain)

References SI4735::waitToSend().

◆ queryLibraryId()

si47x_firmware_query_library SI4735::queryLibraryId ( )

Query the library information of the Si47XX device.

SI47XX PATCH RESOURCES

Used to confirm if the patch is compatible with the internal device library revision.

You have to call this function if you are applying a patch on SI47XX (SI4735-D60/SI4732-A10).

The first command that is sent to the device is the POWER_UP command to confirm that the patch is compatible with the internal device library revision.

The device moves into the powerup mode, returns the reply, and moves into the powerdown mode.

The POWER_UP command is sent to the device again to configure the mode of the device and additionally is used to start the patching process.

When applying the patch, the PATCH bit in ARG1 of the POWER_UP command must be set to 1 to begin the patching process. [AN332 (REV 1.0) page 219].

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 64 and 215-220.
struct si47x_firmware_query_library
Returns
a struct si47x_firmware_query_library (see it in SI4735.h)

References SI4735::powerDown(), and SI4735::waitToSend().

Referenced by SI4735::loadCompressedPatch(), SI4735::loadPatch(), and SI4735::loadPatchNBFM().

◆ patchPowerUp()

void SI4735::patchPowerUp ( )

This method can be used to prepare the device to apply SSBRX patch.

Call queryLibraryId before call this method. Powerup the device by issuing the POWER_UP command with FUNC = 1 (AM/SW/LW Receive).

See also
setMaxDelaySetFrequency()
MAX_DELAY_AFTER_POWERUP
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 64 and 215-220 and
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE AMENDMENT FOR SI4735-D60 SSB AND NBFM PATCHES; page 7.

References SI4735::waitToSend().

Referenced by SI4735::loadCompressedPatch(), and SI4735::loadPatch().

◆ ssbPowerUp()

void SI4735::ssbPowerUp ( )

This function can be useful for debug and test.

References SI4735::waitToSend().

◆ downloadPatch()

bool SI4735::downloadPatch ( const uint8_t *  ssb_patch_content,
const uint16_t  ssb_patch_content_size 
)

Transfers the content of a patch stored in a array of bytes to the SI4735 device.

You must mount an array as shown below and know the size of that array as well.

Patches for the SI4735 are distributed in binary form and are transferred to the internal RAM of the device by the host MCU (in this case, Arduino boards). Since the RAM is volatile memory, the patch stored on the device gets lost when you turn off the system. Consequently, the content of the patch has to be transferred to the device every time the device is powered up.

The disadvantage of this approach is the amount of memory used by the patch content. This may limit the use of other radio functions you want implemented in Arduino.

Example of content:

const PROGMEM uint8_t ssb_patch_content_full[] =
{ // SSB patch for whole SSBRX full download
0x15, 0x00, 0x0F, 0xE0, 0xF2, 0x73, 0x76, 0x2F,
0x16, 0x6F, 0x26, 0x1E, 0x00, 0x4B, 0x2C, 0x58,
0x16, 0xA3, 0x74, 0x0F, 0xE0, 0x4C, 0x36, 0xE4,
.
.
.
0x16, 0x3B, 0x1D, 0x4A, 0xEC, 0x36, 0x28, 0xB7,
0x16, 0x00, 0x3A, 0x47, 0x37, 0x00, 0x00, 0x00,
0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9D, 0x29};
const int size_content_full = sizeof ssb_patch_content_full;
See also
Si47XX PROGRAMMING GUIDE; ;AN332 (REV 1.0) pages 64 and 215-220.
Parameters
ssb_patch_contentpoint to array of bytes content patch.
ssb_patch_content_sizearray size (number of bytes). The maximum size allowed for a patch is 15856 bytes
Returns
false if an error is found.

◆ downloadCompressedPatch()

bool SI4735::downloadCompressedPatch ( const uint8_t *  ssb_patch_content,
const uint16_t  ssb_patch_content_size,
const uint16_t *  cmd_0x15,
const int16_t  cmd_0x15_size 
)

Deal with compressed SSB patch.

It works like the downloadPatch method but requires less memory to store the patch.

Transfers the content of a patch stored in a compressed array of bytes to the SI4735 device.

In the patch_init.h and patch_full.h files, the first byte of each line begins with either a 0x15 or 0x16 value

To shrink the original patch size stored on the master MCU (Arduino), the first byte

is omitted and a new array is added to indicate which lines begin with the value 0x15.

For the other lines, the downloadCompressedPatch method will insert the value 0x16.

The value 0x16 occurs on most lines in the patch. This approach will save about 1K of memory.

The example code below shows how to use compressed SSB patch.

#include <patch_ssb_compressed.h> // SSB patch for whole SSBRX initialization string
const uint16_t size_content = sizeof ssb_patch_content; // See ssb_patch_content.h
const uint16_t cmd_0x15_size = sizeof cmd_0x15; // Array of lines where the 0x15 command occurs in the patch content.
void loadSSB()
{
.
.
rx.setI2CFastModeCustom(500000);
rx.queryLibraryId();
rx.patchPowerUp();
delay(50);
rx.downloadCompressedPatch(ssb_patch_content, size_content, cmd_0x15, cmd_0x15_size);
rx.setSSBConfig(bandwidthSSB[bwIdxSSB].idx, 1, 0, 1, 0, 1);
rx.setI2CStandardMode();
.
.
}
const PROGMEM uint8_t ssb_patch_content[]
Definition: patch_full.h:23
const PROGMEM uint16_t cmd_0x15[]
Definition: patch_ssb_compressed.h:54
See also
downloadPatch
patch_ssb_compressed.h, patch_init.h, patch_full.h
SI47XX_03_ALL_IN_ONE_NEW_INTERFACE_V15.ino
SI47XX_09_NOKIA_5110/ALL_IN_ONE_7_BUTTONS/ALL_IN_ONE_7_BUTTONS.ino
Parameters
ssb_patch_contentpoint to array of bytes content patch.
ssb_patch_content_sizearray size (number of bytes). The maximum size allowed for a patch is 15856 bytes
cmd_0x15Array of lines where the first byte of each patch content line is 0x15
cmd_0x15_sizeArray size

◆ loadPatch()

void SI4735::loadPatch ( const uint8_t *  ssb_patch_content,
const uint16_t  ssb_patch_content_size,
uint8_t  ssb_audiobw = 1 
)

Loads a given SSB patch content.

Configures the Si4735-D60/SI4732-A10 device to work with SSB.

Parameters
ssb_patch_contentpoint to patch content array
ssb_patch_content_sizesize of patch content
ssb_audiobwSSB Audio bandwidth; 0 = 1.2kHz (default); 1=2.2kHz; 2=3kHz; 3=4kHz; 4=500Hz; 5=1kHz.

References SI4735::patchPowerUp(), and SI4735::queryLibraryId().

◆ loadCompressedPatch()

void SI4735::loadCompressedPatch ( const uint8_t *  ssb_patch_content,
const uint16_t  ssb_patch_content_size,
const uint16_t *  cmd_0x15,
const int16_t  cmd_0x15_size,
uint8_t  ssb_audiobw = 1 
)

Loads the SSB compressed patch content.

Configures the Si4735-D60/SI4732-A10 device to work with SSB.

Parameters
ssb_patch_contentpoint to patch content array
ssb_patch_content_sizesize of patch content
cmd_0x15Array of lines where the first byte of each patch content line is 0x15
cmd_0x15_sizeArray size
ssb_audiobwSSB Audio bandwidth; 0 = 1.2kHz (default); 1=2.2kHz; 2=3kHz; 3=4kHz; 4=500Hz; 5=1kHz.

References SI4735::patchPowerUp(), and SI4735::queryLibraryId().

◆ downloadPatchFromEeprom()

si4735_eeprom_patch_header SI4735::downloadPatchFromEeprom ( int  eeprom_i2c_address)

Transfers the content of a patch stored in an eeprom to the SI4735 device.

To used this method, you will need an eeprom with the patch content stored into it.

This content have to be generated by the sketch SI47XX_09_SAVE_SSB_PATCH_EEPROM on folder TOOLS.

See also
SI47XX_09_SAVE_SSB_PATCH_EEPROM
si4735_eeprom_patch_header https://github.com/pu2clr/SI4735/tree/master/examples/TOOLS/SI47XX_09_SAVE_SSB_PATCH_EEPROM
Parameters
eeprom_i2c_address
Returns
false if an error is found.

References SI4735::waitToSend().