Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering

CC1020 Microcontroller Interfacing

By Texas Instrument

 

The CC1020 RF transceiver is very easy to interface with a microcontroller. The chip is configured using a four-wire bus, comprising of PCLK, PDI, PDO and PSEL signals. Data interfacing is done via the DCLK and DIO pins. Data decision and synchronization is done by the CC1020, easing the workload of the microcontroller considerably. Using the synchronous Manchester or NRZ modes, the CC1020 supplies a synchronous clock, which can be used for triggering interrupts in the microcontroller, or for interfacing with a synchronous serial interface. This application note covers interfacing the CC1020 to microcontrollers. Information is given about both the configuration and data interfaces of the CC1020.

 

Microcontrollers in General

A vast variety of microcontrollers (MCUs) exist today, from small 4-bit controllers up to powerful 32-bit controllers with processing power rivalling modern PCs. Digital signal processors (DSPs) are also used as controllers in some applications.

The CC1020 can be easily interfaced with any microcontroller on the market. The only requirement is to have enough I/O pins. To configure the CC1020, four I/O pins are required (one input and three output pins). The pins connected to PDI, PDO and PCLK can be shared with other circuitry, provided these circuits are not active when the configuration interface is active. The PSEL signal must be driven by pin dedicated only to interfacing the CC1020. For the data interface, two I/O pins are required, one bi-directional for DIO and one input for DCLK. The pin used to interface with DCLK should be able to generate an interrupt on signal Edges.

Overview of CC1020 RF Transceiver interfacing with any Microcontroller

Fig. 1: Overview of CC1020 RF Transceiver interfacing with any Microcontroller

In power-down mode, the CC1020 pins assume the following states:

Table showing Pin modes of CC1020 RF Transceiver

Fig. 2: Table showing Pin modes of CC1020 RF Transceiver

 

Configuration Interface

The CC1020 is configured using the PCLK, PDI, PDO and PSEL signals. This is discussed in detail in the CC1020 data sheet. The configuration registers are also readable, so that the user can verify settings and read out status bits.

Using general-purpose I/O pins to handle an interface in this way is often called “bit banging”. This approach is very flexible, as the user is free to use any I/O pins on the microcontroller, but can be slow when working with a slow microcontroller.

The alternative is to use a synchronous serial interface to interface with the CC1020. An SPI master interface or some types of USART (Universal Synchronous/Asynchronous Receiver/Transmitter) are suitable. A free general I/O pin must be used to interface with the PSEL pin of the CC1020. Please note that some microcontroller manufacturers use different terminologies when naming the signals. MOSI stands for master out, slave in, while MISO stands for master in, slave out. The other standard SPI signals are SCK (Serial Clock) and SS (Slave select.

Overview of CC1020 RF Transceiver interfacing through SPI interface

Fig. 3: Overview of CC1020 RF Transceiver interfacing through SPI interface

A USART or other synchronous serial interface can be suitable for use as well, study the datasheet for the microcontroller to see if it can be configured to be compatible with the CC1020.

The biggest advantage of using a hardware interface is that it can be much faster; in many cases the configuration can be performed with a clock rate of several MHz. This is especially important in frequency hopping applications, where configuration must occur in the blanking interval, which should be as short as possible.

Configuration Procedure

Chipcon recommends resetting the CC1020 (by clearing the RESET_N bit in the MAIN register) when the chip is first powered up. All registers that need to be configured should then be programmed (those which differ from their default values). Registers can be programmed freely in any order. The CC1020 should then be calibrated in both RX and TX mode. After this is complete, the CC1020 is ready for use. See the datasheet for detailed procedure flowcharts.

SmartRF® Studio and the example code written by Chipcon assumes that frequency register A is used for the RX frequency, and frequency register B is used for the TX frequency. This makes it easy to switch between RX and TX mode by programming the MAIN, ANALOG (and INTERFACE if squelch enabled) registers.

Data Interface and Microchip PIC16 Example

Data Interface

When using the Synchronous Manchester or the Synchronous NRZ mode, the DCLK pin on the CC1020 should be connected to an MCU input pin that can generate an interrupt in the MCU. DIO should be connected to a bi-directional MCU I/O pin.

In TX mode, the interrupt should be triggered on the falling edge of DCLK. When the interrupt occurs, write the next bit to be transmitted to the I/O pin. In RX mode, the interrupt should be triggered on the rising edge of DCLK. When the interrupt occurs, read the data from the I/O pin.

Note that data transferred to/from the MCU is always NRZ coded, regardless of whether Synchronous NRZ or Synchronous Manchester mode is selected. The mode setting only affects the signal modulated onto the RF carrier. The Manchester encoding/decoding is performed by the CC1020.

A clock signal is output on DCLK as long as DCLK squelch is disabled on the CC1020. If transmissions are intermittent, the DCLK squelch function should be used to determine whether valid data is received. The squelch must be disabled in TX-mode in order NOT to mute the DCLK.

A preamble of alternate ones and zeros must be used regardless of which mode the CC1020 is in. See the datasheet for details regarding minimum length of the preamble.

Microchip PIC16 Example

This example is written for the PIC16F876 microcontroller, using the RF Modem hardware. See [1] for more information about the hardware.

cc1020pic.c provides a library of routines for configuring the CC1020. cc1020.h contains definitions for all of the CC1020’s registers. There are two versions of the low-level configuration routines, one using general-purpose I/O and one using the SPI interface built into the PIC. If the symbol ‘SPI’ is defined, the SPI versions are used, if not, the general purpose I/O routines are used.

A short description of the routines in the library follows:

Table showing Pin Configuration of CC1020 RF Transceiver

Fig. 4: Table showing Pin Configuration of CC1020 RF Transceiver

When the system is initially turned on, the CC1020 should first be reset. The registers can then be programmed to the settings used in the system. The CC1020 should be calibrated in both RX and TX modes before system operation takes place. For details, see the CC1020 data sheet. All source code can be downloaded from the Chipcon website.


Filed Under: Electronic Projects
Tagged With: calibration, CC1020, Configuration interface, Data interface, Example code, Microchip PIC, microcontroller, PIC16F876 microcontroller
 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Designing Gate Driver Circuit and Switching Mechanism for Modified Sine Wave Inverter – (Part 9/17)
  • Completing Modified Sine Wave Inverter Design with Full Bridge Circuit and Step Up Transformer – (Part 10/17)
  • Designing an Offline UPS – Part (12 /17)
  • How to reduce Switching Time of a Relay – (Part 15/17)
  • Testing MOSFET – (Part 16/17)
  • Driving High Side MOSFET using Bootstrap Circuitry – (Part 17/17)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • MicroPython – I2C protocol in ESP8266 and ESP3
  • New automotive radar sensor enables reliable in-cabin monitoring system
  • TI breaks ground on 300-mm semiconductor wafer-fabrication plants in Texas
  • New wireless AR Smart Viewer reference design
  • Infineon launches scalable and wireless charging platform with configurable controllers

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd ldr led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • What's the deal with all these "MPPT" IC's with no current sense?
  • Photovoltaic MOSFET Drivers - Voltage Rating
  • Impedance requirement for SDRAM signals
  • A circuit that can adjust a resistance and probing a voltage node
  • A analogue circuit that spit out the resistance desired

RSS Electro-Tech-Online.com Discussions

  • IRS2453 the H circuit
  • Ampro 16mm Stylist projector woes.
  • How to quickly estimate lead acid battery capacity ?
  • Finally switched to Linux.
  • Multistage BJT amplifier
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
  • Women in Engineering