Microcontroller Applications -> Connectivity invigorates MCU designs
Connectivity invigorates MCU designs
By Rodger Richey, Applications Manager, Microchip Technology Inc., Chandler, Ariz., EE Times
May 21, 2001 (2:21 p.m. EST)
URL: http://www.eetimes.com/story/OEG20010521S0064
The need for connectivity is spreading across all market segments-from refrigerators to utility meters, products are being designed to heed the call: Embed the Internet. One of the most exciting moments in a designer's life is when marketing utters those eight innocent words: "We want to add connectivity to the product."
The thrill sends shivers through the designer's body; the chance to finally see inside the black box of connectivity is very exciting. But after several weeks of research, the designer's elation changes to frustration as the black box is cracked open and with it comes the realization that the resources required to implement connectivity leaves very little for the actual application.
Connectivity heavily taxes the critical core resources of any processor or microcontroller, requiring larger program memory, larger data memory and faster operating frequency. Once the realm of 32-bit microcontrollers, connectivity is being driven to the masses by new crops of larger and faster 8-bit devices. Microcontroller manufacturers have been monitoring the connectivity market and have started to design 8-bit versions with more memory and higher operating frequencies to facilitate the application as well as the connectivity.
Medium and protocols
Connectivity encompasses two aspects of a design. The first is the medium over which messages are transferred. Wired connectivity includes Ethernet, telephone and power line. Wireless includes standard RF transmission, spread spectrum and cellular. The largest growing market for embedded connectivity is for residential use. Most homes are not wired for Ethernet and therefore must rely on either the only two wired forms of connectivity (telephone line or power line), or some form of short-range RF as the medium. While in some cases the microcontroller is not directly involved with the hardware to transmit and receive messages over the medium, it must be able to keep up. With data rates exceeding 1 Gbyte/second, the microcontroller's operating frequency must be fast enough to process the information.
The second aspect of an embedded connectivity design embodies the protocols used. Not only are control and routing of information important, but some media also require authentication, security and encryption. These protocols require the faster processing power to keep up with the transfer rate and larger memories to hold the software to handle these protocols and the application code. A short-range RF system would need the basic protocol to transfer messages and some method to authenticate its individual systems to one another.
How authentication works
An example would be a wireless security alarm in a residential home. Each window would have a sensor that trips when the window is opened. The system would need to authenticate the window sensors to the main control system so that one system would not cause alarms in neighboring homes with the same alarm system. Another example would be the systems that are used to monitor air pressure in automobile tires. Each wheel has a sensor that continuously sends pressure information to a receiver. A car owner would be frustrated if the unit was reading tire pressures from a car sitting next to his.
To give an example of the memory requirements, consider a typical application using Microchip Technology's PIC18F452 flash microcontroller. This system uses authentication, encryption and a TCP/IP stack to transfer messages. The Keeloq code-hopping algorithm handles the authentication in 3 kbytes, the encryption using the AES/Rijndael algorithm in 3 kbytes and a TCP/IP stack from Iosoft Ltd. using 8 kbytes. These three protocols alone consume 14 kbytes of program memory, almost half the program memory on a PIC18F452. Operating at 40 MHz, the microcontroller will be able to authenticate the device quickly, process incoming data using the TCP/IP stack to handle the handshaking and routing of messages and decrypt th e data before the next message arrives.
Bigger, stronger, faster
With all this, the 8-bit microcontroller has to be built like the Bionic Man to handle these tasks: bigger, stronger and faster. Thirty years ago, the Apollo space missions to the moon had little more program memory to control the entire spaceship than a typical mouse connected to your computer. Ten years ago the typical 8-bit microcontroller rarely had over 4 kbytes of program memory. Now, it is not uncommon for microcontrollers to have 128 kbytes or more.
The counterpart to program memory is data memory. The packets of data sent can be quite large-such as more than 1,500 bytes for Ethernet. A typical microcontroller from the past had fewer than 100 bytes of RAM. Ethernet controllers with integrated RAM usually have between 8 and 20 kbytes of RAM to hold several incoming and outgoing packets of data. Without the expanded memory sizes, the authentication, encryption and message-transfer protocols use all the space and leave only a few scraps of space for the actual application.
Another feature that is equally important is the operating frequency of the microcontroller. To be able to process messages and keep up with the data rate, the microcontroller must run faster. Increasing its operating frequency, and reworking the instruction set to provide leaner instructions that are more powerful, will both increase processing power. RISC-based microcontrollers have a very small instruction set that is very powerful.
One instance of increasing the processing power of a device through operating frequency and instruction set is the migration from a PIC16Fxxx to a PIC18Fxxx device. The PIC16Fxxx versions have a maximum operating frequency of 20 MHz and an instruction set containing 35 instructions. The PIC18Fxxx was designed to be an upward migration path from the PIC16Fxxx that includes an operating frequency of 40 MHz and 77 instructions. While doubling the operating frequency, the PIC18Fxxx adds additional in structions such as conditional branch and compare. These instructions help to streamline the code written for an authentication, encryption or TCP/IP stack.
One application that has experienced a change from purely mechanical to electrical to being a connected Net-centric device is the utility meter. Everyone has a watt-hour meter to measure power consumed, and these meters have slowly been changing from the mechanical to the electrical over the last 20 years. Many homes have a meter that provides a dual rate-the first is for off-peak hours and is much lower than the second, which is for on-peak hours.
Cost disincentive
The idea is that people will use less on-peak power if it costs more. This helps to spread the daily load on the utility company so that more resources are not built just to support peak demands. With the problem in California and deregulation looming in many other states, power companies have been seeking ways to effectively allocate resources to manage loads.
One solution is to install an electronic meter to log data at short intervals, such as 15 minutes, and transfer that information to the utility company monthly. The information helps the power company plan the development of new plants and equipment to create and distribute electricity more efficiently. But connectivity is now playing a more significant role in the transfer of stored data. So rather than wait a month to retrieve the data from a meter, utility companies are searching for solutions that allow daily and, in some cases, real-time streaming of recorded data.
Several methods are available for transferring the data. One readily available medium is the phone line; it is cost-efficient because the infrastructure is in place. Usually, a phone line is not far from a watt-hour meter. The meter can place a phone call to a local Internet service provider, connect to the server using the Point-to-Point Protocol (PPP) and then send an e-mail using a TCP/IP stack and mail program.
T he second medium is RF, using cellular or spread-spectrum devices. While adding cost to put the infrastructure in place, this approach offers the same capabilities as the phone line where a PPP connection can be made and data transferred using TCP/IP.
The other medium not usually considered until recently is the power line itself. The limiting factor was the local transformers, which interfered with the communication method. But several new techniques, such as spread-spectrum transceivers, have overcome this limitation. All of these media are available to the 8-bit microcontrollers today because of the increased memory sizes and operating frequencies to handle the TCP/IP stack or the spread-spectrum communications.
Related Articles
New Articles
- Quantum Readiness Considerations for Suppliers and Manufacturers
- A Rad Hard ASIC Design Approach: Triple Modular Redundancy (TMR)
- Early Interactive Short Isolation for Faster SoC Verification
- The Ideal Crypto Coprocessor with Root of Trust to Support Customer Complete Full Chip Evaluation: PUFcc gained SESIP and PSA Certified™ Level 3 RoT Component Certification
- Advanced Packaging and Chiplets Can Be for Everyone
Most Popular
- System Verilog Assertions Simplified
- System Verilog Macro: A Powerful Feature for Design Verification Projects
- UPF Constraint coding for SoC - A Case Study
- Dynamic Memory Allocation and Fragmentation in C and C++
- Enhancing VLSI Design Efficiency: Tackling Congestion and Shorts with Practical Approaches and PnR Tool (ICC2)
E-mail This Article | Printer-Friendly Page |