Tag Archives: IDE

Building a GPS tracker with Atmel’s SAM D20 MCU

A GPS tracking unit uses the Global Positioning System to determine and record the precise location of a vehicle, device or individual. Key design requirements for a GPS tracker include a small form factor, low power consumption and flexible connectivity options.

Atmel’s recently launched SAM D20 ARM Cortex-M0+ based MCU can be used to power such a device, taking all of the above-mentioned design requirements into account.

“The SAM D20 MCU – embedded with serial communication modules (SERCOM) and low power consumption – provides the flexibility, connectivity and low power required for GPS tracker applications,” Atmel engineering manager Bob Martin told Bits & Pieces.

“How low is low in terms of power consumption? Well, we are talking about <150µA/MHz in active (CoreMark) and <2µA with RTC and full RAM retention. Meanwhile, the peripheral event system and intelligent peripherals with Atmel SleepWalking technology further reduce CPU activity and power consumption.”

Martin also noted that the SAM D20 MCU offers design engineers 6 highly flexible serial communication modules (SERCOM), each configurable to operate as USART, I2C and SPI – thereby facilitating easy and flexible connection to external sensors, memories, PCs and wireless modules.

As expected, Atmel supports a wide range of dev tools and software, including Atmel Studio 6 (free IDE with GCC compiler), Atmel Software Framework (free SW libraries of production ready source code), Atmel Gallery (open to extensions) and the SAM D20 Xplained Pro Kit which is packaged with programmer and debugger, as well as connectors for expansion wings.

Building an optical transceiver with Atmel’s SAM D20

An optical transceiver can best be described as a device that converts high-speed data from a cable source (e.g., Gigabit Ethernet) to an optical signal for communication over optical fiber.

In the vast majority of configurations, a small microcontroller is used to control the Laser Driver Diode (LDD) and Linear Transconductance Amplifier (LTA) of the transceiver.


An optical transceiver is typically packed into a small form factor, simply because standards such as SFP and XFP require MCUs in the 3mm to 4mm square range.

Additional key design requirements include flexible serial and analog peripherals – with multiple LDD, LTA, host standards and interfaces requiring numerous digital and multi-channel analog interfaces. Perhaps most importantly, extremely low latency responses are necessary to control the LDD and LTA due to control loops required to sustain the high data throughput.

Atmel’s SAM D20 ARM Cortex-M0+ based MCU can be used in the design of a standard optical transceiver, along with other Atmel components, including the 30TS temperature sensor and AT24/AT25 Serial EEPROM.

“To satisfy the requirements of optical transceiver controllers, the SAM D20 offers very small package options (32QFN4x4 mm package, chip scale package <3×3 x 0.5mm), with flexible serial and analog peripherals, as well as fast and low-latency interfaces. In terms of flexible serial and multi-channel analog peripherals, Atmel’s SAM D20-based platform offers 6 SERCOM interfaces, each configurable as SPI, I2C, or USART,” Atmel engineering manager Bob Martin told Bits & Pieces.

“There is also 12-bit, 16-channel ADC, 10-bit DAC and 2 full-featured analog comparators to support multiple feedback capabilities and control interfaces. Meanwhile, fast and low-latency interfaces include optimized 300ksps, ADC and DAC analog peripherals, along with I2C, SPI, and USART serial communications interfaces – supporting up to 24Mbps data transfers, as well as single clock cycle IO control for minimal control loop latency.”

On the software side, Atmel provides an extensive development ecosystem, including debuggers development kits such as Atmel’s IDE (Studio 6), along with ready-to-run peripheral drivers and communication stacks (ASF). There is also Atmel’s Gallery and SAM D20 Xplained Pro Kit which packs an integrated programmer and debugger with connectors for expansion wings.

Additional information about Atmel’s SAM D20 MCU can be found here.

Bump up your Atmel Studio

Written by Johannes Bauer, ARM

With Atmel Studio, Atmel has one of the best free development tools for ARM-based microcontrollers on the market.

Its slick IDE and the smooth integration of the Atmel Software Framework (ASF) makes it a good choice for users of the SAM3, SAM4, and the brand-new SAM D20 devices. One thing some might be missing, though, is a top-notch compiler.

Thankfully, there is a solution in the Atmel Gallery – the Keil MDK-ARM Toolchain extension. It allows Atmel Studio to use the highly optimizing ARM Compiler with its best-in-class code density and high performance for a wide range of applications. The extension requires an installation of Keil MDK-ARM, but makes the integrated compiler available transparently in Atmel Studio.

The ARM Compiler provides two run-time C/C++ library variants: a full ANSI compliant library and a Microlib for utmost code density on small microcontrollers like the Cortex-M0+ based SAM D20. You can give it a spin and see how your code size improves.

As a perfect match for the extension, ARM has recently introduced the MDK-ARM Atmel Edition, or MDK-Atmel for short. This special edition of the industry-standard Keil MDK supports compiling and debugging for ARM-based Atmel MCUs and is available at a reduced price compared to the full version of MDK. Of course you can also use MDK-Atmel stand-alone without Atmel Studio if you prefer that.

Together, the ARM development tools and Atmel software and hardware make a good combination for developers, no matter which environment they work in.

Atmel expands ARM Cortex-M4 Flash lineup with SAM4N series

Atmel has expanded its ARM Cortex-M4 Flash lineup with the entry-point SAM4N series. The new microcontrollers – which feature a 100MHz operating frequency – boast up to 1MB of Flash memory, multiple serial communication peripherals and analog capability.

“This combination of features, coupled with low power consumption, makes the SAM4N series ideal for a wide range of applications, including the industrial automation, consumer appliance and energy metering markets,” an Atmel engineer told Bits and Pieces.

“In addition, the SAM4N series offers pin-to-pin compatibility with the Atmel SAM4S, SAM3S, SAM3N and SAM7S devices – facilitating easy migration within the SAM lineup.”

As noted above, the SAM4N is built around a low power sipping design, achieving real-world consumption levels down to 170µA/MHz in active mode; down to 20µA in sleep mode with full RAM retention & wake-up time down to 10µs; and down to 1µA in backup mode with the RTC running.

Key hardware specs include fast serial communication with 7 UARTs, four SPIs and three I2Cs; 12-bit ADC, 10-bit DAC, integrated voltage reference, multiple timers and PWM.

On the software side, there is full IDE support for Atmel Studio 6, IAR and Keil, while a Modbus Demo (RTOS + Modbus RTU) will go live later this month. In addition, Atmel’s SAM4N Xplained Pro is available as a starter or evaluation kit – and is probably the most ideal platform for evaluating and prototyping with the SAM4N. Of course, extension boards can also be purchased individually. Additional information about Atmel’s new SAM4N lineup can be found here.

Atmel’s ATSAM4LC4CA Cortex-M4 based MCU can power this thermostat

A mid-range thermostat facilitates basic climate control with additional sensing, control and interface capabilities. Key design considerations for next-gen thermostats include a backlit touchscreen display, wireless connectivity, low power sipping, air quality monitoring and an accurate clock-calendar.

Atmel’s ATSAM4LC4CA (ARM) Cortex-M4 based MCU, paired with an AT86RF212/AT86RF231 RF transceiver, can be used to build a reliable mid-range thermostat incorporating the above-mentioned features.


“The SAM4LC offers a highly integrated device with rich embedded peripherals to simplify product design as well as BOM cost. Key low-power sipping features include 90mA/MHz Active Mode Current and 0.7mA Back-Up Mode with RTC, while SleepWalking and Peripheral Event System further reduce consumption by monitoring environment without waking the CPU,” an Atmel engineer explained.

“Beyond temperature control, the SAM4LC boasts SPI, 12-Bit ADC, I2C, USB and USARTS for interfacing with RF transceivers, communications modules, sensors and battery monitors. Plus, it supports low-power capacitive touch and proximity detection.”

Additional key hardware specs include an asynchronous timer with real-time clock, alarm and calendar mode; an advanced display and user interface (UI); and an integrated segment LCD controller which supports a number of functions such as automatic scrolling, animation, segment blink and blank display.

On the software side, the SAM4L offers full support for Atmel’s Studio 6 IDE (Integrated
Development Environment) for developing and debugging Atmel ARM Cortex-M and AVR microcontroller-based applications. The MCU also supports in-house and third-party supplied modules, kits, OS/RTOS/Middleware and various UI Solutions, while the SAM4L-EK evaluation kit enables rapid code development of apps running on SAM4L devices.

Additional information about Atmel’s ATSAM4LC4CA ARM Cortex-M4 based MCU can be found here.

Atmel’s SAM4L ARM MCU tech powers game controllers

Atmel’s SAM4L ARM-based microcontroller lineup redefines the MCU power benchmark, delivering the lowest power in both active (90µA/MHz) and sleep modes – 1.5µA with full random access memory (RAM) retention and 700nA in back-up mode.


Simply put, the SAM4L lineup is the most efficient MCU tech available today, achieving up to 28 CoreMark/mA (using the IAR Embedded Workbench), while also offering the industry’s shortest wake-up time at 1.5µs from deep-sleep mode.

The SAM4L is targeted at a wide variety of portable and battery-powered consumer, industrial and medical applications.


However, the MCU lineup can also be used to power next-gen game controllers, along with related Atmel tech like the AT24C/AT25/AT93C serial EEPROM and ATR2406 RF transceiver.

On the software side, designers can look forward to an extensive ecosystem from Atmel and its partners, with an integrated development environment (IDE) and compiler (Studio 6 is free and integrated), along with multiple libraries.


And last, but certainly not least, there are also production-ready software packages available for drivers, software services and libraries. Interested? Additional information can be found on Atmel’s SAM4L MCU page here.

This Arduino robot is powered by Atmel

The new Arduino Robot – the first official Arduino on wheels – boasts two processors, one on each board. The Motor Board controls the motors, while the Control Board interacts with the sensors and decides how to operate. Both Arduino microcontroller boards are powered by Atmel’s ATmega32u4 and can be programmed using Arduino IDE.

The Robot has many of its pins mapped to on-board sensors and actuators, so programming the ‘bot is similar to the process with the Arduino Leonardo. Both processors are equipped with integrated USB communication, eliminating the need for a secondary processor. This allows the Robot to appear to a connected computer as a virtual (CDC) serial / COM port.

As expected, every element of the Robot platform – hardware, software and documentation – is freely available and open-source. Meaning, users can learn exactly how the device is put together, while exploiting its design as a starting point to create and mod various configurations.

Additional key specs? The ATmega32u4 has 32 KB (with 4 KB used for the bootloader), along with 2.5 KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM library). Meanwhile, the Control Board is fitted with an extra 512 Kbit EEPROM that can be accessed via I2C. There is also an external SD card reader attached to the GTFT screen accessible by the Control Board’s processor for additional storage.

The Robot can be powered via a USB connection or with 4 AA batteries and features an on-board battery charger that requires 9V external power generated by an AC-to-DC adapter (wall-wart).

The adapter can be connected by plugging a 2.1mm center-positive plug into the Motor Board’s power jack, although the charger will not operate if powered by USB (the Control Board is powered by the power supply on the Motor Board).

As noted above, the Robot can be programmed with Arduino software, while the ATmega32U4 processors on the Arduino Robot arrive pre-burned with a bootloader that allows users to upload new code without an external hardware programmer via the AVR109 protocol. Of course, users can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header.

Interested? Additional details and specs can be found here on the official Arduino Robot page.

News from the Gallery

News from the Gallery

By Joerg Bertholdt, Director of Marketing, Tools and Software, Atmel Corporation

We launched Atmel Gallery less than 6 months ago, the first app store of its kind to deliver integrated embedded tools and embedded software straight into a development environment, specifically for Atmel Studio 6.

We were excited to get into uncharted territory, but also anxious about the types of reaction we’d get from our customers. It’s time to see how we did.

With over 25,000 developers – and counting — signed up for a Gallery account, our expectations have by far been exceeded. The servers handled the big demands very well, proving the infrastructure design and scalability.

 Keil MDK-ARM Toolchain from Keil enables Atmel Studio to use its highly optimizing ARM compiler

Keil MDK-ARM Toolchain from Keil enables Atmel Studio to use its highly optimizing ARM compiler

With the February update of the XDK, the Extension Developer’s Kit, partners have been able to easily integrate embedded software and package integrations as projects that install directly into Atmel Studio. For example, developers who are interested in exploring commercial real-time operating systems, now have access to Micrium’s uC/OS and Segger’s embOS. Trial versions of these RTOSes are available as ready-to-run example projects for Atmel’s ARM Cortex-M4 based SAM4S devices.

Two popular extensions are compiler plug-ins. The Keil MDK-ARM Toolchain from Keil enables Atmel Studio to use its highly optimizing ARM compilerCodeVisionAVR allows the use of HP Infotec’s AVR compiler, which also includes CodeWizardAVR, a graphical peripheral configuration tool for AVR MCUs.

Besides development tools and embedded software extensions, training modules such as Integrating USB In Your Design have also been made available through the Gallery. With the XDK supporting the development of hardware extension boards for Atmel’s Xplained Pro kits, the drivers for the first Xplained Pro partner board will soon be delivered as an Atmel Studio project.

We’re six months in and happy to see the masses have adopted Atmel Gallery.

Are you a Gallery user? Let us know what you like, what you’d like to see improved or if there are additional extensions you would want to see. Just comment on this blog or send me an email to joerg.bertholdt@atmel.com.

Haven’t checked out the Gallery yet, just take a look at gallery.atmel.com. Don’t have Atmel Studio 6? It’s free, you can download it from atmel.com.

Are you an independent software vendor or developer and want to be part of the growing Atmel Studio ecosystem, join the Gallery as a developer; the XDK makes it easy to participate.

Engineering TV Talks Atmel Studio 6

Engineering TV’s Paul Whytock talks about Atmel Studio 6 with John Fogelin, Atmel’s principal technologist for software platforms MCU. From the company’s booth at the recent Electronica show, the two talked about how increasing software complexity has created the need for integrated development environments to evolve into platforms. The Atmel Studio 6 integrated development platform, for example, includes the Atmel Gallery apps store for third-party extensions and plug-ins. These additional tools have transformed Atmel Studio into a more comprehensive environment for efficient design of AVR and ARM core-based applications. Watch interview.

Have you tried Atmel Studio 6? What do you think about the platform?

Embedded Tools Apps Store Inside IDE

Are you under increasing pressure to develop products with fewer engineering resources and shorter deadlines? The folks at Atmel just announced the Atmel Gallery integrated apps store as part of the newest version of the Atmel Studio 6 integrated development platform. With Atmel Gallery, you can access tools, such as compilers, peripheral configuration, code editing and embedded software, right from the Studio 6 environment. These tools come from Atmel and third parties. Also, Studio 6 now includes Atmel Spaces, a workspace for development of open-source, collaboratively developed projects. Studio 6 is one example of how the embedded development platform continues to evolve to address some pressing challenges that embedded design engineers are facing today.

Here’s an interesting article from EE Times about how development environments are changing.  

Learn more about Atmel Gallery and Atmel Spaces.