AN1924 Motorola / Freescale Semiconductor, AN1924 Datasheet - Page 12

no-image

AN1924

Manufacturer Part Number
AN1924
Description
AN1924 Interfacing Serial LCDs to a DSP56F805s SCI and Porting Code Using the Embedded SDK
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
Converting SDK-Based Code
12
#include "io.h"
#include "fcntl.h"
#include "bsp.h"
#include "spi.h"
#include "stdio.h"
#include "sci.h"
#include "string.h"
#include "port.h"
#include "timer.h"
#include "types.h"
#include "math.h"
#include "lcd.h"
#include "TLC2543.h"
// Prototype of procedure
void BaroAdj( int , Word32 * );
void main(void)
{
static UWord16
static
int
static
char
char
char
static char
struct timespec
int
static UWord16
Word16
static Word32
static Word32
static Word32
SpiParams.bSetAsMaster = 1;
SpiParams.pSlaveSelect = NULL; /* GPIO Pin 5 used for SS */
SpiParams.pSlaveDeselect = NULL;
SpiParams.TransmissionSize = 16;
/* Open SPI0 port */
SerialMaster = open( BSP_DEVICE_NAME_SPI_0, 0, &SpiParams );
/* Open SCI for LCD and keypad devices */
SciConfig.SciCntl = SCI_CNTL_WORD_8BIT | SCI_CNTL_PARITY_NONE \
SciConfig.SciHiBit = SCI_HIBIT_0;
SciConfig.BaudRate = SCI_BAUD_19200;
spi_sParams
sci_sConfig
Interfacing LCDs and Porting Code
ADcmd;
SciFD;
TitleString1[] = {"DSP Interface Demo"};
TitleString2[] = {"
astring[20];
inputarray[8];
OneMillisecond = {0,1000000};
SerialMaster;
Datain, DataStore[70];
i, ii;
sum;
Vcount;
BaroPress, BAdj;
| SCI_CNTL_TX_INVERTED;
SpiParams;
SciConfig;
/* SPI0 is set as master */
/* Size of transmission */
Barometric Meas.\n"};

Related parts for AN1924