PU2CLR AKC695X Arduino Library  1.0.2
This is an Arduino Library to control the AKC695X / M695X DSP radio devices
Basic Methods

Functions

void AKC695X::reset ()
 Resets the system. More...
 
void AKC695X::setI2CBusAddress (int deviceAddress)
 Sets the I2C bus device address. More...
 
void AKC695X::setup (int reset_pin, uint8_t crystal_type)
 Receiver startup. More...
 
void AKC695X::setup (int reset_pin)
 Receiver startup. More...
 
void AKC695X::powerOn (uint8_t fm_en, uint8_t tune, uint8_t mute, uint8_t seek, uint8_t seekup)
 Power the device on. More...
 
void AKC695X::setRegister (uint8_t reg, uint8_t parameter)
 Sets a given register with a given value. More...
 
uint8_t AKC695X::getRegister (uint8_t reg)
 Gets a given register content. More...
 
void AKC695X::setCrystalType (uint8_t crystal)
 Sets the kind of Crystal. More...
 

Detailed Description

SI47XX Arduino Library implementation

This is an Arduino library for the AKC695X, BROADCAST RECEIVER, IC family. It works with I2C protocol and can provide an easier interface for controlling the AKC695X devices.

This library was built based on AKC6955 stereo FM / TV / MW / SW / LW digital tuning radio document from "AKC technology". It also intend to be used on all members of the AKC695X family respecting, of course, the features available for each IC version.

This library can be freely distributed using the MIT Free Software model. Copyright (c) 2019 Ricardo Lima Caratti. Contact: pu2cl.nosp@m.r@gm.nosp@m.ail.c.nosp@m.om

Basic

Function Documentation

◆ reset()

void AKC695X::reset ( )

Resets the system.

This function can be used to reset the AKC695X device. ypu can also use the RTS pin of your MCU.

In this case, the RESET pin have to be set to -1. This setup can be configured calling AKC695X::setup method.

See also
setup

References AKC695X::resetPin.

Referenced by AKC695X::setup().

◆ setI2CBusAddress()

void AKC695X::setI2CBusAddress ( int  deviceAddress)

Sets the I2C bus device address.

You do not need use this function if your i2c device address is 0x10 (default value)

Parameters
deviceAddress

References AKC695X::deviceAddress.

◆ setup() [1/2]

void AKC695X::setup ( int  resetPin,
uint8_t  crystal_type 
)

Receiver startup.

Use this method to define the MCU (Arduino) RESET pin and the crystal type you are using.

The options for the crystal type is: CRYSTAL_32KHz (32.768kHz) or CRYSTAL_12MHZ (12MHz).

If you omit the crystal type parameter, will be considered 32.768kHz. Example:

#include <AKC695X.h>
#define RESET_PIN 12 // set it to -1 if you want to use the RST pin of your MCU.
AKC695X radio;
void setup() {
// Set RESET_PIN to -1 if you are using the Arduino RST pin; Select CRYSTAL_32KHz or CRYSTAL_12MHZ
// radio.setup(RESET_PIN); Instead the line below, if you use this line, the crystal type considered will be 32.768kHz.
radio.setup(RESET_PIN, CRYSTAL_12MHZ);
radio.setFM(0, 870, 1080, 1039, 1); // Tunes on 103.9MHz, FM, band 0.
}
See also
setCrystalType, akc595x_reg2
Parameters
resetPinif >= 0, then you control the RESET. if -1, you are using ths Arduino RST pin.
crystal_typeif 1 = 32.768kHz (default); 0 = 12MHz

References AKC695X::reset(), and AKC695X::resetPin.

◆ setup() [2/2]

void AKC695X::setup ( int  resetPin)

Receiver startup.

Use this method to define the MCU (Arduino) RESET. If you call this method the crystal type will be set to 32.768kHz

#include <AKC695X.h>
AKC695X radio;
void setup() {
// Set RESET_PIN to -1 if you are using the Arduino RST pin; Select CRYSTAL_32KHz or CRYSTAL_12MHZ
// radio.setup(-1); Use this line if you are using RST pin of the Arduino. The crystal type considered will be 32.768kHz.
radio.setup(12); // You ara usint Arduino Pin 12 to reset control. The crystal type considered will be 32.768kHz.
radio.setFM(0, 870, 1080, 1039, 1); // Tunes on 103.9MHz, FM, band 0.
}
Parameters
resetPinif >= 0, then you control the RESET. if -1, you are using ths MCU RST pin.

◆ powerOn()

void AKC695X::powerOn ( uint8_t  fm_en,
uint8_t  tune,
uint8_t  mute,
uint8_t  seek,
uint8_t  seekup 
)

Power the device on.

Starts the AKC695X with some parameters.

Parameters
fm_en1 = FM mode; 0 = AM mode
tuneIf 1 Trigger tune process. The STC bit is set high when the tune operation completes
muteIf 1 mute L/R audio
seekIf 1 Trigger tune process. The STC bit is set high when the tune operation completes
seekupSeek direction control bit. 0 = Seek down; 1 = Seek up

◆ setRegister()

void AKC695X::setRegister ( uint8_t  reg,
uint8_t  parameter 
)

Sets a given register with a given value.

It is a basic function to deal with the AKC695X devices

Parameters
regregister number to be written (only for RW type registers)
parametervalue to be written in the register

◆ getRegister()

uint8_t AKC695X::getRegister ( uint8_t  reg)

Gets a given register content.

It is a basic function to get a value from a given AKC695X device register

Parameters
regregister number to be read (0 ~ 26)
Returns
the register content

◆ setCrystalType()

void AKC695X::setCrystalType ( uint8_t  crystal)

Sets the kind of Crystal.

This method sets the Crystal type you are using in your circuit.

The valid crystal type are 12MHz or 32.768kHz

Parameters
crystal0 = 12MHz; 1 = 32.768kHz
AKC695X
Definition: AKC695X.h:445
AKC695X::setFM
void 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.
Definition: AKC695X.cpp:491
AKC695X.h
AKC695X::setup
void setup(int reset_pin)
Receiver startup.
Definition: AKC695X.cpp:101
CRYSTAL_12MHZ
#define CRYSTAL_12MHZ
Definition: AKC695X.h:29