PU2CLR AKC695X Arduino Library
1.0.2
This is an Arduino Library to control the AKC695X / M695X DSP radio devices
|
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... | |
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 r@gm ail.c om
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.
References AKC695X::resetPin.
Referenced by AKC695X::setup().
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)
deviceAddress |
References AKC695X::deviceAddress.
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:
resetPin | if >= 0, then you control the RESET. if -1, you are using ths Arduino RST pin. |
crystal_type | if 1 = 32.768kHz (default); 0 = 12MHz |
References AKC695X::reset(), and AKC695X::resetPin.
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
resetPin | if >= 0, then you control the RESET. if -1, you are using ths MCU RST pin. |
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.
fm_en | 1 = FM mode; 0 = AM mode |
tune | If 1 Trigger tune process. The STC bit is set high when the tune operation completes |
mute | If 1 mute L/R audio |
seek | If 1 Trigger tune process. The STC bit is set high when the tune operation completes |
seekup | Seek direction control bit. 0 = Seek down; 1 = Seek up |
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
reg | register number to be written (only for RW type registers) |
parameter | value to be written in the register |
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
reg | register number to be read (0 ~ 26) |
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
crystal | 0 = 12MHz; 1 = 32.768kHz |