Home Articles PIC and AVR microcontrollers facilitate node development on the...

PIC and AVR microcontrollers facilitate node development at the edge

microchip microcontrollers

Author ross satchell

When designing robust edge nodes, the embedded system designer often has to consider these four main factors:

  • sensor interface
  • Low power consumption
  • physical size
  • Security

Microchip Technology offers microcontrollers with a wide input voltage range from 1,8 to 5,5V, making them very valuable in noisy environments because signals can be differentiated from background noise by their ability to source or sink up to 50mA on each GPIO pin, as well as industrial (-40°C to 85°C) and extended (-40°C to 125°C) temperature ranges.

Let's look at these four factors in more detail.

sensor interfaces

Sensor interfaces can be of various types. The embedded system designer typically uses: analog sensors that provide a continuously varying voltage or current, digital sensors that can use logic levels or data streams such as serial communications, variable Pulse Width Modulation (PWM) as sensors throttle position sensors or time-of-flight sensors to detect distances. Let's study them more carefully.

analog sensor interfaces

Having the option to choose between discrete analog or integrated analog devices means the user can select the right analog tool for their application. By using larger process technology on our silicon wafers, the integrated analog peripheral is much less susceptible to crosstalk, as well as inductive or capacitive noise, which increases when manufacturers adopt much smaller process technologies. Microchip's integrated analog peripherals are configurable in the same way that the user would configure any other peripheral. The availability of integrated peripherals also allows the user to read them as inputs; for example, the user may want to know the comparator inputs during a particular phase of the program.

Let's look at some of these analog peripherals, starting with op amps.

Integrated operational amplifiers

Microchip's integrated op amps also incorporate the associated passive circuitry, such as the internal resistor ladder that allows programmable gain to be set and even changed during runtime. The op amp configuration can also be changed at runtime, so the user can switch between inverting, non-inverting, unity gain (voltage follower), and custom discrete configurations at runtime, thus offering flexibility. far superior to that of discrete hardware alone, while also minimizing the costs associated with discrete hardware.

When using discrete hardware, the designer is often forced to design their mixed-signal application to be able to handle the worst possible conditions, and this requires sacrificing performance. However, the use of integrated analog peripherals allows the user to add some intelligence to their application, so that the embedded system can change the op-amp gain, settings, or even cascade them on the fly. This means that the user can design his application to optimally adapt to each situation, while taking advantage of the lower consumption of peripherals compared to software-based solutions.

It is necessary to remember that the integrated operational amplifier is not a “magic bullet” and, therefore, it will not always be the most appropriate for all possible applications. For example, if the user is developing an application that demands superior analog performance, a dual power supply configuration, or a specialized variant, they should look to Microchip's wide range of op amps. It's a perfect example of choosing the right tool for the job at hand.

A/D converter (ADC) with advanced functions

Microchip's advanced ADC peripherals incorporate hardware features that have traditionally only been available through software-based drivers, such as accumulation, burst modes, averaging, window comparison, and filtering. As always, these ADC peripherals can use external reference voltages as well as several different internal reference voltages along with autoconversion triggering. As a result, the user can access hardware features that can be used while the CPU is in low-power modes. For example, the user can configure an ADC window comparison that only activates the CPU when the input signal is outside that window, so that the CPU can process that input signal properly. This means that the CPU activates much less, thus saving energy that is vital in low-power applications. This offers the added benefit of reducing system and therefore sensor noise, as digital components such as clocks and PWM can be disabled when in use.

digital sensor interfaces

When an embedded system designer begins to develop an application, they will generally try, as far as reasonably possible, to bundle their sensors and devices around a single voltage. The goal is to decrease the complexity, propagation delay, bill of materials, and printed circuit board footprint costs associated with the use of level shifting circuitry.

MVIO (Multi-Voltage I/O)

MVIO (Multi-Voltage I/O) allows the user to configure an entire I/O port with a second voltage from 1,62V to 5,5V. The MVIO peripheral only uses 500nA when operating, making it ideal for low power applications. The digital response of serial protocols (I2C, SPI, USART), PWM and GPIO operate with the second voltage whose Schmitt trigger levels are adapted based on this second voltage. In addition, the second voltage rail can be divided to serve as the ADC input as a voltage reference.

CLC (Configurable Logic Cell)

The user can configure this peripheral as one of the different logic configurations that, depending on the device, include gates of this type: AND, NAND, AND-OR, AND-OR-INVERT, OR-XOR, OR-XNOR. The user can also select between the following latches and flip-flops: SR latch, JK flip-flop with Reset, D latch synchronized to the clock with Set and Reset, and transparent D latch with Set and Reset. The user can take advantage of Microchip's graphical configuration tools to more easily create custom peripherals based on their application requirements.

This could be as simple as a button debouncer or more complex as a WS2812B individually addressable hardware RGB LED driver, where SPI, PWM and CLC are combined for a custom control peripheral. Drivers for this type of LED, which have traditionally relied on a custom communications protocol, are controlled by software and require a high-speed system clock that places a heavy load on the CPU. However, CIP peripherals (Core Independent Peripherals) allow the system clock to be reduced so that the CPU can spend more time in low-power modes or can even be used to execute other tasks concurrently.

CIPs also provide the user with greater responsiveness when compared to using a CPU. This is because peripheral propagation delay is typically on the order of nanoseconds, while interrupt and other latency due to software-based processing is typically several orders of magnitude higher.

Low power consumption

Microchip's 8-bit microcontrollers offer three low-power modes (sleep), called Idle, Standby, and Power-Down, as well as a Configurable Standby mode in which peripherals can be turned on or off. With all peripherals disconnected and Power-Down mode, the AVR-DB consumes only 700nA, making it ideal for ensuring long battery life in edge-node applications for low-power remote sensing.

The user can use the AVR Event System to send signals between peripherals without activating the CPU. As a result of this, predictable response times between peripherals are obtained, and therefore autonomous control and interaction, as well as synchronizing the actions of the peripherals.

Embedded CIPs are also highly interconnected so that signals can be sent directly between peripherals, which greatly simplifies data transfer between peripherals in order to consume much less power than a software-based design.

physical size

Microchip's range of 8-bit PIC and AVR microcontrollers come in a variety of packages to meet design needs, including PDIP, SOIC, SSOP, VQFN, and TQFP. This provides flexibility when developing the final printed circuit board design. However, it should be noted that the maximum current of the microcontroller may be limited by the power dissipation characteristics of the device package.

Security

Over the past few years there has been a trend from sensor nodes doing all their processing in the cloud to edge nodes doing most of their processing locally before sending the results to the cloud. This lowers the costs of cloud services by reducing frequent two-way data transfers and computational processing, as well as increased consumption at the sensor node due to frequent transfers of more data by sending raw data to Cloud.

Embedded system designers can turn to a low-power 8-bit microcontroller to be used to directly connect to the sensors, while a more powerful 16-bit or 32-bit device can serve to provide the most computational load and most memory that require more complex and secure communications. Reducing the total number of data transfers between the edge node and the cloud service can significantly decrease both cloud costs and battery usage. Additionally, by leveraging a second, more powerful microcontroller in their design, engineers can even introduce machine learning at the edge, making their system design much more powerful in uncovering patterns in data and gaining insights.

Designers can also take advantage of Microchip's secure elements, such as the ATEC608B that uses Elliptic Curve Digital Signature Algorithm (ECDSA) signature-verified authentication for the Internet of Things (IoT) market, making it ideal for sensor nodes. robust at the edge.

Easy-to-use software tools that help reduce development costs

Integrated peripherals allow the user to reduce the complexity of their printed circuit board design, saving valuable floor space and reducing the total number of components on their bill of materials.

This is further simplified with graphical software tools such as MCC/Melody and Harmony to configure peripherals and the system. These tools can be quickly installed and running as they provide a high-level view of the microcontroller and peripheral functions. This means that the user can significantly reduce the time spent studying the data sheets of their microcontrollers. It is ideal for designers when evaluating the features of new or perhaps unfamiliar peripherals, and it generates code that can be used in production or as a handy reference for those who want to develop their own drivers.

All microcontrollers and microprocessors offered by Microchip can be programmed using the MPLABX IDE, which runs on Windows, MacOS and Linux with our range of compilers such as XC8, XC16 and XC32. The designer can debug their application without leaving the IDE and can use the Data Visualizer to connect to the Data Gateway Interface (DGI) and serial ports, as well as extract information on a terminal or generate a graph of data values ​​over time. over time. The Data Visualizer can also be used with Microchip's Power Debugger, which has two independent measurement channels and can supply up to 100mA between 1,6V and 5,5V to power the device and measure from 100nA on the high resolution channel. This makes the Power Debugger ideal for optimizing low-power, battery-powered applications for years.

The device data sheet and other useful documentation can be consulted through the MPLABX Kit Window. Each data sheet covers a family of devices, allowing devices in a family to be compared to identify those that best meet the design requirements. Among these requirements are memory, RAM, the type and number of peripherals, including supported serial protocols and CLCs (Configurable Logic Cells). If a PIC development board or AVR Curiosity Nano is used, the user can also access the Curiosity Nano user guide, code samples on GitHub, schematics, and Altium project files from the Kit Window.

microcontrollers

Figure 1: MPLABX IDE Window Kit for Curiosity Nano with external links and layout files.

Easy-to-use hardware tools for programming and debugging

Microchip offers several hardware tools for evaluating a microcontroller, such as Curiosity Nano development boards, which can be used with the Curiosity Nano Base board to facilitate the use of any daughter board via MikroBUS sockets. All this greatly simplifies the development of a prototype or a proof of concept. When the designer begins to develop a custom printed circuit board for his application, he can program and debug his application with the PICKit programmer debugger.

Conclusion

With Microchip's range of 8-bit PIC and AVR microcontrollers, embedded systems engineers can develop robust, low-power sensor nodes more easily and quickly than ever before, with fewer compromises. Designers can take advantage of a powerful set of Core Independent Peripherals (CIPs), including the creation of custom peripherals, as well as utilize hardware features that have hitherto required high-power CPUs, all while remaining in a low-power mode ( sleep). With PIC and AVR microcontrollers, Microchip makes developing remote-sensing, cloud-connected, and machine learning nodes easier than ever.