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: 2020-08-06
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Wireless connectivity
Downloaded: 2712 times
Not followed.
License: MIT license
UWB Click is an Ultra-Wideband transceiver Click board that can be used in 2-way ranging or TDOA location systems to locate assets to a precision of 10 cm and supports data rates of up to 6.8 Mbps. This board features the DWM1000 module based on Decawave's DW1000 Ultra-Wideband (UWB) transceiver from Decawave Limited.
Do you want to subscribe in order to receive notifications regarding "UWB click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "UWB click" changes.
Do you want to report abuse regarding "UWB click".
Library Description
Library provides complete control of device. You have communication functions for controlling device, writing, reading functions, controlling pins state. There are functions for configurating every aspect of communication, after you set every mode, channel, frequency... With function uwb_tune_config library will set some additional setting relative to previous set configuration. You can set and check communication stage with eather interrupt mask or status register. For communication you have few function like uwb_get_transmit( gets received data ), uwb_get_transmit_len( gets received data length ), uwb_set_transmit( set data to trasnimt ), and uwb_start_transceiver( starts receiving or transmiting data relative to mode set by configuration ).
Key functions:
void uwb_generic_write ( uint8_t reg_adr, uint16_t offset, uint8_t *tx_buf, uint16_t buf_len )
- Writing data to devicevoid uwb_generic_read ( uint8_t reg_adr, uint16_t offset, uint8_t *rx_buf, uint16_t buf_len )
- Reading data from devicevoid uwb_set_mode ( uint8_t mode )
- Setting device in one working modevoid uwb_get_transmit ( uint8_t *rx_buf, uint16_t len_buf )
- Get received datavoid uwb_set_transmit ( uint8_t *tx_buf, uint16_t len_buf )
- Set data to transmitvoid uwb_start_transceiver ( void )
- Start receiving or transmitig dataExamples description
The application is composed of three sections :
void application_task ( )
{
dev_status = uwb_get_qint_pin_status( );
if ( UWB_MODE_RX == dev_mode )
{
if ( dev_status )
{
//Reading transtimed data logs it and reseting to receive mode
uwb_set_mode( UWB_MODE_IDLE );
uwb_clear_status( );
temp_len = uwb_get_transmit_len( );
uwb_get_transmit( &transmit_data[ 0 ], temp_len );
mikrobus_logWrite( "Received data:", _LOG_TEXT );
mikrobus_logWrite( transmit_data, _LOG_LINE );
mikrobus_logWrite( " - Receive done - ", _LOG_LINE );
uwb_set_mode( UWB_MODE_RX );
uwb_start_transceiver( );
}
}
else if ( UWB_MODE_TX == dev_mode )
{
if ( dev_status )
{
//Transmits data reseting to transmit mode and setts 2sec delay
mikrobus_logWrite( " - Transmit done - ", _LOG_LINE );
uwb_set_mode( UWB_MODE_IDLE );
uwb_clear_status( );
uwb_set_transmit( &data_tx[ 0 ], 6 );
uwb_set_mode( UWB_MODE_TX );
uwb_start_transceiver( );
Delay_ms( 2000 );
}
}
}
Other mikroE Libraries used in the example:
Additional notes and informations
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.