Electronic Design

EiED Online>> Something Red, Something Blue

I decided to write about this pair of development kits because they have a lot in common. Zilog's kit is based on their new 8-pin microcontroller, while Rabbit Semiconductor's Bluetooth solution follows their module-based approach to design. They differ in one major area. Zilog's kit is designed for development work only and a subsequent design would incorporate the chip. Rabbit's solution lets you use the same Bluetooth module in both the development project as well as the final design solution.

There are a couple of other common aspects to the two solutions. On the software side, both come with their own well established development tool chain. These have been around long before the latest Eclipse craze and provide a low-cost alternative to third-party tools. The other aspect is the use of C tools even for these low-cost solutions. The use of C is not surprising, even for 8-bit microcontrollers. However, the availability of high-quality C development tools at an extremely low price, essentially free with the hardware, is something developers should not overlook. The quality and level of integration makes for a very good out-of-box experience.

Seeing Red
I should clarify one thing. Zilog's development kit is designed to be a general development and evaluation tool, not just one for IrDA support. Still, true, on-chip IrDA support is not something that is found on all microcontrollers, even ones with built-in serial ports. Likewise, adding IrDA support is not a simple matter of mating a transceiver to a serial port, so it makes sense to choose an IrDA-enabled solution like that from Zilog if infrared communication is part of an embedded product. Also, it's not surprising that Zilog is also a source for IrDA transceivers.

So why even look at IrDA? Those ports appeared on laptops and some printers and cameras, but their use in the computer world never materialized when it came to use by the general population. It was simply too difficult to aim a laptop at the desired target. Handheld devices had a much better time at it. Getting people to exchange data by "beaming" was practical and fun, but infrared's claim to fame is remote control of audio/visual devices like TVs and amplifiers.

The thing is, remote control is a rather dumb communications environment and IrDA can do much more. This is why the combination of low-cost, low-power, 8-bit microcontrollers and IrDA is so exciting. The small processors make it possible to put a lot more intelligence into a handheld device, and the standard IrDA protocol makes it easier to come up with products that can handle more sophisticated communications with an embedded device or even a laptop.

Zilog's development board (Fig. 1) is small, but the microcontroller and peripherals on the board are smaller. A substantial part of the board is simply for the jumpers that link the microcontroller to on-board peripherals. The development board comes with its own USB emulator and a 3.3-V power supply.

Zilog's software tools (Fig. 2) incorporate a full C compiler. The Z8 IrDA support is embodied in a free pair of application notes (AN0152 and AN1084). This provided enough information and source code to get the IrDA support to work on the development board. I copied the source code from the application note PDF files.

The ZirDA IrDA protocol stack available for the eZ80Acclaim! is available in object and source code form for an extra charge. It uses Zilog's own Tiny-TP (transport layer) that is akin to TCP/IP, but on a much more limited scale and designed specifically for IrDA. The stack supports multiple logical channels across one physical link and provided a way to communicate between the pair of development boards that Zilog sent. The Z8 IrDA support is essentially a lite version of the stack. It sets limits like a baud rate of 9.6 kbits/s and a data block size of 64 bytes.

The IrDA stack and hardware support makes the job of communicating between standard devices much easier. It is simply a matter of connecting the Z8 directly to the IrDA transceiver so the parts count and power consumption are low. The Z8 is designed for low-speed communications (under 115.2 kbits/s), whereas the IrDA standard tops out at 4 Mbit/s. This means the Z8 is best for control applications that do not require large amounts of data to be transferred. Besides, the Z8 does not have enough memory to make 4 Mbit/s a requirement.

Listening To The Blues
Bluetooth got over hyped, but it has finally proven itself to be a low-cost, short-range, reliable communication solution that is applicable to many embedded applications. Unfortunately, most wireless communication solutions are relatively complex in terms of ground-up development because of their analog nature and the sophistication of the required software protocol stack. Rabbit Semiconductor's module-based solution (Fig. 3) is a board that incorporates yet another smaller module with the Bluetooth transceiver chips and a built-in antenna. A version with an external antenna connection is available. There is a status LED and some jumpers on the module as well.

The eb506 Bluetooth module fits between a carrier board and a Rabbit Semiconductor core processor module. I used some R3000 development boards (Fig. 4) and their accompanying Ethernet modules.

The documentation is excellent and covers a variety of installations. I used the first installation example that handles communication between a pair of Bluetooth modules. An example is also included for communication between a Windows CE Bluetooth-enabled device and an eb506. I didn't have a Windows CE device handy to test this application.

The module comes with a Bluetooth stack that runs on the Rabbit 3000 processor. The software is designed to run with Rabbit's Dynamic C (Fig. 5) integrated development environment (IDE) that comes free with the Rabbit core module development kits. Dynamic C has some interesting non-standard extensions, including co-routine support that is very handy in process-control applications.

The Bluetooth stack is relatively simple, as the interface is actually more like a serial modem interface with commands and responses sent as text strings via a serial port. For example, sending "get address" causes the module to send back a 12-digit Bluetooth address. The connection command links a pair of units and puts the systems into data mode. Data can then be sent directly between applications until the link is broken. It is possible to switch back and forth between data and command mode.

This interface approach actually makes the module applicable to any kind of microcontroller with a serial interface. The module supports encryption for secure communication and it should connect to any Bluetooth-compatible system. It can handle baud rates from 9600 to 230.4 kbits/s.

Developing an application using the Bluetooth module was almost anticlimactic. It was just so simple. For short-range point-to-point applications, it is significantly easier to contend with than any 802.11 solution.

By The Book
I've been saving this book to match the evaluation of Rabbit's Bluetooth module. The Rabbit 3000 is Rabbit Semiconductor's latest microcontroller line and it is covered very well in the book Embedded System Design using the Rabbit 3000 Microprocessor by Kamal Hyder and Bob Perrin from Newnes (ISBN: 0-7506-7872-0). It provides a look at the architecture of the chip, as well as how the chip can be used for controlling an embedded system.

The book starts at ground zero, approaching embedded programming techniques from a general standpoint before delving into Rabbit 3000-specific support. It also addresses important programming topics, like debugging, dedicating a full chapter to it. It has some obvious, but useful, quotes like:

"Never assume anything. Never assume the tools are working flawlessly. Never assume that the hardware is good. Never assume that the code is without bugs." Good recommendations for any developer.

The book covers assembler and the examples are a mix of C and assembler embedded in C. The overall theme is digital with only a few mentions of analog interfacing. Networking is well covered with a substantial web application sample.

This book is a "must have" for any developers utilizing the Rabbit 3000 processor.

Note: Zilog is running a special on the Z8 Encore! XP 8-pin microcontroller development kit through June 30, 2005. Until then, the kit is priced at only $9.95! For more about the promotion log onto www.zilog.com/SpringIntoAction.

Related Links
Rabbit Semiconductor/ZWorld
www. rabbitsemiconductor.com

Zilog
www.zilog.com

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish