Developers of low cost battery-powered products, including those made for use in a spate of wireless applications, are passionate about the need for longer battery life, yet they cannot sacrifice processor performance to obtain it.
With these criteria in mind, Freescale Semiconductor launched a new 9S08 (HCS08) line of low-voltage/low-power 8-bit flash microcontrollers. An extension of the HC08 family, the 9S08 family offers extended battery life with maximum performance down to 1,8 V, industry-leading flash technology and innovative on-chip development support.
Featuring multiple power management nodes, a 20 nA power-down mode and auto wake-up timer mode, the 9S08 MCUs are designed to get the most out of any battery. Other key features are a fast start-up and flexible multifrequency clock sources, including an on-chip programmable, component-less, internal clock generator with frequencies from 4 to 20 MHz bus rates. With a 50 ns minimum instruction cycle time down to 2,1 V at 20 MHz (125 ns to 1,8 V at 8 MHz), the performance of the 8-bit parts, with up to 20 MIPS, exceeds that of many 16-bit solutions.
These MCUs flash technology allows in-application reprogramming and the flash memory can be used for data as well as code storage. The flash is available from 16 to 60 KB configurations. RAM is available in 1, 2 and 4 Kb arrays.
Other features include an eight-channel, 10-bit ADC, 16-bit timer/pulse-width modulation with up to eight channels and an internal clock generator. The microcontroller also comes with a voltage regulator and low-voltage reset, two asynchronous serial input/output ports, SPI and I²C interfaces, an 8-bit keyboard interrupt port, as many as 56 general-purpose I/O channels with software-programmable pull-ups, and various packaging options (see Figure 1).
Additionally, the 9S08 family is object-code compatible with Freescale's 68HC05 and 68HC08 for easy migration. A comprehensive portfolio of services and hardware and software tools to speed designs is available. Among these services and tools are a 9S08 developer kit, online training, a large application note library, several reference designs and a Metrowerks CodeWarrior Development Studio for 9S08 - special edition.
Advances in debugging
Developing and testing software has become the major slice of many embedded systems development budgets. Therefore considerable industry efforts have been aimed at making this job easier. One method is integrating sophisticated non-intrusive debugging systems on-chip.
Conventionally, the way to debug application code for microcontroller units (MCUs) is to use a monitor program. A bootstrap mode allows download of a portion of code into RAM for execution and debugging. A disadvantage of this approach is its intrusiveness, as the memory map and some I/O functions could be inadvertently altered.
In-circuit emulators (ICE) were also developed to allow easy access to the registers and memory map of the CPU, allowing simple implementation of features such as hardware breakpoints and trace functionality. The ICE allows a target cable to be connected (via a header/socket interface) to the circuit board. The header is basically an exact representation of the MCU package pin-out. There are some problems with the conventional approach to in-circuit debugging. The challenges come as microcontrollers integrate more and more functions onto a single chip, running significantly faster with every new version, and using an increasing number of pins. Cables and target connectors are becoming more complex, expensive and fragile, while space restrictions on the target board will often exclude a hookover type of connection because of its physical size.
On-chip debugging
A solution to these problems has been to dedicate some space on the MCU to circuits that will aid the development of software and debugging. This is an alternative to monitors and in-circuit emulators. Serial debugging is a configuration of hardware and software that allows a host system (such as a PC) to communicate with an embedded chip. There are a number of serial debugging methodologies, but all use a limited number of pins to talk to the target MCU from a host computer.
Serial debugging systems are becoming popular on 32-bit MCUs, and have more recently been implemented on 8-bit devices like Freescale's 9S08 family of microcontrollers. A logical next step in serial debugging is to relieve the involvement of on-circuit resources from the test function to allow for more or less normal operation of the circuit being tested. Figure 2 illustrates a typical microcontroller-based system that has been set up for this type of background debug access. The host PC is connected to the target system via a background debug mode (BDM) interface.
The on-chip BDC is a hard-wired circuit, so a monitor program is not required inside the MCU. This means that it is now possible to debug a user program in the target system without using the CPU or its instructions. This allows the user to access internal memory on the MCU from the host PC while the user program is actually running. The advantage of debugging when the host is running is that the operating conditions are identical to when the system is in everyday use - there will be no operating glitches that are hidden from the designer. The host PC is connected to the target system via the BDM interface using a parallel cable or universal serial bus (USB) port.
Using a basic low pin-count connector, the BDM interface controls the serial communications protocol that communicates with the target system. On the target system side, a basic interface includes connections for the background pin, reset, power and ground. Though optional, the reset connection is useful because it allows the target board to be reset by a keystroke on the host. The power connection, also optional, allows the BDM interface to derive power from the host. The background pin is used to enter the serial debugging mode.
The only non-optional pin is the background pin, which is also used for bi-directional serial communications. The advantage of using a single pin entry into background mode is that all of the other pins on the MCU can be used for their designated in-circuit functions.
A system set up in this way allows active control of the microprocessor registers, to provide step instructions and see the effect of those instructions on the MCU's registers. Non-intrusive control also enables read or write commands to user-memory or peripheral control registers and can modify background control registers that are not part of the memory map. Because non-intrusive commands can access memory when the CPU is operating in normal run mode, the scope of the debugging capability is significantly higher than is available using traditional monitor-based debugging approaches.
Once the background debugging interface has been implemented on a target system, it is possible to use it for programming and reprogramming the MCU's flash memory if a software upgrade or bug fix is required. It can also be used for diagnostics. The benefits to designers of embedded systems are reduced development time and costs.
Tel: | +27 11 236 1900 |
Email: | [email protected] |
www: | www.ebv.com |
Articles: | More information and articles about EBV Electrolink |
© Technews Publishing (Pty) Ltd | All Rights Reserved