Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coord-e/dsp6951
Library for DSP6951 DSP Radio IC.
https://github.com/coord-e/dsp6951
arduino arduino-library cpp dsp radio
Last synced: 13 days ago
JSON representation
Library for DSP6951 DSP Radio IC.
- Host: GitHub
- URL: https://github.com/coord-e/dsp6951
- Owner: coord-e
- License: mit
- Created: 2017-02-12T12:21:09.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-12T13:10:10.000Z (almost 8 years ago)
- Last Synced: 2025-01-03T04:44:38.894Z (15 days ago)
- Topics: arduino, arduino-library, cpp, dsp, radio
- Language: C++
- Homepage: http://blog.y-modify.org/2017/03/17/m6951-radio/
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DSP6951
Arduino Library for DSP6951 DSP Radio IC.## Supported devices
- [DSP6951](http://www.aitendo.com/product/7350)
- [M6951 module](http://www.aitendo.com/product/7011)## Known issue
- Tuning to AM doesn't work.## Getting started
### Circuit
![circuit](http://blog.y-modify.org/wp-content/uploads/2017/02/m6951-1.png)(resistor is all 10k)
According to datasheet, the rated voltage is 3.3v.
However in my environment, it didn't work with 3.3v.
So I powers it with 5v and it worked successfully. (Also maximun voltage is 5.8v, so it is OK for the moment)
### Sketch
```cpp
#includeDSP6951 radio;
void setup() {
Serial.begin(9600);
radio.begin();
radio.setVolume(50);
radio.setMode(DSP6951::FM);
radio.setChannel(81.3);
}void loop() {
Serial.println(radio.getCNR()); //get "Carrier to noise ratio" and print it
delay(300);
}
```## API Reference
- `void begin(void);`Initialize IC and prepare to work.
- `void setVolume(uint8_t volume);`
Set output volume to the specified value(0-100).
- `void setChannel(float freq);`
Set channel to the specified frequency.
- `void setMode(bool mode);`
Set working mode (`DSP6951::AM` or `DSP6951::FM`)
Currently only FM is supported. AM support will be added soon.
- `void setMute(bool mute);`
Set mute or not. Set `true` to mute, `false` to unmute.
- `uint8_t getCNR();`
Get CNR(Carrier to noise ratio).
- `uint8_t getRSSI();`
Get RSSI(Received Signal Strength Indication).
- `bool isTuned();`
Get whether it is successfully tuned to the channel or not.
- `uint8_t getVolume();`
Get current volume value. (0-100)
- `float getChannel();`
Get current frequency.
- `bool getMode();`
Get current working mode. (`DSP6951::AM` or `DSP6951::FM`)
- `bool getMute();`
Get current mute state.
- `void tune();`
Tune to current frequency expressly.
It doesn't needed in usual.
## LICENSE
This library is published under MIT LICENSE.See `LICENSE`.