CC1101 is used to monitor the carrier signal strength (CCA) in the air.

Source: Internet
Author: User
 
Before reading this article, read the data manual carefully and read the two articles I have reproduced, CCA (1) and CCA (2), for literacy.
I have been using the CC1101 wireless chip recently. I have successfully debugged the CCA function today. I 'd like to share it with you. My idea is to enable the CC1101 to be the CCA function. The GDO2 pin is configured as the output carrier sensing level and the sensing level threshold is set. Currently, the carrier signal strength in the air is monitored. If the received signal strength is higher than the threshold, GDO2 is high. When the received signal strength is lower than the threshold, GDO2 is low.


The CCA initialization function is as follows:
Void CC1101CCA (void) // Configure it as a carrier listener
{
CC1101WriteReg (cc110108iocfg2, 0x0E); // The output carrier sensing level of the GDO2 pin.
CC1101WriteReg (cc110108mcsm1, 0x3F); // when the signal strength is lower than the threshold value and the current packet is not received, the channel is idle, so that the chip remains in the RX state after the TX and RX ends.
CC1101WriteReg (cc110450agcctrl1, 0x40); // The Low Noise Amplifier gain is reduced first, and the relative threshold of the carrier listener is disabled. The absolute threshold of the carrier listener is set by MAGN_TARGET.
CC1101WriteReg (cc11020.agcctrl2, 0x07); // 42dB
}




The source program of the experiment is as follows:
Void main (void)
{
GPIO_Init (); // IO port and crystal oscillator initialization
SPI_Init (); // SPI configuration initialization
CC1101Init (); // CC1101 initialization
CC1101CCA (); // CC1101 CCA configuration
While (1)
    { 
CC1101SetTRMode (RX_MODE); // Set CC1101 to the receiving mode
_ Delay_ms (1); // wait a moment after setting it to the receiving mode. CC1101 can detect the carrier signal in the air.
If (GDO2 = 1) // detects carrier signals in the air
{
// Reverse the LED status


}   
_ Delay_ms (50); // delay for a period of time so that the human eye can see the LED flashing
CC1101WriteCmd (cc110116sfrx); // after receiving data, you must clear the rx fifo to receive the data next time.

    }



Experimental results: Let the CC1101 on the other end send data cyclically. Now GDO2 on the receiving end periodically shows a high level, so the LED lights keep flashing.

CC1101 is used to monitor the carrier signal strength (CCA) in the air.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.