Driving Innovation in 32-bit Embedded Designs with Standard MCU Peripherals

Similar documents
Selecting the Right MCU Can Squeeze Nanoamps out of Your Next Internet of Things Application

USB Audio Simplified

AN111: Using 8-Bit MCUs in 5 Volt Systems

Design Challenges for Adding Relative Humidity Sensors

USER GUIDE EDBG. Description

AN4646 Application note

AN962: Implementing Master-Slave Timing Redundancy in Wireless and Packet- Based Network Applications

Serial Communications

Digital Isolator Evolution Drives Optocoupler Replacement

DAC Digital To Analog Converter

Wireless Microcontrollers for Environment Management, Asset Tracking and Consumer. October 2009

Figure 1. 8-Bit USB Debug Adapter

Glitch Free Frequency Shifting Simplifies Timing Design in Consumer Applications

AN862. OPTIMIZING Si534X JITTER PERFORMANCE IN NEXT GENERATION INTERNET INFRASTRUCTURE SYSTEMS. 1. Introduction

STM32L. Ultra-low-power Cortex -M3 devices

Atmel Norway XMEGA Introduction

Serial Communications

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

CHAPTER 11: Flip Flops

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Designing an Induction Cooker Using the S08PT Family

Introduction the Serial Communications Huang Sections 9.2, 10.2 SCI Block User Guide SPI Block User Guide

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

Chapter 9 Latches, Flip-Flops, and Timers

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

ZigBee Technology Overview

AN486: High-Side Bootstrap Design Using ISODrivers in Power Delivery Systems

UG103.8: Application Development Fundamentals: Tools

UG103-13: Application Development Fundamentals: RAIL

AN952: PCIe Jitter Estimation Using an Oscilloscope

AT15007: Differences between ATmega328/P and ATmega328PB. Introduction. Features. Atmel AVR 8-bit Microcontrollers APPLICATION NOTE

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

SMARTCARD XPRO. Preface. SMART ARM-based Microcontrollers USER GUIDE

Hello, and welcome to this presentation of the STM32L4 reset and clock controller.

AN655 R ANGE TEST APPLICATION FOR EZRADIO AND EZRADIOPRO. 1. Introduction. 2. Supported Radio Types

UG129: ZigBee USB Virtual Gateway Reference Design (RD ) User's Guide

DS1621 Digital Thermometer and Thermostat

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

VADC Versatile Analog to Digital Converter. XMC Microcontrollers August 2014

Elettronica dei Sistemi Digitali Costantino Giaconia SERIAL I/O COMMON PROTOCOLS

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

AND8336. Design Examples of On Board Dual Supply Voltage Logic Translators. Prepared by: Jim Lepkowski ON Semiconductor.

Implementing SPI Communication Between MSP430 G2452 and LTC ADC

Design and Verification of Nine port Network Router

The Energy Harvesting Tipping Point for Wireless Sensor Applications

Tutorial for MPLAB Starter Kit for PIC18F

LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES

Using Altera MAX Series as Microcontroller I/O Expanders

Flexible Active Shutter Control Interface using the MC1323x

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

The Heartbeat behind Portable Medical Devices: Ultra-Low-Power Mixed-Signal Microcontrollers

Chapter 13. PIC Family Microcontroller

Building Blocks for PRU Development

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

STEPPER MOTOR SPEED AND POSITION CONTROL

Continuous-Time Converter Architectures for Integrated Audio Processors: By Brian Trotter, Cirrus Logic, Inc. September 2008

APPLICATION NOTE Atmel AT02509: In House Unit with Bluetooth Low Energy Module Hardware User Guide 8-bit Atmel Microcontroller Features Description

PAC52XX Clock Control Firmware Design

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Application Note 83 Fundamentals of RS 232 Serial Communications

8051 MICROCONTROLLER COURSE

Overcoming Challenges of Connecting Intelligent Nodes to the Internet of Things

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

DS1621 Digital Thermometer and Thermostat

Gecko. Energy-friendly microcontrollers for the IoT. Gecko MCUs Complete portfolio of energyfriendly 32-bit microcontrollers PRODUCT SELECTOR GUIDE

GTS-4E Hardware User Manual. Version: V1.1.0 Date:

The Secrets of RS-485 Half-duplex Communication

Hello, welcome to this presentation of the low power timer, or LPTMR, module for Kinetis MCUs. In this session you ll learn about the LPTMR, it s

Eliminate Risk of Contention and Data Corruption in RS-485 Communications

Timer A (0 and 1) and PWM EE3376

How to design and implement firmware for embedded systems

The new 32-bit MSP432 MCU platform from Texas

LoRa FAQs. 1 of 4 Semtech. Semtech Corporation LoRa FAQ

Figure 1. Proper Method of Holding the ToolStick. Figure 2. Improper Method of Holding the ToolStick

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

ARM Ltd 110 Fulbourn Road, Cambridge, CB1 9NJ, UK.

TURBO PROGRAMMER USB, MMC, SIM DEVELOPMENT KIT

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

PART B QUESTIONS AND ANSWERS UNIT I

Real-time Operating Systems Lecture 27.1

Counters and Decoders

Single Phase Two-Channel Interleaved PFC Operating in CrM

Monitoring of Intravenous Drip Rate

The modular concept of the MPA-3 system is designed to enable easy accommodation to a huge variety of experimental requirements.

Serial port interface for microcontroller embedded into integrated power meter

Debouncing Switches. Mechanical switches are one of the most common interfaces to a uc.

In-Vehicle Networking

AVR131: Using the AVR s High-speed PWM. Introduction. Features. AVR 8-bit Microcontrollers APPLICATION NOTE

Design of an Insulin Pump. Purpose of an Insulin Pump:

AVR125: ADC of tinyavr in Single Ended Mode. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AN803. LOCK AND SETTLING TIME CONSIDERATIONS FOR Si5324/27/ 69/74 ANY-FREQUENCY JITTER ATTENUATING CLOCK ICS. 1. Introduction

The Programming Interface

DS Wire Digital Thermometer and Thermostat

AN580 INFRARED GESTURE SENSING. 1. Introduction. 2. Hardware Considerations

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

M25P05-A. 512-Kbit, serial flash memory, 50 MHz SPI bus interface. Features

AXI Performance Monitor v5.0

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

Transcription:

Driving Innovation in 32-bit Embedded Designs with Standard MCU Peripherals Today s 32-bit microcontroller (MCU) designs integrate a wide variety of standard peripherals, such as analog-to-digital converters (ADCs), digital-to-analog converters (DACs), universal synchronous/asynchronous transmitters (USARTs) and timers. While this peripheral integration is intended to address a wide range of general-purpose applications, embedded developers commonly consider these on-chip peripherals to be check box items, and the implementation of this peripheral integration usually ends up providing limited value. In addition, the lack of smart interconnectivity among peripherals often forces designers to add significant amounts of glue logic to ensure proper use of the MCU s features, resulting in unnecessary incremental development costs and system complexity. Standard microcontroller peripherals are intended to support a broad range of general-purpose embedded applications. However, peripherals often are integrated into 32-bit microcontroller designs with little or no thought about how they can enable a more cost-effective or simpler application implementation. Let s take a closer look at implementations of standard microcontroller peripherals that provide system-level value and application benefits that help designers get the most out of every feature in the microcontroller while simultaneously reducing the bill of materials (BOM) and simplifying the embedded design. Innovative implementations of standard microcontroller peripherals, such as I/O with deterministic pulse generation and level shifters, USART input noise-filtering for reliable communications, capacitive-sense tamper detection systems, current-based communication using interconnecting digitalto-analog converters (IDACs) and synchronous current-to-voltage converter systems, can provide significant value for 32-bit embedded designs. I/O with Deterministic Pulse Generation and Level Shifters Some 32-bit applications require the generation of one or more pulses with precisely-controlled pulse widths. Examples include a trigger for an external event or a test pulse to stimulate an external device within a specific time window. A typical software-implemented I/O toggle cannot guarantee the pulse width since the software is subject to interruptions and latencies, and using a timer consumes a valuable and typically pin-constrained resource. An innovative solution to this design challenge implements pulse generation at the I/O level. This system provides the capability to set the initial and final value of the I/O in one 32-bit register (allowing the initial and final value to be set in a single 32-bit word write) along with a mask register to enable multiple pins at any time and a programmable 5-bit delay time. Once initiated, the pulse generator waits for a number of peripheral clock cycles set by the delay time before driving the pre-programmed final value onto the I/O pin, enabling simple yet effective deterministic pulse generation. Figure 1 shows a practical implementation of this feature at the register level. Silicon Laboratories, Inc. Rev 1.0 1

PBCFG0_CONTROL0: Global Port Control Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 PGDONEF Reserve PGTIMER Reserve R R R Reset 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 INT1EN Reserve INT1MD INT1POL INT1SEL INT0EN Reserved INTOMD INT0POL INT0SEL Reset 0 0 0 0 0 0 0 0 0 0 PGTIMER holds the time delay between the pin transitions. PGDONEF indicates when the time has expired. PBSTDn_PBPGEN: Pulse Generator Pin Enable Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 Reserved Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Reset 0 0 0 0 0 0 0 PBPGEN 0 0 0 0 0 0 0 0 0 PBPGEN enables the pulse generator in the corresponding port bank pins. Multiple I/Os can provide pulse generation functionality if required. PBSTDn_PBPGPHASE: Pulse Generator Phase Bit 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 PBPGPH1 Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 PBPGPH0 Reset 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PBPGPH1 holds the logic level for phase 1. PBPGPH0 holds the logic level for phase 0, when pulse generation enabling writing to this register will trigger the beginning of the pulse. The value in PBPGPH0 will be applied to enable pins immediately, and when the pulse generator counter (PGTIMER) times out, the enable pins will be set to the value in PBPGPH1. Figure 1. Pulse Generation Register Implementation 3 V-to-5 V Level Shifting Another common challenge in factory automation and industrial control applications is interfacing with legacy 5 V I/O systems. While a 5 V-tolerant I/O provides a means of receiving input from 5 V outputs, bidirectional communication requires the capability to drive 5 V logic levels. To address this problem, system designers are often forced to add external glue logic, such as external level shifters, increasing PCB layout complexity and BOM cost. An integrated, versatile level shifting system can be achieved by enabling a 3 V I/O and a 5 V drive I/O that are directly interconnected on the same device, thus enabling a 3 to 5 V level shifting capability. This connectivity enables the developer to connect any output peripheral that does not already go to the 5 V drivers through an external wire that can be converted to a 5 V driver. Figure 2 provides an example in which a timer output that is typically in a 3 V domain can be level shifted by externally connecting the timer output to one input of the 3 V I/Os that are internally connected with the 5 V drive. The output of the corresponding 5 V drive output provides a 5 V timer output. Silicon Laboratories, Inc. Rev 1.0 2

Figure 2. Internal Level Shifter System Current-Based Communications Using IDACs Applications developed to support noisy environments, such as factory floors, face the major challenge of providing reliable communications in the presence of high noise levels. Typical communications interfaces, such as USART, SPI and I2C, have proven to offer some level of reliability. However, these applications are always pushed to their limits. One solution is to implement current-based communications using IDACs to enable communications protocols with high levels of noise immunity. To implement this solution, the developer must use a current-mode IDAC. While a typical DAC provides a voltage output through a current output, an IDAC is controlled by a smart timer that can assist in generating the timing sequence for the communications protocol. In addition, a FIFO buffer on the IDAC can generate an interrupt after the FIFO has sent the last word of data, allowing the software to load the FIFO with the next packet of data to be sent, as shown in Figure 3. Timing sequence 10-bit IDAC Current-mode Sync Generator Interrupt is generated when sample 4 has been sent to Data FIFO to enable software routine to load sample values Data FIFO Figure 3. Current-Based Communications Using IDACs Silicon Laboratories, Inc. Rev 1.0 3

Input Filter for Noisy Communications In a typical industrial context, it is relatively common to find communication channels affected by noise. For example, a USART is a typical interface that can be impacted by a noisy environment and thus benefits from a comparator threshold filter used to filter noise from the receiver (RX) path. To implement this system, it is necessary to use a comparator with an N-bit DAC acting as a voltage reference on the negative input. If the device containing this comparator is used in a noisy environment and it has to detect a noisy USART RX signal, the comparator can be used as an RX filter to remove the noise and avoid bad USART data. The USART RX signal coming from the slave device will connect to the selected comparator positive input pin. The N-bit DAC can be used to threshold filter the RX signal, given prior knowledge of the noise in the system. The comparator s asynchronous output is then sent from the device back into the actual USART RX input. This input filter technique is not limited to a USART RX channel. The same technique can be used on any noisy input signal. Figure 4 provides a flow diagram of the signal path to enable a filter mechanism for a UART implementation. Figure 4. Comparator-as-Filter USART Receiver Capacitive Touch for Tamper Detection Many 32-bit microcontroller-based systems used in industrial control or home automation require some level of tamper detection. For example, security cameras use detection of a known number of consecutive dark images as a tamper detection trigger. Other techniques might use external sensors to generate a tamper trigger event. Most 32-bit MCUs have fixed input pins that are either active high or active low and float or switch polarity to indicate a tamper event. An alternative solution uses a capacitive touch-sense engine as a potential multi-channel tamper detection system. For example, the capacitive touch-sense engine built into Silicon Labs ARM-based Precision32 MCUs supports channel bonding and has a maximum of 16 possible input channels supporting up to 16 tamper detection channels in a single conversion. Alternately, using a non-channelbonded mode combined with a programmable threshold, 16 tamper detection channels with independent tamper thresholds on each channel can be implemented with minimal software overhead. This engine can be used to generate a time stamp via an interrupt to the system generating a real-time clock (RTC) trigger event. A typical untampered system can be implemented with tamper detect channels that have a known capacitance, which will be detected. For example, if the capacitive touch-sense node is connected to a closed door monitored by a security system, you would expect the capacitance to be X pico farads (pf). If the door is opened, the capacitance will be less than X pf. In this scenario, the capacitive touch-sense module can be configured to generate an interrupt that then triggers the system to time-stamp the event in software by reading the RTC timer register at this time. There will be a few cycles of latency, but given the frequency of the RTC and the operating frequency of the system, the human scale timing of this event Silicon Laboratories, Inc. Rev 1.0 4

will, for all intents and purposes, look like a zero-time event. The capacitive touch-sense module also supports a greater than threshold event trigger, so the opposite of the closed door system can also be implemented (i.e., an open door system). Given the multi-sampling capability of the capacitive touchsense module, multiple samples can be taken and accumulated to filter out false triggers. The capacitive touch-sense capability can also function in sleep mode to enable a low-power system. This can be accomplished by setting up the RTC to trigger a certain number of times per second, wake up the system and perform a capacitive touch-sense port scan. Depending on whether a tamper event was detected or not, the system will either continue with post-tamper-related functions or go back to sleep. Synchronous Current to Voltage Converter Systems Many sensors used in factory automation, building control and medical applications, such as pressure sensors, optical sensors, transducers and biosensors, provide a current output instead of a voltage output to achieve greater noise immunity. To properly interface with current output sensors, the design must include a current-to-voltage converter. Typically, an external current sensing system is added to the system, resulting in greater BOM cost, design complexity and challenges in synchronizing measurements based on dynamic excitation references. For example, a biosensor used in a medical glucose meter, outputs tiny current values as a result of a dynamic excitation. A cost-effective implementation of a biosensor interface that requires full synchronization between dynamic excitation and current measurements can be achieved using a synchronized DAC-ADC mechanism. Precision32 MCUs, for example, support this synchronization capability. In addition to providing a full synchronization path between the ADC and DAC, Precision32 MCUs also feature an internal current-to-voltage converter. Figure 5. DAC and ADC Synchronization Based on Current-to-Voltage Converter Figure 5 illustrates the DAC-ADC synchronization mechanism using the current-to-voltage converter. The sample synchronization generator module can generate a synchronous pulse to trigger both the DAC and ADC conversion inputs. The ADC can be configured to either sample synchronously with the DAC output or in a delayed fashion by a fixed number of clock cycles to allow the sensor to process the stimulus input. This enables a fully synchronous measurement system, simplifying the system design and reducing cost by eliminating external components. Conclusion Innovative implementation of standard 32-bit microcontroller peripherals coupled with a highly flexible interconnect architecture enables a wide variety of configurations for embedded systems. The synchronous current-to-voltage converter, input filter for noisy communication and 3 to 5 V level shifting Silicon Laboratories, Inc. Rev 1.0 5

are examples of flexible interconnect architectures. Using versatile I/Os and peripherals, such as capacitive touch, I/O pulse generation and DAC precision enhancement, developers can achieve novel solutions to real-world embedded design problems while reducing cost, simplifying design and accelerating time to market. # # # Silicon Labs invests in research and development to help our customers differentiate in the market with innovative low-power, small size, analog-intensive, mixed-signal solutions. Silicon Labs' extensive patent portfolio is a testament to our unique approach and world-class engineering team. Patent: www.silabs.com/patent-notice 2012, Silicon Laboratories Inc. ClockBuilder, DSPLL, Ember, EZMac, EZRadio, EZRadioPRO, EZLink, ISOmodem, Precision32, ProSLIC, QuickSense, Silicon Laboratories and the Silicon Labs logo are trademarks or registered trademarks of Silicon Laboratories Inc. ARM and Cortex-M3 are trademarks or registered trademarks of ARM Holdings. ZigBee is a registered trademark of ZigBee Alliance, Inc. All other product or service names are the property of their respective owners. Silicon Laboratories, Inc. Rev 1.0 6