The C Programmer’s Guide to the Mosaic HandheldTable of ContentsPART 1 GETTING STARTED Introduction. How to Use This Manual Chapter 1: Getting to Know Your Handheld Instrument Introducing the Mosaic Handheld Choice of Programming Languages Personality Board and Extensible I/O Chapter 2: Powering Your Handheld PART 2 PROGRAMMING THE MOSAIC HANDHELD Chapter 4: The IDE: Writing, Compiling, Downloading and Debugging Programs Chapter 5: Making Effective Use of Memory Chapter 6: Real Time Programming Chapter 7: Failure and Run-Time Error Recovery Chapter 8: Programming the Graphical User Interface PART 3 COMMUNICATIONS, MEASUREMENT, AND CONTROL Chapter 9: Digital and Timer-Controlled I/O Chapter 11: Serial Communications Chapter 12: The Battery-Backed Real Time Clock Chapter 13: Customizing the Handheld's I/O PART 4: REFERENCE DATA |
Chapter 1 (continued) Hardware FunctionalityThe block diagram of Figure 1‑1 provides a cogent summary of the hardware capabilities of the Mosaic Handheld. Each of the hardware modules shown is described in the following sections. Graphical User Interface: Keypad, LCD Display, BacklightThe Handheld features a keypad and LCD display for showing text and/or graphic images. Combining a high-contrast 3.4” diagonal display and 4 column by 8 row keypad, it comes with software that makes it easy to control your application using menus, graphs, and bitmapped images. You can display your own custom graphics. Display screens and graphic objects are quickly developed with most Windows paint programs, such as PC Paintbrush, allowing you to create sophisticated displays including your company logo, system diagrams, and icon-based control panels. Your application’s startup screen executes automatically on power-up. You can use as many screens as you need, each with software configurable menus. Onboard software draws the screen graphics and responds to button presses for you, so you can focus on your application rather than display maintenance. The GUI Toolkit is described in a separate document titled Handheld GUI Toolkit Manual. Dedicated ON/OFF ButtonThe lower right button of the keypad turns the instrument on and off. A press of the button turns the instrument on, and holding it down in excess of three seconds turns it off. Battery Power for PortabilityThe Handheld may be powered one of three ways: with a power adapter of 15-30 VDC; by six rechargeable NiMH 2100mAH batteries; or, through the DB25 connector on the bottom of the unit. When operated on its batteries it lasts over ten hours with the backlight turned off, and six hours with it turned on. If it is fully loaded with four WildCards and the backlight is continuously on, the batteries last four hours. Whenever the power adapter is plugged in the batteries automatically charge. They fast-charge to approximately 80% of full charge within 90 minutes, then trickle charge the remainder over five hours. The Handheld includes several high-efficiency switching regulators and extensive power line filtering for EMI/RFI isolation. In tethered operation, it may be powered by applying any unregulated or regulated DC input voltage between 15 and 30 volts. In either case, the onboard circuitry is isolated by electromagnetic interference (EMI) suppression circuitry. This improves the reliability of the electronics in harsh industrial environments. When using an AC adapter, the power jack is located on the right side of the enclosure near the bottom. The Handheld can be powered by any power supply that can deliver 15 to 30 volts at 20 watts. Of this, 17 watts is required for fast charging and all other instrument operations require only 3 watts. Consequently, if batteries are not used only 3 watts is required to power the instrument. 68HC11 ProcessorMotorola’s 68HC11F1 programmable microcontroller provides the core capabilities of the Handheld. This chip integrates a central processing unit (CPU), communications, analog and digital I/O, timing capabilities, and memory. In this document we will refer to the microcontroller chip as the 68HC11F1, the 68HC11, or simply the HC11. The processor includes: An 8 bit timer-controlled digital I/O port called PORTA. The timer functions include “input captures” that facilitate accurate measurement of pulse widths, “output compares” that make it easy to generate pulse trains and pulse-width modulated waveforms, and a pulse accumulator. These functions are backed up by interrupts that simplify real-time response to external events. Two of the time lines, PA0 and PA1, may be used for detecting keypad button presses if desired, or the keypad can be scanned without using these timer lines. An 8 channel input port (called PORTE) on the processor that can be configured to read either analog or digital inputs. Analog inputs are converted to an 8 bit digital number by a built-in analog to digital (A/D) converter. A built-in serial communications interface (SCI). The SCI is an asynchronous interface, meaning that there is no clock transmitted with the data. Using the SCI, the Mosaic Handheld can transmit and receive data at standard baud rates to 19200 baud, and at non-standard intra-character rates as high as 250 Kbaud. A serial peripheral interface (SPI) capable of data transfer rates up to 2 megabits per second. Many useful devices communicate via such a synchronous (clocked) serial interface. Multiple peripheral devices can communicate on this interface as long as each device has a unique chip select signal. A watchdog timer that can be configured to reset the processor if the application program fails to execute properly. A clock monitor available to reset the processor if the clock fails. External interrupt request pins and a variety of interrupt functions for quick response to real-time events. 512 bytes of nonvolatile, electrically erasable PROM (EEPROM). Of this, 192 bytes are used by the operating system and 320 bytes are available for your application. EEPROM provides a convenient way to store calibration constants and other information that must be periodically updated. A 16 bit address bus and an 8 bit data bus. While the 68HC11’s native address space is 64 Kilobytes (equal to 65,536 bytes, and often written as 64K), the Mosaic Handheld expands the addressable memory space to 2 Megabytes by effectively adding 5 “page” bits to the address bus. The memory architecture is optimized for fast execution, and the onboard operating system makes page changing transparent to the user. Once you set up your starting memory map, the operating system handles all of the details of accessing memory. Learning More about the 68HC11The Mosaic Handheld uses a version of the 68HC11 microcontroller called the 68HC11F1. Motorola’s M68HC11 Reference Manual and MC68HC11F1 Technical Data Manual are included with this documentation package as Adobe Acrobat Portable Document Format (*.pdf) files. The M68HC11 Reference Manual thoroughly describes how to use microcontrollers of the 68HC11 variety, but it does not describe some of the enhanced features that appear in the F1 version. The MC68HC11F1 Technical Data Manual provides details of the operation of the F1. Memory and Mass MemoryThe Handheld includes 512K Flash memory, 128K RAM (or 1 MB Flash and 512K RAM with the expanded memory option), 512 bytes of EEPROM and an additional 1K RAM (on the processor). Of the 512K of Flash memory, 448K is available for your application program and data storage; the remaining 64K is used by the operating system. Of the 129K (513K, with expanded memory option) of RAM, 125K (509K) is available for application program use. Like PROM, Flash memory is nonvolatile. That is, it retains its contents even when power is removed, and provides an excellent location for storing program code. Simple write-cycles to the device do not modify the memory contents, so the program code is safe even if the processor “gets lost” and overwrites memory. But Flash memory is also re-programmable, and the Flash programming functions are present right in the Handheld’s onboard software library. Compact FlashYou can also add 64 MB, 128 MB, or more of removable mass memory by plugging in a Compact Flash WildCard module. Pre-coded software supports a standard DOS- and Windows-style “FAT” file system, allowing files to be created on a PC and read by the Handheld, or vice versa. Compact Flash cards are easily inserted into a slot on the side of the Handheld. CF memory is now a commodity, so CF modules are easily obtained at low cost with ever increasing capacity. For more information, consult the Compact Flash WildCard User’s Manual. Measurement and ControlBefore adding WildCards, the Mosaic Handheld provides a total of 17 I/O channels, distributed among digital, analog and serial communications functions as shown in Table 1‑1. Table 1‑1 I/O available on the Mosaic Handheld
For each of these I/O lines, pre-coded I/O drivers make it easy to do data acquisition, pulse width modulation, motor control, frequency measurement, data analysis, analog control, PID control, and communications. You may add additional I/O by mounting up to four WildCards within the Handheld enclosure. CommunicationsTwo serial ports and a fast synchronous serial peripheral interface (SPI) provide plenty of communi-cations capability. A hardware UART with single character buffer drives RS232 or RS485 protocols at up to 19.2 Kbaud (the default serial baud rate), and a software UART provides RS232 at up to 4800 baud. Onboard serial interface chips generate the logic levels necessary to implement either the RS232 or RS485 protocol. Two serial ports allow you to program through one while your instrument can still communicate with a third party through the other. The RS485 communications port may be optionally terminated with a resistor or RC network. Jumpers on the processor board allow for the insertion of RS485 network bias resistors. If you need greater speed or more ports, UART Wildcards plug directly into the Handheld’s Wildcard module bus, each providing two more full-duplex RS232/422/485 buffered serial communication ports at up to 56 Kbaud. Real-Time ClockA battery-backed real time clock (RTC) may be optionally included. If so, the RTC’s battery also backs-up the 128K RAM. Note however that if the expanded memory option is chosen, providing 512K of RAM, then the RAM can only be battery-backed if the rechargeable batteries are installed. Personality Board and Extensible I/ONeed even more I/O? A Personality Board provides a platform for you to add custom off-the-shelf I/O modules or your own dedicated circuitry and components. You can also do point-to-point wiring on the Personality Board to bring any I/O to the Handheld’s bottom-mounted DB25 connector or to a probe mounted on the top of the Handheld. WildCard I/O ModulesThe Handheld hosts Mosaic’s WildCards™, small I/O modules for sophisticated and dedicated I/O. Up to four WildCards can be stacked directly on the Handheld’s Personality Board. Available WildCards include: 10/100Mbit Ethernet to serve out static and dynamic web pages; Compact flash mass memory; Data Acquisition Subsystem with a 24-bit resolution programmable gain A/D; 16-bit A/D and 12-bit D/A; Optically isolated AC or DC solid state relays; Configurable general-purpose digital I/O; Fast, buffered RS232, RS422 or RS485 communications interfaces; or, High-voltage, high-current DC inputs and outputs. Customizing Your HardwareYou may want to bring signals into to your handheld instrument. You can configure the DB-25 connector in the Handheld’s base with cross-point wiring on the personality board. In a special area of the personality board you can include filtering or protection circuitry for any of the I/O lines and choose which I/O lines to run to the DB-25 connector, or to a specialized probe connector. The Handheld’s personality board also includes a prototyping area for you to add your own specialized circuitry. It includes mounting holes and power rails with ample room for you to add all kinds of sensors and actuators. |
Home|Site Map|Products|Manuals|Resources|Order|About Us
Copyright (c) 2012 Mosaic Industries, Inc.
Your source for single board computers, embedded controllers, and operator interfaces for instruments and automation