PU2CLR KT0915 Arduino Library  1.0.1
This is an Arduino Library to control the KT0915 device
Tune Methods

Functions

void KT0915::setMono (bool on_off)
 Sets the receiver Stereo or Mono. More...
 
bool KT0915::isFmStereo ()
 Return true if the stereo indicator is set to 3;. More...
 
int KT0915::getFmRssi ()
 Gets the current FM RSSI. More...
 
int KT0915::getAmRssi ()
 Gets the current AM RSSI
More...
 
int KT0915::getFmSnr ()
 Gets current SNR value. More...
 
void KT0915::setDeEmphasis (uint8_t value)
 Sets the De-emphasis Time Constant Selection. More...
 
void KT0915::setFmAfc (bool value)
 Sets FM AFC Disable Control. More...
 
void KT0915::setAmAfc (bool value)
 Sets AM AFC Disable Control. More...
 
void KT0915::setAmSpace (uint8_t value)
 Sets the AM Space. More...
 
void KT0915::setFmSpace (uint8_t value)
 Sets the FM Space. More...
 
void KT0915::setAmBandwidth (uint8_t value)
 Sets AM Channel Bandwidth Selection. More...
 
uint8_t KT0915::getAmBandwidth ()
 Gets current AM Channel Bandwidth Selection. More...
 
void KT0915::setFM (uint32_t minimum_frequency, uint32_t maximum_frequency, uint32_t default_frequency, uint16_t step)
 Sets the receiver to FM mode. More...
 
void KT0915::setAM (uint32_t minimum_frequency, uint32_t maximum_frequency, uint32_t default_frequency, uint16_t step, uint8_t am_space=0)
 Sets the receiver to AM mode. More...
 
void KT0915::setFrequency (uint32_t frequency)
 Sets the current frequency. More...
 
void KT0915::frequencyUp ()
 Increments the frequency one step. More...
 
void KT0915::frequencyDown ()
 Decrements the frequency one step. More...
 
void KT0915::setStep (uint16_t step)
 Sets the frequency step. More...
 
uint32_t KT0915::getFrequency ()
 Gets the current frequency. More...
 
uint16_t KT0915::getFmCurrentChannel ()
 Gets the FM Channel Setting. More...
 
uint16_t KT0915::getAmCurrentChannel ()
 Gets the current AM Channel Setting. More...
 
void KT0915::seekStation ()
 Should Seek a station. More...
 

Detailed Description

Tune Methods


Methods to tune and set the receiver mode

Function Documentation

◆ setMono()

void KT0915::setMono ( bool  on_off)

Sets the receiver Stereo or Mono.

Set this parameter to true to force mono or false to stereo

Parameters
on_offtrue = mono; fale = stereo

Definition at line 508 of file KT0915.cpp.

◆ isFmStereo()

bool KT0915::isFmStereo ( )

Return true if the stereo indicator is set to 3;.

Returns
true is stereo

Definition at line 521 of file KT0915.cpp.

◆ getFmRssi()

int KT0915::getFmRssi ( )

Gets the current FM RSSI.

Returns
int RSSI value

Definition at line 534 of file KT0915.cpp.

◆ getAmRssi()

int KT0915::getAmRssi ( )

Gets the current AM RSSI

Returns
int RSSI value

Definition at line 547 of file KT0915.cpp.

◆ getFmSnr()

int KT0915::getFmSnr ( )

Gets current SNR value.

Returns
int FM SNR value

Definition at line 560 of file KT0915.cpp.

◆ setDeEmphasis()

void KT0915::setDeEmphasis ( uint8_t  value)

Sets the De-emphasis Time Constant Selection.

Parameters
value0 = 75us; 1 = 50us

Definition at line 573 of file KT0915.cpp.

◆ setFmAfc()

void KT0915::setFmAfc ( bool  value)

Sets FM AFC Disable Control.

This function inverts the register enable/disable concept. So, here, 1 means enable and 0 disable.

Parameters
valuetrue = enable AFC; false = disable AFC.

Definition at line 587 of file KT0915.cpp.

◆ setAmAfc()

void KT0915::setAmAfc ( bool  value)

Sets AM AFC Disable Control.

Todo:
Check the value of RESERVED1 and audio setup

This function inverts the register enable/disable concept. So, here, 1 means enable and 0 disable.

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 19
Parameters
valuetrue = enable AFC; false = disable AFC.

Definition at line 602 of file KT0915.cpp.

◆ setAmSpace()

void KT0915::setAmSpace ( uint8_t  value)

Sets the AM Space.

Selects AM channel space

value space
0 1KHz
1 9KHz
2 10KHz
3 10KHz
Parameters
valueSee table above

Definition at line 625 of file KT0915.cpp.

◆ setFmSpace()

void KT0915::setFmSpace ( uint8_t  value)

Sets the FM Space.

FM Channel Spacing; 00 = 200KHz; 01 = 100KHz; 10 = 50KHz

Selects FN channel space

value space KHz
0 200
1 100
2 50
3 ?
Parameters
valueSee table above

Definition at line 649 of file KT0915.cpp.

◆ setAmBandwidth()

void KT0915::setAmBandwidth ( uint8_t  value)

Sets AM Channel Bandwidth Selection.

Todo:
Check the reserved bits [0:2]

Configures the AM Bandwidth

value Bandwidth
0 2KHz
1 2KHz
2 4KHz
3 6KHz
Parameters
valueSee table above

Definition at line 672 of file KT0915.cpp.

◆ getAmBandwidth()

uint8_t KT0915::getAmBandwidth ( )

Gets current AM Channel Bandwidth Selection.

value Bandwidth
0 2KHz
1 2KHz
2 4KHz
3 6KHz
Returns
See table above

Definition at line 694 of file KT0915.cpp.

◆ setFM()

void KT0915::setFM ( uint32_t  minimum_frequency,
uint32_t  maximum_frequency,
uint32_t  default_frequency,
uint16_t  step 
)

Sets the receiver to FM mode.

Configures the receiver on FM mode; Also sets the band limits, defaul frequency and step.

Parameters
minimum_frequencyminimum frequency for the band
maximum_frequencymaximum frequency for the band
default_frequencydefault freuency
stepincrement and decrement frequency step

Definition at line 711 of file KT0915.cpp.

◆ setAM()

void KT0915::setAM ( uint32_t  minimum_frequency,
uint32_t  maximum_frequency,
uint32_t  default_frequency,
uint16_t  step,
uint8_t  am_space = 0 
)

Sets the receiver to AM mode.

Todo:
Check RESERVED values and AM audio setup

Configures the receiver on AM mode; Also sets the band limits, defaul frequency and step.

Parameters
minimum_frequencyminimum frequency for the band
maximum_frequencymaximum frequency for the band
default_frequencydefault freuency
stepincrement and decrement frequency step

Definition at line 755 of file KT0915.cpp.

◆ setFrequency()

void KT0915::setFrequency ( uint32_t  frequency)

Sets the current frequency.

Parameters
frequency

Definition at line 786 of file KT0915.cpp.

◆ frequencyUp()

void KT0915::frequencyUp ( )

Increments the frequency one step.

if the frequency plus the step value is greater than the maximum frequency for the band,

tne current frequency will be set to minimum frequency.

See also
setFrequency

Definition at line 818 of file KT0915.cpp.

Referenced by KT0915::setFrequencyUp().

◆ frequencyDown()

void KT0915::frequencyDown ( )

Decrements the frequency one step.

if the frequency minus the step value is less than the minimum frequency for the band,

tne current frequency will be set to minimum frequency.

See also
setFrequency

Definition at line 835 of file KT0915.cpp.

Referenced by KT0915::setFrequencyDown().

◆ setStep()

void KT0915::setStep ( uint16_t  step)

Sets the frequency step.

Sets increment and decrement frequency

Parameters
stepValues: 1, 5, 9, 10, 100, 200 in KHz

Definition at line 850 of file KT0915.cpp.

◆ getFrequency()

uint32_t KT0915::getFrequency ( )

Gets the current frequency.

Returns
frequency in KHz

Definition at line 860 of file KT0915.cpp.

◆ getFmCurrentChannel()

uint16_t KT0915::getFmCurrentChannel ( )

Gets the FM Channel Setting.

This method returns the current channel value for FM tune.

The channel value multiplied by 50 is the current FM frequency in KHz.

Returns
FM Channel number

Definition at line 872 of file KT0915.cpp.

◆ getAmCurrentChannel()

uint16_t KT0915::getAmCurrentChannel ( )

Gets the current AM Channel Setting.

This method returns the current channel value for AM tune

Actually this value is the AM current frequency in KHz

Returns
AM Channel number (frequency in KHz)

Definition at line 885 of file KT0915.cpp.

◆ seekStation()

void KT0915::seekStation ( )

Should Seek a station.

Todo:
Not enough information to do this so far.

However, there no enough information to implement it.

Definition at line 898 of file KT0915.cpp.