AN1921 Motorola / Freescale Semiconductor, AN1921 Datasheet - Page 4

no-image

AN1921

Manufacturer Part Number
AN1921
Description
AN1921 General DSP568xx Interface Examples using the Embedded SDK
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
LCD and Keypad User Interface Description
Code Example 1. LCDsimple.c, code used to demo DSP control and use of LCD/keypad
4
The Metrowerks’ C compiler/IDE for the Motorola DSP568xx is used to produce the example code in
C which demonstrates usage of the LCD/keypad. This code is shown in
Motorola’s Embedded SDK serial and EVM board support libraries. The SDK’s serial library
accommodates the MAX3100 UART chip that is interfaced to the EVM board’s DSP56824’s SPI1
port. Additional support for the EVM board is provided by the SDK’s bsp library; for more details, see
the Embedded SDK documentation. The support to these libraries are provided by the included
serial.h and bsp.h header files.
Table 1: Signal description at J2 header between SPI1 and MAX3100 Uart
// LCDsimple.c program tests the interface to a serial port LCD and keypad
#include "port.h"
#include "io.h"
#include "bsp.h"
#include "fcntl.h"
#include "serial.h"
#include "stdio.h"
#include "string.h"
int main()
{
UWord16
int
UWord16
char
int
char
UWord16
UWord16
UWord16
UWord16
UWord16
char
char
UWord16
Pin #
11
1
3
5
7
9
Interface Examples Using the Embedded SDK
I;
Uart;
NewUartState;
astring[]={" DSP-LCD/Keypad test\n"};
sum;
input, inputarray[8];
NewScr[2]= {12,0};
BackLightOn[2] = {14,0};
LightLevel[2] = {2,70};
DispContrast[2] = {3,100};
DispKeypad[2] = {24,1};
bstring[40];
LF[]={10,0}, CR[]={’E’};
ii;
DSP Signal
MISO1/PC4
MOSI1/PC5
SCK1/PC6
SS1/PC7
IRQA
GND
J2
Pin #
10
12
2
4
6
8
UART Signal
DOUT
SCLK
IRQB
GND
DIN
CS
Code Example 1
and uses

Related parts for AN1921