This article is mainly about the introduction of cc1101, and focuses on the low power consumption of cc1101 and the driver transceiver program. CC1101 is a sub-1GHz design designed for very low power RF applications. It is mainly aimed at industry, scientific research and medical (ISM) and short-range wireless communication equipment (SRD). CC1101 can provide extensive hardware support for data packet processing, data buffering, burst transmission, received signal strength indicator (RSSI), clear channel assessment (CCA), link quality indicator, and wireless wake-up (WOR). CC1101 is compatible with CC1100 in terms of code, packaging and external pins, and can be used in the most commonly used open RF design below 1GHz in the world. ◠Ultra-low power wireless transceiver ◠Home and building automation ◠Advanced Meter Reading Architecture (AMI) ◠Wireless alarm security system ◆ 387.0MHz~464.0MHz working frequency band. (433MHz, 0.6kbps, -116dBm at 1% bit error rate). (Receiving mode, 433MHz, only 16.0mA at 1.2kbps). ◆ The highest transmit power can be set to +10dBm. ◆ Support the data transmission rate of 0.6kbps~500kbps. ◆ Support multiple modulation modes (OOK, ASK, GFSK, 2-FSK, 4-FSK and MSK). ◆ Provide support for sync word detection, address verification, flexible packet length and automatic CRC processing. ◆ Support RSSI (received signal strength indicator) and LQI (link quality indicator). ◆ Connect to MCU through 4-wire SPI interface, and provide 2 general-purpose digital output pins with programmable functions. ◆ Independent 64-byte RXFIFO and TX FIFO. ◆ Operating voltage range: 1.9V~3.6V, the current is only 200nA in standby mode. ◆ Operating temperature range: -40℃~+85℃ In the circuit design, only one LED, serial port 1, one analog SPI, one interrupt line, and one card reader chip RESET line are used. There are only a few things left on the hardware. At this time, I use standby mode. The interruption of the card reader chip is connected to PA0 to wake up the STM32. Before that, the card reader chip must enter low power consumption, and then the STM32 will enter low power consumption. This step is completed. It seems that there is no problem. The power consumption is indeed from tens of mA. It was reduced to about 3mA, which was quite satisfactory at first, but the power consumption of the prototype provided by the test manufacturer was only tens of uA, which was a bit depressing. Why is this happening? After checking the hardware and program repeatedly, I can't find the reason, and the work effect is very bad at this time, and I can't wake up at all, so I suspected that the low power consumption of the card reader chip is a problem, because I directly shorted the PA0 pin to VCC. In this way, an edge can be generated to trigger the STM32 to wake up, but the card reader chip cannot be used to wake up, so I suspect that the RESET pin of the card reader chip is not at the right level. After inspection, it is indeed because the RESET pin has a pull-up resistor to read the card. The chip is reset at a high level. After the STM32 enters the standby mode, the pins are all floating, which causes the RESET to be pulled high and is always resetting; I removed the pull-up resistor, and I think it is very hopeful to solve the problem, but the test result is: Yes It can wake up sometimes, but sometimes it can’t. I thought about it carefully because the pin level of the STM32 is uncertain after standby, which causes the RESET pin level of the card reader chip to be unstable and work abnormally. It seems that I have to switch to another solution. I did verify my idea later. After using the STOP mode, the wake-up problem was solved immediately. At the critical moment, the original chip factory fired charcoal, and sent urgently needed technical support materials, one containing low-power source code, quickly take it for testing, study the code first, use STOP mode instead of standby mode, use It is awakened by any external interrupt, and the power consumption is low at 40uA. At this time, I am quite excited. Hurry up and download the test. The result is that the power consumption is indeed reduced, but it is still 1mA, which is dozens of times more than others. . . My first reaction was that the hardware was incorrect. After testing and modification, I first found the first reason. The pull-up resistor on the RESET pin of the card reader chip was soldered on again. . . After dismantling, the power consumption plummeted to several hundred uA, which still didn’t work. . During the test, in order to remove the interference of the LDO, the entire board was powered by 3.3V, but after testing later, the power consumption of the LDO was actually less than 5uA. This LDO power consumption is worthy of praise; although the result still did not meet expectations, but see When it comes to hope, victory is in sight. For this reason, I repeatedly looked at the program provided by technical support and found that all the pins of their STM32 have been carefully set: (because of the company's confidentiality principle, the prefix information about the card reader chip is deleted from the code, etc.) GPIO_InitTypeDef GPIO_InitStructure; /* GPIOA Periph clock enable */ RCC_APB2PeriphClockCmd (RCC_APB2Periph_GPIOA, ENABLE); /* GPIOB Periph clock enable */ RCC_APB2PeriphClockCmd (RCC_APB2Periph_GPIOB, ENABLE); /* GPIOC Periph clock enable */ //RCC_APB2PeriphClockCmd (RCC_APB2Periph_GPIOC, ENABLE); RCC_APB1PeriphClockCmd (RCC_APB1Periph_PWR, ENABLE); RCC_APB2PeriphClockCmd (RCC_APB2Periph_AFIO, ENABLE); //############################################ #### //USART1 Port Set //TXD GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; GPIO_Init (GPIOA, &GPIO_InitStructure); //RXD GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init (GPIOA, &GPIO_InitStructure); //RST output pushpull mode GPIO_InitStructure.GPIO_Pin = TRST; GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init (PORT1, &GPIO_InitStructure); //IRQ input pull-up mode GPIO_InitStructure.GPIO_Pin = TIRQ; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init (PORT1, &GPIO_InitStructure); //MISO input pull-up mode GPIO_InitStructure.GPIO_Pin = MISO; GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init (PORT2, &GPIO_InitStructure); //NSS, SCK, MOSI output pushpull mode GPIO_InitStructure.GPIO_Pin = (NSS|SCK|MOSI); GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init (PORT2, &GPIO_InitStructure); //############################################ ########################### //TEST Port set //TESTO input pushpull mode GPIO_InitStructure.GPIO_Pin = TESTO; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; GPIO_Init(TEST_PORT, &GPIO_InitStructure); //############################################ ########################### //TEST Port set //TESTI output pushpull mode GPIO_InitStructure.GPIO_Pin = TESTI; GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init(TEST_PORT, &GPIO_InitStructure); //############################################ ########################### //LED Port Set //LED output pushpull mode GPIO_InitStructure.GPIO_Pin = LED; GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; GPIO_Init(LED_PORT, &GPIO_InitStructure); //############################################ ############ GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_3|GPIO_Pin_8|GPIO_Pin_11|GPIO_Pin_12|GPIO_Pin_15); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD; GPIO_Init (GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_0|GPIO_Pin_1|GPIO_Pin_2|GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9|GPIO_Pin_10); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD; GPIO_Init (GPIOB, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = (GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD; GPIO_Init (GPIOC, &GPIO_InitStructure); First of all, think that the pins of MOSI, SCK, CS, LED, and RST should be set to push-pull output, TXD is set to multiplex output, and IRQ, RXD, MISO are set to floating input, and the pins that are not connected are all set to Pull-down input, and I have never understood what TESTI and TESO are. I didn’t care about it at the beginning. At the beginning, I didn’t pay much attention to MISO. I set it to pull-up input (rather than floating input). Anyway, most of them are according to the manufacturer. I did not copy the reference provided. The test results are the same, but the power consumption is still 80-90uA. During the period, I searched for a long time and did not find the reason. I gave the technical support a look. It turned out that MISO was not set to floating input. I set it as a pull-up input, and the pull-up resistor has been consuming about 40uA. . . Well, this is caused by not being careful enough. It will be a big problem to do low-power project pin configuration in the future, and it can't be so sloppy! ! ! After I set MISO to floating input, the lowest power consumption is still 40+, which is still some distance from the lowest power consumption of 10uA. Why? Finally I found , The card reader chip has a TESTIN/TESTOUT pin, which is used for testing, and it will not be used after leaving the factory. I always thought that these two pins are really useless, so I did not connect it; but I found that the manufacturer provides The sample board actually connected these two pins, but the manufacturer did not say that connecting or not connecting these two pins will affect the power consumption. With the mentality of giving it a try, I connect the TESTIN/TESTOUT two pins to the microcontroller. After the corresponding configuration, the next time is to witness the miracle. The power consumption has actually been reduced to 10uA. . . . . . . . . . . Omit n words here I'm really excited at this time, I really want to curse people, why don't you give me a hint that if these two pins are not connected to the microcontroller, it will consume current? (Maybe it is mentioned in the document, but hundreds of pages of documents are still in English, and a bunch of text. I read it again. It is indeed not mentioned that these two pins will have leakage current.) The project is completed in this way. The most important thing is the strong support of technical support. Otherwise, the project cannot be completed. The low-power STM32 of this project is not difficult, mainly because the low-power debugging on the card reader chip has a lot of problems, or The problem was solved by the original factory. For many reasons, the information of the chip cannot be released, including how the chip enters the low power consumption and cannot be disclosed, so sorry~~. Regarding the entry of STM32 into low power consumption, I briefly summarized: 1. Pin settings, this is very important, it still has something to do with your circuit, add pull-down and pull-down resistors, remember not to add them randomly 2. STM32's systick clock, DMA, TIM, etc., can be turned off and then turned off all, STM32 low power consumption is very simple, the key is that the power consumption of the peripheral circuit is the key 3. Choose a low-power LDO, the power consumption of the LDO used in this project is very good, the static power consumption is less than 10uA. 4. Make sure that the STM32 setting is ok. There are several options for low power consumption (sleep, shutdown, standby). I still recommend the STOP mode. I think this is better because it can be awakened by any external interrupt. And the pins can retain the previous settings, and the code that enters the shutdown mode uses the built-in library function, just one sentence: PWR_EnterSTOPMode (PWR_Regulator_LowPower, PWR_STOPEntry_WFI); This means that before entering the shutdown mode, the voltage regulator is also turned off to further reduce the power consumption, and the WFI command (wake on any interrupt) is used, but after testing, the effect and power consumption of the WFE (wake on any event) command are exactly the same. The last step is how to recover from the STOP mode. The recovery is actually very simple. The external interrupt will enter the interrupt function, and then the STM32 will be awakened. There is still some work to be done to wake up. You need to turn on the external crystal oscillator (of course, you can also choose to use the internal Built-in oscillator), turn on the peripherals you need, and so on. #include “system.h†#include “delay.h†#include “CC1101.h†//CC1101 command mask #define WRITE_BURST 0x40 //Continuous write #define READ_SINGLE 0x80 //Read #define WRITE_SINGLE 0x00 //write #define READ_BURST 0xC0 //Continuous reading #define BURST_READ_FIFO 0xff //Burst read RX FIFO #define BYTE_READ_FIFO 0xBF //Single byte read RX FIFO #define BURST_WRITE_FIFO 0x7f //Burst write TX FIFO #define BYTE_WRITE_FIFO 0x3f //Single byte write TX FIFO #define CC1101_DATA_LEN 64 //SPI interface //Low-level interface macro definition #define CC1101_CS_H() (GPIOA-》ODR|=BIT3) //PA3=1 #define CC1101_CS_L() (GPIOA-》ODR&=~BIT3) //PA3=0 #define CC1101_MOSI_H() (GPIOC-》ODR|=BIT6) //PC6 #define CC1101_MOSI_L() (GPIOC-》ODR&=~BIT6) //PC6 #define CC1101_SCLK_H() (GPIOC-》ODR|=BIT5) //PC5 #define CC1101_SCLK_L() (GPIOC-》ODR&=~BIT5) //PC5 #define CC1101_GetMISO() (GPIOC-"IDR&BIT7) //PC7 //CC1101 SPI read and write one byte //Without chip selection u8 CC1101_ReadWriteByte (u8 data) { u8 i; u8 temp = 0; for (i = 0; i << 8; i ++) { if (data & 0x80) { CC1101_MOSI_H(); } else { CC1101_MOSI_L(); } data 《》= 1;nop; CC1101_SCLK_H(); //Write data on the rising edge of the clock temp 《》= 1;nop; if(CC1101_GetMISO()) temp ++; CC1101_SCLK_L(); //Read data on the falling edge of the clock } return temp; } /************************************************* ************************************************** ********************** * Function: u8 CC1101_Command (CC1101_CMD_TYPE Cmd) * Function: Send single byte command * Parameter: Cmd; command, see CC1101_CMD_TYPE * Return: the value of the register * Dependence: underlying macro definition * Author: * Time: 2013-12-06 * Last modified time: 2013-12-06 * Description: Directly accessing the command by writing will trigger the response ************************************************** ************************************************** *********************/ u8 CC1101_Command (CC1101_CMD_TYPE Cmd) { u8 status; CC1101_CS_L(); //The chip select is valid while(CC1101_GetMISO()); status = CC1101_ReadWriteByte((u8)Cmd); //Send command while(CC1101_GetMISO()); CC1101_CS_H(); //The chip select is closed return status; } /************************************************* ************************************************** ********************** * Function: u8 CC1101_ReadReg (CC1101_REG_TYPE RegAddr) * Function: Read CC1101 general register * Parameter: RegAddr: register address, see: CC1101_REG_TYPE * Return: the value of the register * Dependence: underlying macro definition * Author: * Time: 2013-12-06 * Last modified time: 2013-12-06 * Description: Read one register at a time ************************************************** ************************************************** *********************/ u8 CC1101_ReadReg (CC1101_REG_TYPE RegAddr) { u8 data; CC1101_CS_L(); //The chip select is valid CC1101_ReadWriteByte ((u8) READ_SINGLE|RegAddr); //Send read command and register index data = CC1101_ReadWriteByte (0xff); //Read CC1101_CS_H(); //The chip select is closed return data; } /************************************************* ************************************************** ********************** * Function: u8 CC1101_WriteReg (CC1101_REG_TYPE RegAddr, u8 data) * Function: Write to CC1101 general register * Parameters: RegAddr: register address, see: CC1101_REG_TYPE, data: data to be written * Return: the value of the status register * Dependence: underlying macro definition * Author: * Time: 2013-12-06 * Last modified time: 2013-12-06 * Description: Write one register at a time and return status Do not write to read-only registers ************************************************** ************************************************** *********************/ u8 CC1101_WriteReg (CC1101_REG_TYPE RegAddr, u8 data) { u8 status; if (RegAddr》 0x80) return 0; //Prevent misoperation, the registers after 0x30 are read-only status registers CC1101_CS_L(); //The chip select is valid while(CC1101_GetMISO()); status = CC1101_ReadWriteByte((u8)WRITE_SINGLE|RegAddr); //Send write command and register index CC1101_ReadWriteByte(data); //Write data CC1101_CS_H(); //The chip select is closed return status; } #include “LED.h†void CC1101_Init (u8 Addr) { //Initialize chip select GPIOx_Init (GPIOA, BIT3, OUT_PP_10M); CC1101_CS_H(); //Initialize SCLK GPIOx_Init (GPIOC, BIT5, OUT_PP_10M); CC1101_SCLK_H(); //Initialize MOSI GPIOx_Init (GPIOC, BIT6, OUT_PP_10M); CC1101_MOSI_H(); //Initialize MISO GPIOx_Init (GPIOC, BIT7, IN_UP); CC1101_SCLK_L(); CC1101_MOSI_L(); //Initialize GDO0, GDO2 corresponds to PC3, PC4 GPIOx_Init (GPIOC, BIT3, IN_UP); GPIOx_Init (GPIOC, BIT4, IN_UP); //Initialize the register CC1101_Command (CC1101_CMD_SRES); //Reset Delay_MS(10); while (CC1101_ReadReg (CC1101_REG_AGCTEST) != 0x3F) //Detect communication { LED_ON(); Delay_MS(10); LED_OFF(); Delay_MS(100); } LED_OFF(); CC1101_WriteReg (CC1101_REG_IOCFG0, 0x06); //Send reminder pin CC1101_WriteReg (CC1101_REG_IOCFG2, 0x01); //Receive reminder pin CC1101_WriteReg (CC1101_REG_FIFOTHR, 0x0f); //RX FIFO and TX FIFO threshold CC1101_WriteReg (CC1101_REG_SYNC1, 0xD3); //Sync words, high byte CC1101_WriteReg (CC1101_REG_SYNC0, 0x91); //Sync word, low byte CC1101_WriteReg (CC1101_REG_PKTLEN, CC1101_DATA_LEN); //data packet length, 255 CC1101_WriteReg (CC1101_REG_PKTCTRL1, 0x04); //Automatic control of data packets CC1101_WriteReg (CC1101_REG_PKTCTRL0, 0x04); //Data packet automatic control CC1101_WriteReg (CC1101_REG_ADDR, 0x00); //device address CC1101_WriteReg (CC1101_REG_CHANNR, 0x00); //channel CC1101_WriteReg (CC1101_REG_FSCTRL1, 0x06); //Frequency synthesizer control, high byte CC1101_WriteReg (CC1101_REG_FSCTRL0, 0x00); //Frequency synthesizer control, low byte CC1101_WriteReg (CC1101_REG_FREQ2, 0x10); //Frequency control vocabulary, high byte CC1101_WriteReg (CC1101_REG_FREQ1, 0xb1); //Frequency control vocabulary, middle byte CC1101_WriteReg (CC1101_REG_FREQ0, 0x3b); //Frequency control vocabulary, low byte //2.4KBPS CC1101_WriteReg (CC1101_REG_MDMCFG4, 0xF6); //modulator configuration CC1101_WriteReg (CC1101_REG_MDMCFG3, 0x83); //modulator configuration CC1101_WriteReg (CC1101_REG_MDMCFG2, 0x13); //modulator configuration CC1101_WriteReg (CC1101_REG_MDMCFG1, 0x22); //modulator configuration CC1101_WriteReg (CC1101_REG_MDMCFG0, 0xf8); //modulator configuration CC1101_WriteReg (CC1101_REG_DEVIATN, 0x15); //The modulator deviates from the setting CC1101_WriteReg (CC1101_REG_MCSM2, 0x07); //Main communication control state machine configuration CC1101_WriteReg (CC1101_REG_MCSM1, 0x30); //Main communication control state machine configuration CC1101_WriteReg (CC1101_REG_MCSM0, 0x18); //Main communication control state machine configuration CC1101_WriteReg (CC1101_REG_FOCCFG, 0x16); //frequency offset compensation configuration CC1101_WriteReg (CC1101_REG_BSCFG, 0x6c); //Bit synchronization configuration CC1101_WriteReg (CC1101_REG_AGCTRL2, 0x03); //AGC control CC1101_WriteReg (CC1101_REG_AGCTRL1, 0x40); //AGC control CC1101_WriteReg (CC1101_REG_AGCTRL0, 0x91); //AGC control CC1101_WriteReg (CC1101_REG_WOREVT1, 0x87); //High byte time 0 pause CC1101_WriteReg (CC1101_REG_WOREVT0, 0x6b); //low byte time 0 pause CC1101_WriteReg (CC1101_REG_WORCTRL, 0xfb); //electromagnetic wave activation control CC1101_WriteReg (CC1101_REG_FREND1, 0x56); //Front end RX configuration CC1101_WriteReg (CC1101_REG_FREND0, 0x10); //Front end TX configuration CC1101_WriteReg (CC1101_REG_FSCAL3, 0xe9); //frequency synthesizer calibration CC1101_WriteReg (CC1101_REG_FSCAL2, 0x2a); //frequency synthesizer calibration CC1101_WriteReg (CC1101_REG_FSCAL1, 0x00); //frequency synthesizer calibration CC1101_WriteReg (CC1101_REG_FSCAL0, 0x1f); //frequency synthesizer calibration CC1101_WriteReg (CC1101_REG_RCCTRL1, 0x41); //RC oscillator configuration CC1101_WriteReg (CC1101_REG_RCCTRL0, 0x00); //RC oscillator configuration CC1101_WriteReg (CC1101_REG_FSTEST, 0x59); //frequency synthesizer calibration control //10DB //CC1101_WriteReg (CC1101_REG_PATABLE0, 0xc0); //CC1101_WriteReg (CC1101_REG_PATABLE1, 0xc0); /*CC1101_WriteReg (CC1101_REG_PATABLE2, 0xc0); CC1101_WriteReg (CC1101_REG_PATABLE3, 0xc0); CC1101_WriteReg (CC1101_REG_PATABLE4, 0xc0); CC1101_WriteReg (CC1101_REG_PATABLE5, 0xc0); CC1101_WriteReg (CC1101_REG_PATABLE6, 0xc0); CC1101_WriteReg (CC1101_REG_PATABLE7, 0xc0); */ Delay_MS(10); } /************************************************* ************************************************** ********************** * Function: void CC1101_WriteTxFIFO (u8 *pBuff, u8 len) * Function: Write data to the sending buffer * Parameters: pBuff: pointer of data buffer to be written, len: length of data to be written * Return: None * Dependence: underlying macro definition * Author: * Time: 2014-01-01 * Last modified time: 2014-01-01 * Description: Write data to send FIFO ************************************************** ************************************************** *********************/ void CC1101_WriteTxFIFO (u8 *pBuff, u8 len) { u16 i; CC1101_CS_L(); CC1101_ReadWriteByte (BURST_WRITE_FIFO); for(i = 0;i "len;i ++) { CC1101_ReadWriteByte(pBuff); } CC1101_CS_H(); } /************************************************* ************************************************** ********************** * Function: void CC1101_ReadRxFIFO (u8 *pBuff, u8 len) * Function: Read receiving buffer * Parameters: pBuff: the pointer of the data buffer to be read, len: the length of the data to be read * Return: None * Dependence: underlying macro definition * Author: * Time: 2014-01-01 * Last modified time: 2014-01-01 * Description: Read data from the receive FIFO ************************************************** ************************************************** *********************/ void CC1101_ReadRxFIFO (u8 *pBuff, u8 len) { u16 i; CC1101_CS_L(); CC1101_ReadWriteByte (BURST_READ_FIFO); for(i = 0;i "len;i ++) { pBuff = CC1101_ReadWriteByte(0xff); } CC1101_CS_H(); } //Send data, send all the data in the buffer //Up to 64B at a time, because it is limited by FIFO void CC1101_RfDataSend (u8 *pBuff, u8 len) { CC1101_Command (CC1101_CMD_SIDLE); //Exit the current mode CC1101_Command (CC1101_CMD_SFTX); //Clear the transmit buffer CC1101_WriteTxFIFO (pBuff, len); //Write data to the sending buffer CC1101_Command (CC1101_CMD_STX); //Start sending data while (! CC1101_GDO0); while(CC1101_GDO0); CC1101_Command (CC1101_CMD_SIDLE); //Exit the current mode } //Send data packet //Up to 65B for each transmission, the first byte is the length, more data will be sent repeatedly //Can send any size //CC1101PackSize effective data packet size, 0-64, which is the data size of a single transmission of CC1101 -1 void CC1101_RfDataSendPack (u8 *pBuff, u16 len) { u16 i, m, n, j; m = len / (CC1101_DATA_LEN-1); //Number of integer data frames n = len% (CC1101_DATA_LEN-1); // remainder //Send integer packet for (i = 0;i "m;i ++) { Delay_MS(1); CC1101_Command (CC1101_CMD_SIDLE); //Exit the current mode CC1101_Command (CC1101_CMD_SFTX); //Clear the transmit buffer CC1101_CS_L(); CC1101_ReadWriteByte (BURST_WRITE_FIFO); CC1101_ReadWriteByte (CC1101_DATA_LEN-1);//Write the packet size first for (j = 0; j << (CC1101_DATA_LEN-1); j ++) { CC1101_ReadWriteByte(*pBuff++); //Write data to the sending buffer } CC1101_CS_H(); CC1101_Command (CC1101_CMD_STX); //Start sending data while (! CC1101_GDO0); while (CC1101_GDO0); //Wait for sending completion } //Send the remainder package if (n!=0) { Delay_MS(1); CC1101_Command (CC1101_CMD_SIDLE); //Exit the current mode CC1101_Command (CC1101_CMD_SFTX); //Clear the transmit buffer CC1101_CS_L(); CC1101_ReadWriteByte (BURST_WRITE_FIFO); CC1101_ReadWriteByte(n); //Write the packet size first for(j = 0;j << n;j ++) { CC1101_ReadWriteByte(*pBuff++); //Write data to the sending buffer } CC1101_CS_H(); CC1101_Command (CC1101_CMD_STX); //Start sending data while (! CC1101_GDO0); while (CC1101_GDO0); //Wait for sending completion } CC1101_Command (CC1101_CMD_SIDLE); //Exit the current mode } //Read chip status u8 CC1101_GetStatus(void) { return CC1101_WriteReg (CC1101_REG_TEST2, 0x98); } This is the end of the related introduction about cc1101. If you have any deficiencies, please correct me. Related reading recommendations: understand the difference between CC110L and CC1101 in one article Related reading recommendations: the difference between the wireless chip CC1100 and CC1101
Household Lighting Led Driver
A comprehensive series of Office lightings drivers, suitable for use in a range of household Lighting applications, including livung room Lighting, Kitchen Lighting, bathroom Lighting, Entertainment Lighting, etc. We have skilled engineers to answer all your questions and enquiries and provide all-round solutions basis on your project(s) and provide technical supporting.
Specifically for household light, As long as the home for the panel lights, lamps and the like, indoor waterproof LED driver.Europe and the United States with the earlier, energy-saving environmental awareness earlier, widely popular.Home, then the safety performance requirements are relatively high, high voltage short circuit protection.
Parameter:
Input voltage: 100-277vac / 100-240vac / 100-130vac / 180-240vac / 100-347V
FAQ: Ceiling Light Panels Drivers,Led Light Fixtures,Led Ceiling Lights Driver ShenZhen Fahold Electronic Limited , https://www.fahold.net
output voltage: 25-40vdc / 27-42vdc / 35-45vdc / 50-70vdc / 12Vdc / 24vdc
current: 100mA-8000mA.
Power factor: >0.9
Dimming:0-10V / PWM / RX / DALI.
>=50000hours, 3-5 years warranty.
certificate: UL CE FCC TUV SAA ect.
What's the benefits of Fahold Driver?
Question 1:Are you a factory or a trading company?
Answer: We are a factory.
Question 2: Payment term?
Answer: 30% TT deposit + 70% TT before shipment,50% TT deposit + 50% LC balance, Flexible payment
can be negotiated.
Question 3: What's the main business of Fahold?
Answer: Fahold focused on LED controllers and dimmers from 2010. We have 28 engineers who dedicated themselves to researching and developing LED controlling and dimming system.
Question 4: What Fahold will do if we have problems after receiving your products?
Answer: Our products have been strictly inspected before shipping. Once you receive the products you are not satisfied, please feel free to contact us in time, we will do our best to solve any of your problems with our good after-sale service.