
White Paper How to Quickly Develop a Low-cost Handheld Device James Yang Ph.D, Sr. Technical Staff Member, Toshiba America Electronic Components, Inc. Highlights Abstract Preface • Most handheld devices Handheld devices have become the The basic functions of any handheld device require support for a form factor of choice for many consumer are: user interface input, user interface output similar set of functions: (media players, portable dictionaries, and data storage and exchange. display control, user portable gaming, etc.), medical and The user interface lets consumers input data interface and data industrial devices. Most handheld into the device for processing (i.e. entering an storage/exchange. All of devices share several common address into a GPS device, pushing buttons elements, and using a microcontroller these functions can be on a portable game device, and moving a (MCU) that integrates the peripherals supported by a single scroll wheel on a portable media player). The needed to support these elements can microcontroller touch screen is an increasingly popular user play a big role in getting a new handheld interface for handheld devices and in many • By using a cost-effective device to market quickly and cost applications is replacing more traditional user microcontroller running on effectively. interfaces such as mechanical keys or an open source software The most common elements in handheld switches. In light of this, touch screen platform, designers can devices are man-machine interfaces, interfaces will be a particular focus of this bring handheld devices to such as LCD controllers and paper. market at low cost keypad/touch screen controllers and User interface output consists of the display their related drivers and high-level • The design of a sample or playback of stored content (video, graphics, software IP. Additionally, most handheld etc.). This content is usually presented to the handheld device, a devices require some sort of storage consumer over a color LCD panel, but older portable electronic device controller, for both internal technologies like LED indicators and text dictionary, is provided in storage media (NOR or NAND Flash displays are still used in lower-end handheld this paper memory) and external storage devices devices. such as USB drives or SD (Secure The memory used in handheld devices to Digital) cards. store data continues to increase in density at Additionally, as handheld devices based a phenomenal rate in order to give users the on open source software become ability to store more and more content. In increasingly popular thanks to their low- addition to media for content storage, the cost operating systems, this paper will application code driving today’s handheld describe an open source-based system, devices is also growing and requires more 1 using µC/OS-II and Nano-X Window memory space. The most cost-effective 2 System . storage solution for handheld devices is Finally, all of the various elements of a NAND flash, which is the memory technology handheld device will be examined in an of choice for both onboard memory and actual system-level solution, an e- external storage, typically as USB drives or dictionary based on Toshiba’s SD cards. TMP92CZ26 MCU. 1 See http://www.micrium.com/products/rtos/kernel/licensing.html. License(s) required for commercial use. 2 See http://www.microwindows.org/faq.html. Available for license under the Mozilla Public License (MPL), at http://www.mozilla.org/MPL/MPL-1.1.html, or under the GNU General Public License (GPL), at http://www.gnu.org/copyleft/gpl.html How to Quickly Develop a Low-cost Handheld Device White Paper Now that the basic functionality of a handheld device has been broken down into three categories, a closer RAM MCU look at the most commonly used user interface input, (32-bit) user interface output and memory sub-systems in 16-bit 32-bit handheld devices is warranted. RAM CPU Graphic LCDC/ 1. Color LCD Controller and Graphic Design Driver Driver LCD panel-based graphical user interfaces are used in Z Clock the majority of handheld devices on the market today. X V_Sync Y H_Sync LCDC An LCD panel is comprised of a matrix of pixels, and D_EN each pixel has a red, green and blue sub-pixel. The brightness of the sub-pixel is controlled by an electrical LCD Data (8/•••/24-bit) charge in a capacitor delivered through a transistor. To properly display an image, each sub-pixel needs to be Figure 1.1. LCD system refreshed at a certain time, based on image data held in a frame buffer located in the handheld device’s main 2. Touch Screen system memory. Touch screen technology addresses the conflicting Each pixel on the LCD corresponds to a memory unit demands for smaller device size and larger display size in the frame buffer. The size of the unit depends on the by eliminating the need for traditional user interface color depth (expressed as bits per pixel or BPP). The buttons. color bits are split into the three primary colors red, The three most common touch screen technologies are green, and blue (RGB). Typical color depths are 8-bit resistive, capacitive and surface acoustic wave. The RGB (R3:G3:B2), 12-bit RGB (R4:G4:B4), 16-bit resistive touch screen technology is the least expensive (R5:G6:B5), 18-bit (R6:G6:B6), and 24-bit (R8:G8:B8). of the three and provides good reliability, durability, and Color depth is often referred to in terms of colors. For accuracy. Accordingly, it is a popular touch screen example, 24-bit (R8:G8:B8) is =16 Million colors. An technology for use in handheld devices. MCU used in a handheld device normally has a A resistive touch screen is made up of several layers, dedicated bus to transfer display data from system the most important of which are two thin, metallic, memory to the LCD module. The width of this bus must electrically conductive and resistive layers separated by be able to accommodate the maximum color depth the a thin space. When an object touches a resistive touch LCD is designed to support. panel, these two layers touch at the point of contact. The The LCD panel has a three-dimensional programming panel then electrically acts similar to two voltage model (see Figure 1.1). Two of these dimensions are dividers, and the output from the dividers can locate a the X and Y address of a particular pixel on the LCD, position (X and Y) on a surface plane. (See Figure 2.1) and the third dimension is color depth of the pixel. In order for a GUI designer to build an application that Y– uses a handheld device’s LCD display, a software graphic driver and a hardware LCD controller (LCDC) Touch Screen are required. The software graphic driver maps the 2-D MY MX panel locations to linear memory addresses. The LCD PY controller is a hardware module used to map linear PX memory locations to 3-D data matrices by constantly accessing data from the frame buffer and sending it to External Capacitors the LCD panel. Figure 2.1. Touch-screen basic physics The touch detection procedure involves two steps: the A NAND controller provides registers as interfaces to detection of a touch on the panel (an interrupt to the give programmers access to the NAND flash memory. MCU), followed by the measured position (X/Y) of that A typical set of registers is listed in Table 3-1. touch. To perform these two steps, one of the four pins (PX) is configured as a digital input to generate the interrupt. Each generated X or Y voltage (MX, MY) 100 k ohm provides input to an ADC to indicate relative position, NDCLE OLE OLE NDALE ALE ALE while another (PY) becomes either VCC, grounded or open. Figure 2.2 is a flowchart that illustrates this /NDRE /RE /RE operation. /NDWE /WE /WE NAND NAND Flash–0 Flash–1 NDCF Touch Interrupt R/B R/B NDR/B (Open Drain) (Open Drain) D [7:0] I/O [7:0] I/O [7:0] /CE /WP /CE /WP X Position ADC Read from Y– (X+=VCC, X–=GND, Y+=Floating) /ND0CE External Circuits for Write-Protected Y Position ADC Read from X– (Y+=VCC,Y–=GND, X+=Floating) Figure 3.1. Block Diagram of NAND application Preparing for Another Touch Table 3-1 NAND flash registers (X+=Interrupt Input, X–=Floating, Y+=VCC, Y–=Floating) Register Name NAND Flash Data Transfer Register NAND Flash ECC-code Read Register End NAND Flash Mode Control Register NAND Flash Status Register Figure 2.2. Touch-screen operation NAND Flash Interrupt Status Register NAND Flash Interrupt Mask Register 3. NAND Controller and Driver NAND Flash Strobe Pulse with Register NAND Flash Reset Register NAND flash memory was introduced by Toshiba in 1998 and is now widely used in handheld devices for Commands are sent through the control register to on-board storage. Like a hard disk drive, NAND perform the four basic operations NAND flash is memory uses a block memory management system. capable of: initialize, read ID, read (pages), write Each block consists of a number of pages. The pages (pages), and erase (blocks). are typically 512, 2048 or 4096 bytes in size, plus a few extra bytes (typically 12 to 16) to store error 4. Removable Storage correction code (ECC). The page is a read/write unit, Removable storage devices give users the ability to while erase will affect an entire block. expand on-board storage space, back up data and A NAND flash controller (NDFC) generates the control exchange information. Storage space in the device is signals required to interface with NAND flash memory, divided into linear-addressed blocks (521 bytes per and also includes the ECC calculating circuits.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-