Miniature Six-Pin MCUs Offer Surprising Functionality
投稿人:电子产品
2011-06-10
Microcontrollers (MCUs) are increasingly lauded for ramping the ability to take on complex system designs, yet it’s important to remember that low-cost, miniature devices can serve as a vital part of the design engineer’s toolbox. Indeed 8-bit, 6-pin MCUs can serve both as the heart of simple systems and in support roles to other compute resources in complex systems. Despite their small footprint – looking more like a transistor than an MCU – 6-pin products still manage to integrate features such as A/D controllers, timers and internal oscillators.
Microchip pioneered the 6-pin MCU market in the 2004 with the PIC10 family. Atmel joined the fray about two years ago. Both companies have continued to integrate new features, and in some instances, push clock speeds upward. For example, Microchip launched its PIC10F20x family at 4 MHz, later introduced the PIC10F22x parts that operate at 4 or 8 MHz, and has already previewed plans for a 16-MHz PIC10F32x family. Starting in the miniature space later, all 6-pin members of Atmel’s ATtiny family operate at 12-Mhz clock rates.
Figure 1 shows a block diagram of the 4-MHz Microchip PIC10F20x family. Flash program memory ranges from 256 to 512 words, and the MCUs include 16 or 24 bytes of SRAM. All of the products integrate an 8-bit timer and some include a comparator as well.
The Microchip PIC10 family includes MCUs that operate at 4 and 8 MHz with a 16-MHz offering on the horizon. |
Evaluating application for 6-pin MCUs
A 6-pin MCU can offer sufficient peripheral resources and compute power to standalone in some applications. Atmel staff engineer Vemund Bakken notes that toys, simple thermostats and electronic door locks have all used the ATtiny family. Bakken also said, “Our MCUs include PWM capability and can control simple motors.” Indeed even the low-end ATtiny4 product includes a 16-bit timer that enables two PWM channels. Figure 2 depicts a block diagram of the MCU.
Fanie Duvenhage, director of applications, architecture, and marketing at Microchip breaks the potential usage models for a 6-pin device into 5 general application categories:
- Intelligent disposable electronics: –One-time use products such as LED-based retrofit light bulbs
- General logic and control: Basic state machines and specific functions such as controlling the startup delay in a power supply
- Mechatronics: Any mechanical function moved to the electronic domain, such as compressor startup in a refrigerator
- Electronic glue: The use of an MCU to fix a bug in an ASIC
- Waveform generation: Analog timer replacement enabled by the accurate oscillator integrated in the PCI10 MCUs
Atmel’s Bakken noted another usage scenario for a 6-pin MCU. He said relatively complex systems can take advantage of MCU’s low-power attributes. The primary processor in a system can enter sleep mode when there is no activity, yet the MCU can remain awake as a system monitor that can awaken the main processor when required.
“With a 12-MHz processor, you can get a lot done on a very low power budget,” said Bakken. In reality many designs today would use a relative-low power-supply voltage such as 1.8 V, which would limit the ATtiny MCUs to 4-MHz operation and require 0.8 mA of active current.
Atmel includes an A/D converter on all of its 6-bit ATtiny MCUs and the entire family can operate at 12-MHz maximum clock speeds. |
Single- or dual-function applications
The real test for whether you can use a 6-pin MCU comes down to the complexity of your application. These MCUs excel in cases where they perform a single task or two or perhaps a few more very simple operations. The limit is in part due to limits in processing power, but also memory. For example, the ATtiny4 MCU at the low end of Atmel’s portfolio includes 0.5 Kbytes of flash and 32 bytes of SRAM.
Both Microchip and Atmel promote the use of small MCUs in touch-sensing applications. Realize that the intended touch application is much simpler than a smartphone where touch is used for screen navigation. Instead, the MCUs can detect a few touch buttons and provide a digital output. All of Atmel’s ATtiny family members include touch support, and Microchip supports touch with all PIC10 models that include a comparator.
Atmel and Microchip also both stress that miniature 6-pin MCUs don’t require assembly language programming, although design teams can certainly use assembly to get the smallest code footprint. In both the Atmel and Microchip cases, designers can use the exact same tools to work with 6-pin devices that they would use with more complex MCUs.
Microchip supports the PIC10 family with the MPLAB IDE that includes a free C compiler. According to Duvenhage, designers learn the nuances of programming the 6-bit devices quickly. They can’t use 32-bit variables. “It takes a little bit of a change of mindset,” Said Duvenhage. Atmel supplies its AVR Studio IDE for use with the ATtiny MCUs.
The 6-pin devices are forward compatible with more complex MCUs in both the Microchip and Atmel portfolios. The integrated peripherals are similar up and down each company’s product lines. Designers can easily move code from a 6-pin device to a more-complex MCU.
Moving from a more complex MCU to a 6-pin device is a bit more complex. For example, the next step up from the 6-pin MCU in Microchip’s portfolio is the PIC12 family. The PIC10 has a subset of the instruction set used in the PIC12. The PiC10 supports only 33 total instructions whereas the PIC12 supports 49.
If you work in C, the compiler handles the instruction set differences. Still the designer must be cognizant of architectural difference as well. For example the PIC10 uses a 12-bit instruction word whereas the PIC12 uses a 14-bit instruction word. Those type of changes impact memory footprint and require attention to detail when migrating to a less-complex MCU.
For future single- or dual-function design problems, consider a 6-pin device. These are surprisingly capable tools and extremely cost effective when they can handle the application at hand.
免责声明:各个作者和/或论坛参与者在本网站发表的观点、看法和意见不代表 DigiKey 的观点、看法和意见,也不代表 DigiKey 官方政策。