Home Articles Energy savings with AVR128DB microcontrollers

Energy savings with AVR128DB microcontrollers

microchip microcontroller

New capabilities for core-independent peripherals on Microchip circuits.

  • Event System
  • Configurable Logic Cell
  • Zero Cross Detector
  • advanced watchdog
  • Cyclic Redundancy Check (CRC/SCAN)

Currently, 32-bit chipsets have the largest share of the embedded microcontroller market, but systems with 8-bit and 16-bit cores are also often used. Microcontrollers of this type are built using well-known cores that, thanks to their long presence on the market, have been extensively tested and refined. The tools for these microcontrollers have also been improved over the years and the designer now has a set of excellent compiler and function libraries, greatly improving the software development process. In modern systems, additional functionality is also implemented, expanding the range of applications in which microcontrollers can be used.

A major factor contributing to the continued development of "simpler" 8- and -16-bit microcontrollers is the market for Internet of Things applications (Internet of Things, IoT). Due to the large number of devices and applications that operate in this segment, the systems face the requirements of low electrical demand. This applies in particular to smart sensors with wireless connectivity, wearable devices, information systems that replace traditional price tags in stores, beacons, etc. Very often devices of this type are battery operated and users require maximum working time without having to replace the battery. In these applications, 8- and 16-bit microcontrollers are unmatched, which can be easily put (and quickly woken up) in a low-power mode, in which their periphery and/or core are in power-saving mode and they are activated / awakened only in the time necessary to perform the necessary actions.

In modern microcontrollers, peripheral modules are used that can function independently of the CPU and perform certain tasks (which in the traditional sense were performed with the participation of the CPU in software) independently and in hardware. This promotes low power consumption and frees up the computing power of a relatively small microcontroller, the core of which can be used to perform key tasks from an application's point of view. Using these modules shortens the development time of a new new application. Furthermore, such peripheral modules, of various types, implemented in microcontrollers, can be internally combined into larger blocks that allow the implementation of more complex functions. To make it easier for the designer to configure peripheral modules that work independently of the kernel (kernel-independent peripherals, CIP), the vendor provides tools with a user-friendly graphical interface. Microcontrollers with the aforementioned characteristics could not be missing from the offer of the company Microchip.

microcontroller microchip family
AVR128DB family microcontroller in TQFP48 housing

AVR128DB

The AVR128DB family of microcontrollers combines the performance of a low-power AVR® core with a set of Core Independent Peripherals (CIPs) and a host of onboard analog peripherals. The ability to work with a supply voltage of 5V increases immunity to interference.

In the following, we will mainly discuss the CIP peripherals available in the AVR128DB series, although the functionality of the systems themselves is much greater. In microcontrollers of the AVR128DB family we can find, among others, A/D converters and 10-bit DACs (that is, D/A converter), RTC system (real time clock), PWM generators (including 12-bit TCB generators). adapted to work on power systems), USART hardware, SPI and TWI interfaces), reference voltage sources useful for accurate measurements, comparators, the ability to generate external interrupts on all I/O pins. AVR128DB circuits are also equipped with built-in operational amplifiers (up to 3 pieces). Combined with analog-to-digital converters, they allow extensive and precise processing of input signals. Microcontrollers also have an I/O port adapted to work with various logic levels (from 1.8V to 5.5V), thus making the use of external converters unnecessary, which is the next step on the road to miniaturization and circuit energy efficiency, systems manufactured by Microchip will be used. We recommend that you familiarize yourself with the complete offer.

Event System

Event System is a powerful microcontroller kernel downloader. It allows you to set simple dependencies between events. Conditional statements will be executed without the kernel (or even wake it up). An example is button operation independent of program code. Exceeding the potential difference set on the comparator can result, for example, in activating the transducer on a specific pin, starting to count, etc. Such functionality reduces the amount of code necessary for the operation of the device and increases the reaction speed of the entire microcontroller.

Configurable Logic Cell

Configurable CLC logic blocks are a similar feature, also active in reduced power consumption mode. It allows you to perform logical operations on signals from external and internal sources (counter, register) and transfer the result of the operation to one of the peripherals or output pins. This avoids the use of conditional statements in your program code. The CLC module performs the functions of logic gates (AND, OR, XOR, NOT, and their combinations), latches, or flip-flops without the power-consuming activation procedure.

Zero Cross Detector

The ZCD module is used to trigger interrupts when the AC signal exceeds the threshold at zero potential (relative to the GND of the microcontroller). The system built into the microcontroller can sample the voltage directly from the power line; the only passive element needed in this case will be a series-connected current-limiting resistor and (optionally) a pull-up resistor. An equivalent analog circuit would require many more components. ZCD functionality allows for effective triac control (light dimming, heating regulation), power quality monitoring (period metering), or limiting EMI disturbances in circuits that control the power supply of a given device with alternating current (on when the sine wave is close to zero, eliminating sudden voltage jumps and the electromagnetic disturbances they generate). Additionally, the periphery can be configured to signal a specific type of overshoot (rising curve, falling curve, or both). The ZCD signal does not need to be programmed and can be sent to one of the microcontroller's I/O pins.

advanced watchdog

Even the best-designed digital circuitry that works without errors and repeatedly revised code can "crash." This problem can occur for many reasons, sometimes unrelated to the functions performed by the code. It may exceed the allowable operating temperature or a disturbance in the power line. The basic protection against such situations are Watchdog Counters (WDT), which work independently of the executed program. In case the instruction takes longer than expected to execute, WDT resets the microcontroller. In the case of the AVR128DB family, it is possible to program a “time zone” (Window Mode Watchdog Timer, WWDT), in which the program will be executed. In the case of such a check, the operation of the device will be interrupted and restarted from the very beginning, both in the case of too long and too short a period between responses from the kernel. In the latter case, it is possible that part of the instruction was not executed with negative consequences, especially if the omitted operation block was directly related to the protection of the circuit or device operator (for example, a limit switch signal unnoticed).

Cyclic Redundancy Check (CRC/SCAN)

The generation and verification of a checksum is a commonly used method to ensure efficient communication between systems in microprocessor systems. Unfortunately, the software implementation of such verification consumes a lot of computing power of the systems involved and, moreover, can slow down their work. Especially with 8-bit drives running at a limited frequency (to save power). The latest microcontrollers from Microchip (both PIC and AVR) have been equipped with peripherals that automatically generate a checksum (even in the form of a 32-bit polynomial) and place it in a program-accessible register. The functionality known as SCAN allows the CRC system to directly access the microcontroller's memory, which also improves work with checksums.

An example of the use of CIP modules in specific applications and the benefits that their use brings when creating circuits that implement complex functionalities are shown below in the videos prepared by the manufacturer.

Content produced by Transfer Multisort Elektronik Sp. z oo

Original source of text: https://www.tme.eu/es/news/library-articles/page/43645/Ahorro-energetico-con-microcontroladores-AVR128DB/