PU2CLR AKC695X Arduino Library  1.0.1
This is an Arduino Library to control the AKC695X / M695X DSP radio devices
Receiver Operation Methods

Functions

void AKC695X::commitTune ()
 Sets the STC bit to high when the tune operation completes. More...
 
void AKC695X::setFM (uint8_t akc695x_fm_band, uint16_t minimum_freq, uint16_t maximum_freq, uint16_t default_frequency, uint8_t default_step)
 Sets the AKC695X to FM mode. More...
 
void AKC695X::setAM (uint8_t akc695x_am_band, uint16_t minimum_freq, uint16_t maximum_freq, uint16_t default_frequency, uint8_t default_step)
 Sets the AKC695X to AM mode and selects the band. More...
 
void AKC695X::setStep (uint8_t step)
 Sets the step that will be used to increment and decrement the current frequency. More...
 
void AKC695X::setFmSeekStep (uint8_t value)
 Sets FM step for seeking. More...
 
void AKC695X::seekFmStation (uint8_t up_down)
 Seeks a FM station. More...
 
void AKC695X::setFrequency (uint16_t frequency)
 Sets the the device to a given frequency. More...
 
uint16_t AKC695X::getFrequency ()
 Returns the current frequency value. More...
 
void AKC695X::frequencyUp ()
 Adds the current step to the current frequency and sets the new frequency. More...
 
void AKC695X::frequencyDown ()
 Subtracts the current step from the current frequency and assign the new frequency. More...
 
void AKC695X::setAudio (uint8_t phase_inv, uint8_t line, uint8_t volume)
 Configures the audio output. More...
 
void AKC695X::setAudio ()
 Configures the audio output with default values. More...
 
void AKC695X::setVolume (uint8_t volume)
 Sets the output audio volume. More...
 
void AKC695X::setVolumeUp ()
 Increments the audio volume. More...
 
void AKC695X::setVolumeDown ()
 Decrements the audio volume. More...
 
int AKC695X::getRSSI ()
 Gets the current RSSI. More...
 
float AKC695X::getSupplyVoltage ()
 Gets the supply voltage. More...
 

Detailed Description

Operation

Function Documentation

◆ commitTune()

void AKC695X::commitTune ( )

Sets the STC bit to high when the tune operation completes.

Tells the device that the tune process is over.

◆ frequencyDown()

void AKC695X::frequencyDown ( )

Subtracts the current step from the current frequency and assign the new frequency.

Goes to the previous frequency channel

◆ frequencyUp()

void AKC695X::frequencyUp ( )

Adds the current step to the current frequency and sets the new frequency.

Goes to the next frequency channel

◆ getFrequency()

uint16_t AKC695X::getFrequency ( )

Returns the current frequency value.

Gets the current frequency.

Returns
uint16_t Current frequency value.

◆ getRSSI()

int AKC695X::getRSSI ( )

Gets the current RSSI.

Gets the current RSSI

Returns
int RSSI value

◆ getSupplyVoltage()

float AKC695X::getSupplyVoltage ( )

Gets the supply voltage.

Gets the current supply voltage

Returns
float the supply voltage

◆ seekFmStation()

void AKC695X::seekFmStation ( uint8_t  up_down)

Seeks a FM station.

Seek a FM Station

Parameters
up_downif 0, seek down; if 1, seek up.

◆ setAM()

void AKC695X::setAM ( uint8_t  akc695x_am_band,
uint16_t  minimum_freq,
uint16_t  maximum_freq,
uint16_t  default_frequency,
uint8_t  default_step 
)

Sets the AKC695X to AM mode and selects the band.

This method configures the AM band you want to use.

You must respect the frequency limits defined by the AKC595X device documentation.

AM band N# Description
00000 0 LW, 0.15 ~ 0.285, 3K station search
00001 1 MW1, 0.52 ~ 1.71, 5K station search
00010 2 MW2, 0.522 ~ 1.62, 9K station search
00011 3 MW3, 0.52 ~ 1.71, 10K station search
00100 4 SW1, 4.7 ~ 10, 5K station search
00101 5 SW2, 3.2 ~ 4.1, 5K station search
00110 6 SW3, 4.7 ~ 5.6, 5K station search
00111 7 SW4, 5.7 ~ 6.4, 5K station search
01000 8 SW5, 6.8 ~ 7.6, 5K station search
01001 9 SW6, 9.2 ~ 10, 5K station search
01010 10 SW7, 11.4 ~ 12.2, 5K station search
01011 11 SW8, 13.5 ~ 14.3
01100 12 SW9, 15 ~ 15.9
01101 13 SW10, 17.4 ~ 17.9
01110 14 SW11, 18.9 ~ 19.7, 5K station search
01111 15 SW12, 21.4 ~ 21.9, 5K station search
10000 16 SW13, 11.4 ~ 17.9, 5K station search
10010 17 MW4, 0.52 to 1.73, 5K station search
Other 18+ custom band, station search interval = 3K
Parameters
akc695x_am_bandAM band (see manual AM band table above)
minimum_freqMinimal frequency of the band
maximum_freqBand maximum frequency
default_frequencydefault frequency
default_stepincrement and decrement step

◆ setAudio() [1/2]

void AKC695X::setAudio ( )

Configures the audio output with default values.

this method sets the audio phase_inv = 0; line = 1 and volume = 40;

Also, this set the audio controlled by MCU (Arduino)

See also
setVolumeControl

◆ setAudio() [2/2]

void AKC695X::setAudio ( uint8_t  phase_inv,
uint8_t  line,
uint8_t  volume 
)

Configures the audio output.

This method sets the AKC695X device audio behaviour

Parameters
phase_invif 0, audio output inphase; if 1, audio output inverted
lineif 0, audio input mode; if 1, radio mode.
volumeif 25 a 63, audio volume; if <= 24 mute

◆ setFM()

void AKC695X::setFM ( uint8_t  akc695x_fm_band,
uint16_t  minimum_freq,
uint16_t  maximum_freq,
uint16_t  default_frequency,
uint8_t  default_step 
)

Sets the AKC695X to FM mode.

Sets the device to FM mode.

FM band N# Description
000 0 FM1,87 ~ 108, station search space specified intervals
001 1 FM2,76 ~ 108, station search space specified intervals
010 2 FM3,70 ~ 93, with a space station search interval set
011 3 FM4,76 ~ 90, Tuning predetermined space intervals
100 4 FM5,64 ~ 88, with a space station search interval set
101 5 TV1,56.25 ~ 91.75, station search space specified intervals
110 6 TV2, 174.75 ~ 222.25, found
111 7 sets predetermined space intervals, custom FM, station search space specified intervals
Parameters
akc695x_fm_bandFM band (see manual FM band table above)
minimum_freqMinimal frequency of the band
maximum_freqBand maximum frequency
default_frequencydefault frequency
default_stepincrement and decrement step

◆ setFmSeekStep()

void AKC695X::setFmSeekStep ( uint8_t  space)

Sets FM step for seeking.

Sets FM seek step.

spece N# step
00 0 25 KHz
01 1 50 KHz
10 2 100 KHz
11 3 200 KHz
See also
AKC6955 stereo FM / TV / MW / SW / LW digital tuning radio documentation; page 14
Parameters
spacevalue betwenn 0 and 3 (see table above).

◆ setFrequency()

void AKC695X::setFrequency ( uint16_t  frequency)

Sets the the device to a given frequency.

This methods check the current mode (AM or FM), calculates the right channel to be setted.

Sets to reg2 structure the 5 most significan bist of the channel.

Sets to reg3 the 8 less significant bits of the channel.

See also
akc595x_reg2, akc595x_reg3
Parameters
frequencyfrequency you want to set to

◆ setStep()

void AKC695X::setStep ( uint8_t  step)

Sets the step that will be used to increment and decrement the current frequency.

The AKC695X has two possible steps (3KHz and 5KHz). The step value is important to calculate the frequenvy you want to set.

See also
setFrequency
AKC6955 stereo FM / TV / MW / SW / LW digital tuning radio documentation; page 12
Parameters
stepThe valid values are 3 and 5. Other values will be ignored.

◆ setVolume()

void AKC695X::setVolume ( uint8_t  volume)

Sets the output audio volume.

Values less than 24 mute the audio output.

Values between 25 and 63 set the output audio volume.

Parameters
volume

◆ setVolumeDown()

void AKC695X::setVolumeDown ( )

Decrements the audio volume.

The minimum volume is 25

◆ setVolumeUp()

void AKC695X::setVolumeUp ( )

Increments the audio volume.

The maximum volume is 63