We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2018-02-26
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Sub-1 GHz Transceivers
Downloaded: 4070 times
Not followed.
License: MIT license
MiWi 2 click is a sub-gigahertz radio transceiver click board, which offers a reliable FSK or OOK communication solution, with the maximum data rates of 200kbps and 40kbps, respectively.
Do you want to subscribe in order to receive notifications regarding "MiWi 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "MiWi 2 click" changes.
Do you want to report abuse regarding "MiWi 2 click".
Library Description
Library carries generic functions which are enough to have complete control over MiWi click.
Key functions
void miwi2_writeReg(uint8_t address, uint8_t value)- Writes data to the register
uint8_t miwi2_readReg(uint8_t address)- Reads data from the register
void miwi2_writeFIFO(uint8_t Data)- Writes data to the FIFO buffer
uint8_t miwi2_readFIFO()- Reads data from the FIFO buffer
Examples Description
Demo application is modified version of Microchip's application for MRF89XA devices. Application is in the form of a console app with simple UI which allows operations such as register_read or write but also TX and RX routines.
This function (code snippet) continuously transmits predefined packet with delay of 100 ms between each transaction.
void RadioApp_txPredefinedPacket() { uint8_t input; uint8_t tmpPacket[ 6 ] = { 80, 65, 67, 75, 69, 84 }; ConsolePut_constString("Transmitting predefined packet at"); RadioApp_printMiniStatus(PR_TX_MODE); ConsolePut_constString("Press (Ctrl+z) to exit"); ConsolePut_newLine(); while (1) { if (ConsoleGet_ready()) { input = ConsoleGet(); ConsolePut(input); if (input == 26) return; } miwi2_sendPacket(&tmpPacket[0], 6); _miwi2_rfMode = _MIWI2_RF_STANDBY; Delay_ms( 100 ); } }
Other MikroElektronika libraries used in the example:
Additional notes and information
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.