NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
AN1924/D DSP56F805 AN1921/D DSP56824 TLC2543 MAX3100 RS-232 DSP56F807VF80 - Datasheet Archive
MOTOROLA Order by AN1924/D (Motorola Order Number) Rev. 0, 4/2001 Semiconductor Application Note Interfacing Serial LCDs to a
Freescale Semiconductor, Inc. MOTOROLA Order by AN1924/D AN1924/D (Motorola Order Number) Rev. 0, 4/2001 Semiconductor Application Note Interfacing Serial LCDs to a DSP56F805 DSP56F805's SCI and Porting Code Using the Embedded SDK 1. 1. Introduction .1 2. Interface Description .2 3. Descriptions of the Intelligent LCD Modules .3 3.1 Crystalfontz's 634 Intelligent Serial LCD Module . 4 3.2 NetMedia's LCD+ Serial LCD Module. 5 Introduction This application follows an earlier application note ("Some General DSP568xx Interface Examples using the Embedded SDK", AN1921/D AN1921/D) that focused on interfacing the DSP56824 DSP56824 with an LCD, keypad and an SPI-based device, an 11-channel, 12-bit A/D converter (TLC2543 TLC2543). That note described interfacing via the SPI port, either directly, or with the MAX3100 MAX3100 chip that converts SPI signals to a compatible RS-232 RS-232 format. This note will show the relative ease of interfacing either NetMedia's LCD+, including a keypad, or Crystalfontz's 634 Intelligent Serial Display to the Serial Communication Interface (SCI) port of a DSP56F805 DSP56F805. The demonstration code will be written in C and will use Motorola's Embedded SDK libraries. The SCI is a three-line interface, consisting of a transmit line (TXD), a receive line (RXD), and a ground line (GND). The interface allows for asynchronous communication with peripheral devices and other MCUs. The protocol is very similar to an RS-232-based interface, except that the voltage range is that of TTL. 4. Interfacing the LCDs to the DSP56F805 DSP56F805 .5 4.1 Connecting the 634 LCD to the DSP56F805 DSP56F805. 5 4.2 Software for the 634 LCD and the DSP56F805 DSP56F805. 6 4.3 Connecting the LCD+ to the DSP56F805 DSP56F805. 7 4.4 Software for the LCD+ and the DSP56F805 DSP56F805. 8 5. Converting SDK-Based Code .10 6. Conclusions .15 7. References .15 Appendix A. NetMedia's Serial LCD+ .16 This note will also show the modifications required to convert the program for the DSP56824 DSP56824 featured in Application Note AN1921/D AN1921/D to the DSP56F805 DSP56F805, using the Embedded SDK. The modifications are relatively minor and made only to the respective processor's SDK-supported interface code. © Motorola, Inc., 2001 For More Information On This Product, Go to: www.freescale.com Interfacing LCDs and Porting Code ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Freescale Semiconductor, Inc. Joseph R. Pasek Contents Because of an order from the United States International Trade Commission, BGA-packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010: DSP56F807VF80 DSP56F807VF80, DSP56F807VF80E DSP56F807VF80E ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Interface Description ARCH i E t o n Interface DescrIVpDiBY FREESCALE SEMICONDUCTOR, INC. 2005 Motorola's DSP56F80x processors are DSP/MCU hybrids, which not only have the expected capabilities of a DSP, but also the features that allow the processor to perform the functions of a microprocessor. Additionally, the DSP56F80x family of processors offers Systems On a Chip (SOC) technology, and, as shown in Table 1, has a number of on-chip capabilities to accommodate measurements and interfacing to various devices. Table 1: Peripheral Device Interfaces Found on the DSP56F80x Processors Description Availability Motorola Scalable Controller Area Network (MSCAN) Communication Controller implementing CAN 2.0 A/B DSP56F803 DSP56F803 DSP56F805 DSP56F805 DSP56F807 DSP56F807 MUXed input 12-bit Analog-to-Digital Converters (ADC) Dual 4-input 12-bit ADC DSP56F801 DSP56F801 DSP56F803 DSP56F803 DSP56F805 DSP56F805 DSP56F807 DSP56F807 Quadrature Decoders Used to determine orientation of a motor shaft DSP56F801 DSP56F801 DSP56F803 DSP56F803 DSP56F805 DSP56F805 DSP56F807 DSP56F807 Pulse Width Modulator (PWM) Module A modulation technique employed to control various kinds of electric motors DSP56F801 DSP56F801 DSP56F803 DSP56F803 DSP56F805 DSP56F805 DSP56F807 DSP56F807 Serial Communication Interface (SCI) Module This interface allows asynchronous serial communications with peripheral devices and MCUs. A "TTL" RS-232 RS-232 interface. DSP56F801 DSP56F801 DSP56F803 DSP56F803 DSP56F805 DSP56F805 DSP56F807 DSP56F807 Serial Peripheral Interface (SPI) Module ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Freescale Semiconductor, Inc. SOC Devices This allows full-duplex, synchronous, serial communication between the DSP and peripheral devices DSP56F801 DSP56F801 DSP56F803 DSP56F803 DSP56F805 DSP56F805 DSP56F807 DSP56F807 The interface techniques explained here will work equally well with any member of the DSP56F80x group of processors; this application was developed for the DSP56F805 DSP56F805 processor. Figure 1 shows the EVM card and the external interfaces to the two available SCI modules found on the DSP56F805 DSP56F805. Figure 2 provides a closer view, centered on the DSP's SCI1 interface, the EVM board's J17 header. The intelligent LCDs will be connected to the SCI1 port. 2 Interfacing LCDs and Porting Code For More Information On This Product, Go to: www.freescale.com MOT Because of an order from the United States International Trade Commission, BGA-packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010: DSP56F807VF80 DSP56F807VF80, DSP56F807VF80E DSP56F807VF80E 2. Freescale SC micoMICONDUCTOR, IN ARCHIVED BY FREESeALE SEnductor, Inc. C. 2005 Freescale SC micoMICONDUCTOR, IN ARCHIVED BY FREESeALE SEnductor, Inc. C. 2005 Descriptions of the Intelligent LCD Modules Figure 1. Motorola's DSP56F805 DSP56F805 EVM Board Figure 2. The J17 Header (SCI1 Port) on the DSP56F805 DSP56F805 EVM Board 3. Descriptions of the Intelligent LCD Modules Specifications of the two intelligent serial LCD devices which will be interfaced to the DSP56F805 DSP56F805's SCI1 port are contained in this section. MOT Interfacing LCDs and Porting Code For More Information On This Product, Go to: www.freescale.com 3 Because of an order from the United States International Trade Commission, BGA-packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010: DSP56F807VF80 DSP56F807VF80, DSP56F807VF80E DSP56F807VF80E ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Freescale Semiconductor, Inc. ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Freescale SC micoMICONDUCTOR, IN ARCHIVED BY FREESeALE SEnductor, Inc. C. 2005 Descriptions of the Intelligent LCD Modules This LCD module has attracted attention for its capability of interfacing as either an RS-232 RS-232 device or as an SPI device. As it comes from the factory, it is set up for 9600 Baud RS-232 RS-232 operation. To use it as an SPI device, the Jumper JPA must be soldered closed. However, the throughput of the LCD's SPI port is very slow (Fclk.max=18 kHz) and SPI ports on the DSP56F80x family are incapable of such slow speed without extraordinary manipulation of the DSP chip's clocking rate. Therefore, interface as an RS-232 RS-232 device is recommended. These are the features of the 634: DB9 connector provided for a simple RS-232 RS-232 hookup · · Available with bright, even, software-adjustable LED backlighting or in a low-power reflective model Available as either 20x4 (Model 634) or 16x2 (Model 632) display · Software-controlled contrast · "Gapless" horizontal contrast · Software-controlled, terminal-style automatic scrolling and line wrapping · · Unique "Scrolling Marquees" feature continuously scrolls a message across the display without host intervention Low-speed "SPI" and "Inverted TTL" RS-232 RS-232 for embedded application · Buffered communication · ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 RS-232 RS-232 interface (1200, 2400, 4800, and 9600 Baud) · Freescale Semiconductor, Inc. · Low power: Non-backlight operation will self-power from the DTR and RTS lines of most serial ports A microcontroller is built into the LCD's support and a ROM stores the necessary code for its operation. Further information is available from Crystalfontz's web site: www.crystalfontz.com. www.crystalfontz.co Figure 3 shows the 634's display on power-up. Figure 3. Crystalfontz's 634 Intelligent Serial LCD Module Display 3.2 NetMedia's LCD+ Serial LCD Module NetMedia's intelligent LCD was featured in the application note, "General DSP568xx Interface Examples Using the Embedded SDK", AN1921/D AN1921/D. The LCD+ comes with a 20x4 display and a built-in port capable of supporting a keypad up to 4x4 in size. It supports an RS-232 RS-232 interface that can work at either normal or TTL voltage levels. 4 Interfacing LCDs and Porting Code For More Information On This Product, Go to: www.freescale.com MOT Because of an order from the United States International Trade Commission, BGA-packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010: DSP56F807VF80 DSP56F807VF80, DSP56F807VF80E DSP56F807VF80E 3.1 Crystalfontz's 634ARCHIiVent BeriaREESCMoE SEMICONDUCTOR, INC. 2005 Intell gED S Y F l LCD AL dule Freescale SC micoMICONDUCTOR, IN ARCHIVED BY FREESeALE SEnductor, Inc. C. 2005 Interfacing the LCDs to the DSP56F805 DSP56F805 Among the features of ARCHIVE: BY FREESCALE SEMICONDUCTOR, INC. 2005 the LCD+ D Serial I/O: RS-232 RS-232 or Inverted TTL (2400 to 57600 Baud (8,N,1) · Keypad input: 4x4 matrix type · Power requirements: 5V to 15V DC at 9mA (200mA maximum with the backlight on) · LCD type: 4x20 Supertwist · Analog-to-Digital Converters: a bank of 10 with 10-bit resolution · Relay Drivers · FlashROM ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Freescale Semiconductor, Inc. Although the LCD+ may offer more than needed for this effort, other applications may require some of its features. The LCD+ has its own microcontroller and software in ROM to implement its features. An example of its display is shown in Figure 4. Figure 4. Example of NetMedia's LCD+ display See Appendix A. for additional details about the LCD+. 4. Interfacing the LCDs to the DSP56F805 DSP56F805 This section explains how to connect each LCD to the DSP56F805 DSP56F805 device and contains code examples demonstrating the interface. 4.1 Connecting the 634 LCD to the DSP56F805 DSP56F805 The Crystalfontz 634 Intelligent Serial LCD module comes equipped with a male DB9 connector port. The lines on the female side are connected in null modem fashion to the three pins of the EVM board's J17 header; i.e., EVM_TXD is connected to LCD_RXD. 4.2 Software for the 634 LCD and the DSP56F805 DSP56F805 Metrowerks' CodeWarrior, an Embedded DSP C compiler for the DSP568xx, was used to write, compile and execute the code to control the 634 LCD. Code Example 1 demonstrates the interface between DSP56F805 DSP56F805 and the 634 LCD device. MOT Interfacing LCDs and Porting Code For More Information On This Product, Go to: www.freescale.com 5 Because of an order from the United States International Trade Commission, BGA-packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010: DSP56F807VF80 DSP56F807VF80, DSP56F807VF80E DSP56F807VF80E · Interfacing the LCDs to the DSP56F805 DSP56F805 Code Example 1. LCD634 LCD634_sci_test.c Because of an order from the United States International Trade Commission, BGA-packaged product lines and part numbers indicated here currently are not available from Freescale for import or sale in the United States prior to September 2010: DSP56F807VF80 DSP56F807VF80, DSP56F807VF80E DSP56F807VF80E // LCD634 LCD634_sci_test.c program tests the interface between a DSP // 56805 using its SCI port and a LCD (Crystalfontz // 634 Intelligent serial display - March 1, 2001 ) #include "port.h" #include "io.h" #include "bsp.h" #include #include #include #include #include #include "fcntl.h" "sci.h" "stdio.h" "assert.h" "string.h" "timer.h" int main() { UWord16 I; int SciFD; sci_sConfig SciConfig; struct timespec FiveSeconds = {5,0}; char char char UWord16 char UWord16 aastring[]={" DSP56F805-SCI DSP56F805-SCI "}; bstring[]={" LCD 634 Disp Test "}; input, inputarray[8]; NewScr[2]= {12,0}; // Clear Screen on LCD astring[20]; temp; /* Set-up parameter for SCI port - 8 bit, no parity, TX_inverted */ 6 Interfacing LCDs and Porting Code MOT Freescale SC micoMICONDUCTOR, IN ARCHIVED BY FREESeALE SEnductor, Inc. C. 2005 Interfacing the LCDs to the DSP56F805 DSP56F805 nanosleep(&FiveSeconds, NULL); SEMICONDUCTOR, INC. 2005 /* Wait five seconds */ write( SciFD, NewScr, 1 ); /* Wipe clean LCD's Display */ for ( I=0; I < 29; I+ ) /* Write some numbers to LCD */ { sprintf(astring, "%d ", I ); write (SciFD, astring, strlen(astring); } ARCHIVED BY FREESCALE SEMICONDUCTOR, INC. 2005 Freescale Semiconductor, Inc. nanosleep(&FiveSeconds, NULL); /* Wait five seconds */ write( SciFD, NewScr, 1 ); /* Wipe clean LCD's Display */ temp = 'A'; for ( I=0; I