Tag Archives: 32-bit

Going hands-on with the now-on-sale Arduino Zero


It’s official! Makers in the U.S. can now buy the 32-bit Arduino board online. 


In addition to a number of other announcements during his Maker Faire Bay Area “State of Arduino” address, Massimo Banzi had finally revealed the dates for the highly-anticipated Zero board to a standing-room only crowd. In fact, MAKE: Magazine would even go on to call it “one of the biggest pieces of news” from this year’s show and tell.

ABX00003_featured_1024x1024

And now available (as of June 15th) for purchase within the United States, here’s a quick refresher on the 32-bit Arduino unit that is bound to become a Maker hit over the summer. While its form factor may share that of the Leonardo, the Zero boasts an Atmel | SMART SAM D21 ARM Cortex-M0+ core, enabling the board to run much faster and pack more of a punch than its 8-bit counterparts.

It’s also worth mentioning that the latest device offers users the ability to easily talk to the cloud, thanks to an increase in bits and clock cycles to deal with what’s coming in and going out. This allows Makers to bring their wildest (and smartest) Internet of Things projects to life. As the Wizard of Make Bob Martin explains, “You can do this with an 8-bit microcontroller, but sometimes with data streams, it’s like drinking from a firehose.”

Ard_ZERO_back_1024x1024

Key hardware specs include 256KB of Flash, 32KB SRAM in a TQFP package and a clock speed of 48MHz. In comparison, the 8-bit Leonardo (ATmega32U4) comes with only 32KB of Flash, 2.5KB of SRAM and merely runs at 16MHz. One its other notable features is the Atmel Embedded Debugger (EDBG), which provides a full debug interface without the need for any supplemental hardware. EDBG supports a virtual COM port that can be used for device programming and traditional Arduino bootloader functionality, and is entirely compatible with Atmel Studio to give users the ability to import their sketches directly and do source-level debugging.

The Zero sports six analog and 14 digital pins, all of which except for the Rx/Tx pins can also serve as PWM pins. Meanwhile, the analog pins have a 12-bit ADC instead of the Leonardo’s 10-bit ADC, significantly improving analog resolution. Though the new board does not have EEPROM, it does support 16KB by emulation. In other words, Arduino sketches relying upon this feature will still run without any hiccups.

Zero

Upon receiving the board, a user may notice that that Zero’s silk includes an additional graphic element: the Genuino logo. (For those who may not know, Genuino — meaning “genuine” in Italian — is Arduino’s global sister brand.)

“We added the Genuino logo to the Arduino Zero to stress its authenticity, and to make it easier for the Arduino community to spot original boards. We are going to include this logo to all genuine Arduino boards from now on,” the crew says.

ZeroGenuino

In tandem with its debut on the Arduino U.S. online store, the team has unveiled the Arduino IDE 1.6.5 with a bunch of enhancements as well as support for the Zero. This version of the incredibly popular IDE will keep the serial monitor open while uploading, an “Open Recent” menu that shows the last five opened sketches and a new modern editor, among many other improved elements.

Interested? Head over to the Zero’s official page here, where the board is currently going for $49.90. As you wait for its arrival, watch below as the Wizard of Make gives MAKE’s Alasdair Allan a hands-on demonstration.

RIOTing with the Internet of Things

RIOT is an open-source operating system (OS) designed to power the rapidly evolving Internet of Things (IoT).

Licensed as LGPL, RIOT was initially developed by FU Berlin, INRIA and the HAW Hamburg. 

Indeed, the origins of RIOT can actually be traced back to FeuerWare, an operating system for fire crews and their wireless sensor networks.

The operating system — which is based on a microkernel architecture — supports both C and C++, as well as full multi-threading and real-time capabilities. RIOT provides utilities like cryptographic libraries, data structures, or a shell, different network stacks, and support for various microcontrollers, radio drivers, sensors, and configurations for entire platforms.

RIOT_network_architecture_dark_updated

The RIOT runs on both 16-bit and 32-bit hardware, with a native port allowing RIOT to run as a Linux or MacOS process. This helps facilitate the use of standard development and debugging tools such as the GNU Compiler Collection (GCC), GNU Debugger, Valgrind and Wireshark. RIOT runs on several platforms including embedded devices as well as common PCs, and supports multiple drivers, which offers out-of-the-box usage. The hardware dependent code is reduced to a minimum and abstracted from the kernel itself.

Among the architectures RIOT supports are ARM Cortex-M0, -M3 and -M4, as well as the ARM7. Subsequently, the IoT operating system is compatible with a number of boards like the Arduino Due (SAM3X8E), the Atmel ATmega2560 and the Nordic nRF51822 (ATSAM3U2C). RIOT also provides multiple network stacks, including IPv6, 6LoWPAN and standard protocols such as RPL, UDP, TCP and CoAP.

ArduinoDue_Front

Simply put, RIOT is free software, meaning Makers and engineers can redistribute and modify the OS. Software developed by the RIOT community is available under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, version 2 (LGPLv2).

Interested in learning more? As a community project, you can find RIOT’s source code on GitHub as well as download its latest release here.

8- or 32-bit, that is the question…

Writing for Electronic DesignAtmel’s Ingar Fredriksen and Paal Kastnes recently explored the latest market trends for both 8- and 32-bit microcontrollers (MCUs). While the 32-bit MCU devices continue to rise in popularity throughout the embedded community, 8-bit MCUs are still experiencing a CAGR close to that of their bigger cousins.

These 32-bit, function-rich devices suit an array of different applications, which explains why many embedded developers select them for their next designs. Designers recognize that such complex devices offer everything they need in terms of raw compute power, a rich peripheral set, and easy access to a wide range of development tools and libraries.

Many of these 32-bit devices — which are members of the Atmel | SMART family — are based on the highly-successful ARM cores. Thus, developers feel confident in having access to second source devices and a comprehensive set of development, test and validation tools being available in the market.

However, taking a closer look at recent MCU market trends has revealed that 32-bit devices aren’t the only ones experiencing strong growth. The surging 8-bit MCU market boasts a CAGR (6.4%) close to that of 32-bit (6.9%). Meanwhile, a number of other industry analysts forecast identical growth rates for 8- and 32-bit microcontrollers.

The upswing in 8-bit devices, like the incredibly popular Atmel AVR lineup, clearly highlights that there must be some compelling reasons to use an 8-bit device in place of a 32-bit MCU. The recently-published Electronic Design article looks to shed some insight as to why 8-bit devices are retaining market share.

Essential Differences

The principle differences between 8- and 32-bit MCUs are cost and price structure, CPU performance, ease of use, efficiency in hardware near functions, and static power consumption. When embarking on a new design, developers need to carefully scope out the requirements for an MCU based on the amount of processing capability required, the degree of interfacing needed, and, for battery-powered designs, the all-important power consumption profiles. There’s no doubt that a 32-bit MCU delivers higher performance than an 8-bit device, but the engineer faces the traditional decision of choosing between the best available device in the market versus an application’s actual needs.

Table-1-big

Of course, these decisions will greatly influence the likely bill of materials (BOM) cost. With a lower gate count, a less complex 8-bit device will certainly be cheaper than a 32-bit device. When comparing 8- and 32-bit MCUs from leading vendors, each with a similar amount of flash memory, pin-out etc., 8-bit devices typically cost about 20% less. But this is only the first of many considerations. Another aspect relates to the ease in setting up for a new development.

Ease of Development

MCU suppliers tend to add more features and functionality to their 32-bit devices as opposed to 8-bit products. Consequently, far more setup considerations emerge with a more complex device. While some 32-bit MCUs can run with a limited setup similar to that of an 8-bit device, you’re unable to take advantage of the more powerful device’s additional features.

For example, a typical 32-bit ARM device will have independent clock settings for the core itself, the AHB bus, the APBA bus, and the APBB bus. They all can be set to different frequencies. Typically, you will also have to switch to the clock you want to use because it’s set in software, not in hardware like most 8-bit parts. Furthermore, changing the clock means you must set up the wait states for flash, possibly predicated on measured VCCvoltage.

Such a setup can be much simpler with an 8-bit MCU, though. For example, Atmel’stinyAVR and megaAVR products only require initialization of the stack pointer, which typically takes four lines of code, prior to coding the application. The choice of clock, brownout detector, reset pin function, etc., is all pre-programmed into the device.

The architecture is also much more straightforward than a 32-bit device with internal registers, peripherals, and SRAM all mapped on the same data bus. The peripherals and CPU would normally run at the same frequency, so no peripheral bus configuration is necessary. Moreover, designers can avoid being concerned about latency in synchronizing between different clock domains.

Performance

When it comes to desired CPU performance, the engineer should consider all use cases. The reality is that many embedded designs don’t have high compute requirements. Often, very little manipulation of data is required, so balancing those needs against power-consumption and peripheral-interfacing requirements becomes crucial.

For instance, a simple thermostat application will spend most of its life in a sleep mode. Every so often, it will wake up and measure the temperature and then make a decision to turn a relay on/off or send an instruction to a host controller. Then it will resume sleep. The compute and interface requirements of this application are small, but many other applications such as fire detectors, power tools, flow meters, and appliance controls have a similar use profile, too.

Efficiency of Hardware Near Functions

Many modern microcontrollers incorporate some hardware functions that serve to help the CPU operate as efficiently as possible. In Atmel’s case, both the 8-bit AVR and 32-bit ARM-based MCU families feature the Peripheral Event System. An event system is a set of hardware-based features that allows peripherals to interact without intervention from the CPU. It allows peripherals to send signals directly to other peripherals, ensuring a short and 100% predictable response time.

When fully using the capabilities of the event system, the chip can be configured to do complex operations with very little intervention from the CPU, saving both valuable program memory and execution time. In the case of detecting a hardware event, it’s important to first detect the event and then switch control to the desired interrupt service routine (ISR).

In these situations, CPU speed isn’t the single determining factor. It’s a question of how long, in terms of cycles, does it take to respond to the interrupt, run the ISR, and return. As the following example will show, 8-bit devices can be more efficient in handling hardware near actions.

Table-2-big

Consider receiving one byte on the SPI, using an interrupt to detect it, and then running a simple ISR routine to read the byte from the SPI peripheral and store it in SRAM. Using this scenario, table above draws comparisons between an Atmel 8-bit AVR device and an Atmel ARM Cortex M0+based 32-bit MCU. Calculated with information available, the results are based on minimum implementations. However, engineers should check with their own applications since the interrupt detection and return from interrupt could take more cycles than shown in the table. Requiring 12 cycles versus 33 cycles equates to having a theoretical maximum SPI bandwidth of 1.67 MB/s for the 8-bit CPU and a 606 kB/s bandwidth for a 32-bit CPU when running at 20 MHz.

The degree of numeric processing can also have an impact on the stack and required memory. Applying the Fibonacci algorithm is one particularly good method for testing memory requirements. Since it only uses a local variable, everything needs to be pushed to the stack.

When making a comparison between an 8-bit AVR and an ARM 32-bit CM0+-based device, and using a recursive 15-stage Fibonacci algorithm, the AVR uses a total of 70 bytes of stack, including 30 for return stack (15 calls deep). The ARM-based device uses 192 bytes (60 should be return stack). This means the CSTACK is more than three times the size of the 8-bit solution. In typical C code, more of the variables on the stack often come in a packed format, so this is an extreme corner. However, saying 1.5 to 3 times more SRAM is needed for the same 8-bit-centric application on a 32-bit (versus a native 8-bit) device is a fair estimation.

Power Consumption

No MCU article would be complete without investigating static power consumption. This alone may be a key factor in choosing between an 8- or 32-bit device, especially for battery-powered applications. The table below illustrates power-consumption differences between 8- and 32-bit devices in both active and static modes.

Table-3-big

Aggressive manufacturing technologies increase transistor leakage current, which roughly doubles with each process generation, and is proportional to the number of gates. Leakage current increases exponentially at higher temperatures, which can be easily overlooked when designing a consumer design. Mobile phones and personal media players are transported everywhere, and as we have all found out, temperatures experienced during the summer inside a car can easily climb above 40°C.

The amount of time the microcontroller will spend in active mode versus static mode contributes significantly to the overall application power budget.

Naturally, the ratio between active and static modes will vary depending on the application requirements. Taking the previous SPI interrupt example (second table from above) and assuming a SPI data bandwidth of 80 kb/s, the 8-bit CPU will spend 1.2% of its time in active mode compared to that of the 32-bit, which will spend 3.3% in active mode (table below).

Table-4

Conclusion

Contemplating whether to use an 8- or 32-bit microcontroller for a future design may involve an Internet of things (IoT) application. How IoT actually takes shape provokes lots of debate, but it will certainly challenge engineers to make a detailed appraisal of the MCU requirement. Wireless connectivity, especially ZigBee, will also be an essential component, but that doesn’t automatically mean that it will need a higher power device.

A number of available 8-bit microcontroller products satisfy the need for low levels of processing and wireless connectivity. One such example is the Atmel ATmegaRFR2 series, which provides an IEEE 802.15.4-compliant, single-chip, 2.4-GHz wireless microcontroller solution that suits battery-powered, low-cost IoT designs.

Interested in reading more? Be sure to check out the original article from Electronic Design here.

Atmel’s 8-bit AVR is one of the most popular MCUs ever!

EDN has chosen Atmel’s stalwart and versatile AVR as one of the most popular microcontrollers (MCUS) ever!

“Atmel AVRs revolutionized the 8-bit market when it was launched, with single cycle execution, free software tools and large Flash memory options. Since then, Atmel has continued to innovate and gain market share,” writes EDN’s Stephen Evanczuk.

“For the devices that run in the biggest volumes it is never one feature that makes it good as It needs to be successful in many markets to hit the high numbers. Ease of use, high performance, good sales support, high quality levels and on time delivery are essential.”

As previously discussed on Bits & Pieces, Atmel’s current generation of AVR 8- and 32-bit microcontrollers compliment our ARM MCU and microprocessors (MPUs) to deliver a unique combination of performance, power efficiency and design flexibility. Simply put, no other microcontrollers deliver more computing performance with better power efficiency.

Interested in learning more about Atmel’s extensive AVR MCU portfolio? You can check out our detailed AVR 8- and 32-bit device breakdown here.

32-bit AVR MCUs for automotive applications (Part 4)

In the first part of this series, we took a closer look at how Atmel’s AVR low-power 32-bit microcontrollers (MCUs) help enable the implementation of various product-differentiating features, including advanced control algorithms, voice control and capacitive touch sensing.

We also discussed powering Atmel’s AVR UC3C 32-bit automotive-grade microcontrollers with either a 3.3V or a 5V supply  (generally supporting 5V I/O), talked about Atmel’s Peripheral Event System and explored how Atmel’s low-power 32-bit microcontrollers (MCUs) are used to help protect IP and bolster system safety.

avrdoorcontrolmodule

Today we will take an in-depth look at how Atmel’s AVR low-power 32-bit microcontrollers (MCUs) help streamline automotive development. As previously discussed on Bits & Pieces, evaluating current-gen microcontroller architecture requires a complete development environment, including an evaluation kit, a software development environment with compiler and debugger, as well as a comprehensive set of application examples, drivers and services.

“[Simply put], Atmel simplifies system development with the AVR Software Framework, which supports a variety of optimized interface drivers peripheral firmware, and application code – including extensive motor control algorithms, capacitive touch drivers, advanced digital signal processing algorithms (i.e., FFTs and filters such as band-pass, high-pass, and low-pass), commonly used audio and image codecs such as MP3, speech recognition engines, display drivers, and FAT12/16/32 file systems, to name a few,” an Atmel engineering rep told Bits & Pieces.

“For automotive systems, the support with LIN and CAN software stacks, as well as with operating systems such as OSEK, and MCAL layers for the Autosar environment is mandatory. Model-based approaches for the development of automotive applications are becoming more and more popular, and these require additional support of design environments such as MATLAB/Simulink. Atmel AVR MCUs also support real-time trace, enabling full system operation visibility. Plus, updates with new features are available every quarter.”

In terms of software, the intuitive GUI-based Atmel AVR Studio is the industry’s most complete development environment for 8- and 32-bit applications, offering full compiler and debugger support for all AVR microcontrollers. Since peripherals are configured using the AVR Software Framework, migration between different AVR devices is truly seamless.

Atmel also supplies a wide range of hardware-based tools for in-system programming, debugging, and evaluation. The AT32UC3C-EK evaluation kit provides access to the extensive capabilities of the UC3C architecture with out-of-the-box simplicity, with the evaluation kit supporting Atmel QTouch capabilities.

avrcarradio

“Specific examples of automotive applications with Atmel’s AVR UC3C include car audio, LED backlighting with a dimming function for the indicators, as well as interfaces for different types of sensors and switches to control the window lifter and the mirror positioning,” the Atmel engineering rep continued.

“Perhaps most importantly, a microcontroller such as the UC3C—with peripheral integration and extended processing capacity—allows an entire system architecture to be consolidated onto a single chip.”

Interested in learning more about 32-bit AVR MCUs for automotive applications? Be sure to check out part one, two and three of this series.