Tag Archives: USART

tinyAVR in 8- and 14-pin SOIC now self-programming


The ATtiny102/104 retain the AVR performance advantage — still a 12 MIPS core with 1KB Flash and 32B SRAM — and upgrade many of the features around it.


At this week’s Embedded World 2016, Atmel is heading back to 8-bit old school with their news, straight to the low pin count end of their MCU portfolio with a significant upgrade to the tinyAVR family.

According to Atmel’s briefing package, development of the ATtiny102 and ATtiny104 has been in progress for some time. We got a peek at the company’s roadmap for AVR where these are labeled “next generation tinyAVRs,” and all we can say is this is the beginning of a significant refresh — alas, we can’t share those details, but we can now look at these two new parts.

What jumps out immediately is how the AVR refresh fills a significant gap in Atmel’s capability. The existing tinyAVR family is anchored by the ATtiny10, a capable 8-bit AVR core running at up to 12 MIPS with 0.5 or 1KB Flash and 32B of SRAM. The pluses of extended availability are obvious at the beginning of the lifecycle, but by the midpoint of a long run, the technology can start to seem dated.

 ATtiny102/ ATtiny104

ATtiny102/ ATtiny104

That is certainly the case for the ATtiny10 introduced in April 2009. At that time, the ATtiny10 was a shot straight at the Microchip PIC10F, with much higher CPU performance and a competitive 6-pin SOT and 8-pin DFN package offering. Outside of the CPU itself, the ATtiny10 and PIC10F line up pretty closely except for two areas: self-programming, and the accuracy of on-chip oscillators and voltage references. ATtiny10 parts require pre-programming from Atmel or a distributor, and its rather wide accuracy specs need help from product calibration and external componentry – however, cost and code compatibility still have a lot of sway, and the popularity of the ATtiny10 was unshaken.

The ATtiny102/104 retain the AVR performance advantage — still a 12 MIPS core with 1KB Flash and 32B SRAM — and upgrade many of the features around it. First and most noticeable is a packaging improvement. The ATtiny102 comes in an 8-pin SOIC (with the 8-pin DFN option still available). For a generation of applications needing more I/O in a low-cost part, the ATtiny104 comes in a pin-compatible 14-pin SOIC with 6 extra I/O pins.

Features for ATtiny102/ ATtiny104

Self-programming of Flash has been added to both versions, and with the same core footprint a single production image for both parts is achievable. Fast start-up time is available as an option as well. The internal voltage references are now highly accurate, with calibrated 1.1V, 2.2V, and 4.3V taps at +/- 3%. Internal oscillator accuracy is now +/- 2% over a 0 to 50 degrees C temperature range at fixed voltage. Those changes prompted expanding successive approximation ADC resolution to 10-bit, and channels are doubled to eight. Two of the I/O pins can now be configured for a USART, adding serial communications capability. A new 10-byte Unique ID provides a serial number.

Those features translate to customer satisfaction with intelligent devices using the ATtiny102 and ATtiny104. The more accurate internal oscillator improves the precision of motor control in personal care devices such as toothbrushes and electric shavers. The calibrated voltage references enable applications where rechargeable battery management is a primary function, for example in the d.light family of portable solar-powered lighting.

For more information on the ATtiny102 and ATtiny104 MCUs, you can check out Atmel’s recent post here.

This announcement, and what I think will follow from Atmel later this year, reaffirms just how important 8-bit is for the future at Atmel. The AVR architecture is beloved because of its simplicity and ubiquity with over 7B cores now shipped. The advances in the ATtiny102 and ATtiny104 are aimed at reducing BOM and manufacturing costs and enabling further innovation in intelligent consumer devices.

Getting started with Atmel’s ATxmega32E5

Atmel’s ATxmega32E5 is a high-performance, low-power 8/16-bit AVR XMEGA microcontroller combining 32KB ISP flash memory (plus 4KB boot code section) with read-while-write capabilities, 1KB EEPROM, 4KB SRAM, 8-channel event system, a programmable multi-level interrupt controller, 26 general purpose I/O lines and one 16-bit real time counter.

xmegae5xplained1

“The MCU also boasts three flexible 16-bit timer/counters with compare modes and PWM, two USARTs (with SPI Master mode), one Two-Wire Interfaces (TWI) with SMBUs Level 1 support, one Serial Peripheral Interface (SPI) and one 16-channel/12-bit 300kSPS A/D converter with optional differential input with programmable gain,” an Atmel engineering rep told Bits & Pieces.

“In addition, there is one two-channel 12-bit 1MSPS D/A converter, two analog comparators with window mode, a programmable watchdog timer with separate internal oscillator, accurate internal oscillators with PLL and prescaler and programmable brown-out detection.”

Meanwhile, an XMEGA Custom Logic module (XCL) consisting of two independent 8-bit timer/counters and two lookup tables used for defining glue logic rounds out the above list of features.

“Essentially, it is designed to reduce bill of material (BOM) and PCB size as the XCL can replace external circuitry such as delay elements, RS-latches, D-latches, D-flip-flowps chip-select logic, AND, NAND, OR, NOR, XOR, XNOR, NOT, MUX AND/OR/XOR logic gates,” the engineering rep continued. “Together with the USART, the XMEGA Custom Logic module can be used to enable customized communication protocols. Simply put, by executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz,  neatly balancing power consumption and processing speed.”

To accelerate development with the ATxmega32E5 microcontroller, Atmel offers the XMEGA-E5 Xplained, a hardware-based platform that allows engineers to more easily evaluate the device. The kit offers a range of features that enable devs to quickly kick off projects with ATxmega32E5 peripherals, as they learn how to integrate the AVR device in various designs.

Aside from the ATxmega32E5 microcontroller, key XMEGA-E5 Xplained features include:

  • OLED display with 128×32 pixels resolution
  • Ambient light sensor
  • Analog filter
  • Digital I/O
  • Two mechanical buttons
  • Two user LEDs
  • Four expansion headers
  • Board controller with USB interface
  • One power LED and one status LED

Interested in learning more? The XMEGA-E5 Xplained can be purchased from Atmel’s official store here.

Powering industrial communications with Atmel

Industrial communications are a critical aspect of current-gen automated systems – with defined standards that continue to evolve as new industrial Ethernet protocols emerge. Atmel’s versatile portfolio of microcontrollers (MCUs) provides engineers with the peripherals and internal system architecture required to efficiently interface new products with leading field busses, industrial Ethernet standards and wireless communications.

Field Bus

Atmel offers a dedicated RS485 mode for USART peripherals which is available on most ARM processor-based AT91SAM and AVR 32-bit microcontrollers. Meanwhile, a rich number of DMA channels on Atmel megaAVR, AVR XMEGA, AVR 32-bit and AT91SAM MCUs unload the CPU during industrial communication transfers, with multi-layer bus implementation on Atmel 32-bit microcontrollers enabling true parallel data transfers and effectively minimizing bus load limitation.

In addition, there is an (optional) external bus interface on several Atmel microcontrollers, with up to 32-bit data supports dedicated ASSP for protocols such as Profibus. Plus, up to 12Mbps USART on the SAM3U and SAM9 microcontrollers provides support for external transceivers. In terms of single or dual CAN controllers, select Atmel MCUs are V2.0A and V2.0B standard compliant, supporting independent message objects that are programmable on the fly and ideal for field bus such as CANopen and DeviceNet.

Industrial Ethernet

The vertical integration of management execution systems with factory floor equipment has resulted in the continued convergence of the Ethernet TCP/IP protocol with industrial field busses. As noted above, several industrial Ethernet protocols have emerged, including Profinet, Ethernet/IP, ModbusTCP/IP, EtherCat and Ethernet Powerlink.

“Most industrial Ethernet automated systems do not require compliance with a PLC cycle times lower than a few milliseconds. For these applications, the industrial Ethernet protocol can be cost-effectively implemented in software on a microcontroller with an integrated standard Ethernet MAC peripheral,” an Atmel engineering rep told Bits & Pieces.

“Due to their moderate flash size requirement, protocols like Modbus TCP can be implemented in a microcontroller. Atmel offers ARM-based and 32-bit AVR microcontrollers with up to 512KB of flash and an integrated Ethernet MAC unit.”

According to the rep, one of the most noteworthy features includes a 10/100 Ethernet Media Access Controller (EMAC) peripheral with chained buffer Direct Memory Access (DMA). This acts as a master on the internal multi layer bus with multiple internal SRAM blocks – enabling a true parallel data transfer between the Ethernet frames and the application data.

“Atmel’s  SAM9  MPUs are also price-competitive solutions for implementing industrial Ethernet protocols, such as the Ethernet/IP standard, which requires a higher flash size and faster execution time,” the engineering rep continued.

“Atmel’s  SAM9 MPU, like the SAM9G45, offers a variety of benefits, including a 400Mhz clocked ARM926EJ core with 32KB instruction and data caches speed execution time. There is also deterministic execution time with the use of the TCM (Tightly Coupled Memory) interface, enabling access to the internal SRAM with zero wait state at 400MHz. Indeed, by dynamically configuring the SRAM as TCM, Ethernet frames can be analyzed at full speed without any copy to the cache.”

For motion control applications, synchronism and short latency aspects are crucial. Protocols such as Profinet IRT or Ethercat address these requirements and are suited for systems with a sub-millisecond PLC times. In this case, specific ASSP or FPGA solutions must be used. The Atmel SAM9G45, with its dual EBI feature, lets designers integrate the industrial Ethernet communication module with minimal performance impact. Data transfers between the ASIC or FPGA can be handled by the DMA unit, in parallel with external RAM access.

Wireless Communication

Wireless communication in the industrial automation sector is increasingly popular, as it provides an easier way to install and connect mobile or inaccessible equipment. To be sure, industrial control equipment such as PLC and DCS IO modules primarily utilize IEEE802.11 WLAN and Bluetooth standards. And that is one of the reasons Atmel’s 32-bit microcontrollers and microprocessors feature an embedded multimedia card interface which supports connection to an SDIO WLAN or Bluetooth module. In fact, a full reference design based on the Atmel AVR 32-bit microcontroller and the industrial Wifi Module from H&D is available for evaluation and development here, while a Linux-based solution for Atmel SAM9 microcontrollers can be found here.

And last, but certainly not least, industrial sensors and actuators have demanding requirements for power consumption, board space and implementation cost. For these products, IEEE802.15.4 technology, such as Zigbee or Wireless-HART is most appropriate, with Atmel offering complete wireless solutions based on our low-power microcontrollers and RF transceivers. Benefits include excellent RF performance, which enables longer range and more robust RF link, optimized power consumption and lowest system cost.

Additional information about Atmel MCUs that can be used to power a wide range of industrial communication devices is available here.

Capacity and performance characterize Atmel’s megaAVR

Our ongoing coverage of Atmel’s comprehensive AVR portfolio has taken readers on a detailed MCU (microcontroller) tour this month. First, Bits & Pieces dove into the guts of Atmel’s AVR UC3 which is built around high-performance 32-bit AVR architecture and optimized for highly integrated applications.

We then spent some time with Atmel’s AVR XMEGA, an MCU designed for real-time performance, high integration and ultra-low power. And today we want to properly acquaint our readers with Atmel’s megaAVR microcontroller, which is well known for both capacity and performance.

“When your designs need some extra muscle, you need the megaAVR. Ideal for applications requiring large amounts of code, the megaAVR offers substantial program and data memories with performance up to 20 MIPS, with picoPower technology minimizing power consumption,” an Atmel engineering rep told Bits & Pieces. “All megaAVRs offer self-programmability for fast, secure, cost-effective in-circuit upgrades. You can even upgrade the flash while running your application.”

Indeed, the megaAVR family offers Atmel’s widest selection of devices in terms of memories, pin counts and peripherals. Meaning, engineers can choose from general-purpose devices to models with specialized peripherals like USB, or LCD controllers, or CAN, LIN and Power Stage Controllers.

More specifically, Atmel’s megaAVR family is equipped with on-chip flash, SRAM, internal EEPROM, SPI, TWI, USART, USB, CAN, LIN, watchdog timer, a choice of internal or external precision oscillator and general purpose I/O pins.

In terms of analog functions, the megaAVR boasts advanced analog capabilities, such as ADC, DAC, built-in temperature sensor and internal voltage reference, brown out detector, a fast analog comparator and a programmable analog gain amplifier. Simply put, the high level of integration allows designs with fewer external analog components.

And last, but certainly not least, megaAVR microcontrollers help accelerate the development process with advanced in-system programming and on-chip debug, while in-system programming works to simplify production line programming and field upgrades.

Interested in learning more? A full breakdown of our AVR portfolio is available here.

The ATtiny1634 Nixie clock

A Nixie tube can best be described as an electronic device that displays numerals and other information using glow discharge. The glass tube is packed with a wire-mesh anode and multiple cathodes, shaped like numerals or other symbols.

Recently, a Reddit user by the name of “Smallscaleresearch” created a slick Nixie clock powered by Atmel’s ATTiny1634.

“I was digging around in my parts bins and came across most of the exotic bits required to build a GPS sync’d Nixie tube clock. Logic side is an ATTiny1634 with a surplus (old) SiRF GPS module. HV side is based on a surplus backlight inverter, rectified and filtered. At 3.3v it puts out around 140v under load, and around 270v if allowed to float,” the Reddit user explained.

“To switch the HV, I’m using a Supertex HV5122 high voltage shift register which gives me 32 channels. Since I only have 32, the high digit of the hour only has digits 1 and 2 connected, so to display ‘0’ I just leave it off. The 4 BS108 MOSFETs on the board are just level shifters for the control lines, since the HV5122 needs a minimum of around 10.5v for logic ‘high’ on its input.”

Additional information and schematics for the ATtiny1634-powered Nixie clock can be found here.

As previously discussed on Bits & Pieces, the high-performance Atmel picoPower 8-bit AVR RISC-basedATtiny1634 microcontroller features 16KB flash memory, 256B EEPROM, 1KB SRAM, 18 general purpose I/O lines, 32 general purpose working registers, one 8-bit timer/counter and one 16-bit timer/counter.

Additional key specs include two full duplex USARTs with start frame detection,  universal serial interface (USI), I2C slave, internal and external interrupts, a 12-channel 10-bit A/D converter, programmable watchdog timer with Ultra Low Power internal oscillator and four software selectable power saving modes (the device operates between 1.8-5.5 volts).