AN1924 Motorola / Freescale Semiconductor, AN1924 Datasheet - Page 6

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
Interfacing the LCDs to the DSP56F805
Code Example 1. LCD634_sci_test.c
// LCD634_sci_test.c program tests the interface between a DSP
//
//
#include "port.h"
#include "io.h"
#include "bsp.h"
#include "fcntl.h"
#include "sci.h"
#include "stdio.h"
#include "assert.h"
#include "string.h"
#include "timer.h"
int main()
{
/* Start for-ever loop */
6
UWord16
int
sci_sConfig SciConfig;
struct
char
char
char
UWord16
char
UWord16
/* Set-up parameter for SCI port - 8 bit, no parity, TX_inverted */
SciConfig.SciCntl
SciConfig.SciHiBit
SciConfig.BaudRate
/* Open SCI Serial Device */
SciFD = open(BSP_DEVICE_NAME_SCI_1, 1, &SciConfig);
/* Configure SCI1 to work with eight bit characters */
ioctl( SciFD, SCI_DATAFORMAT_EIGHTBITCHARS, NULL);
for( ; ; )
{
write( SciFD, NewScr, 1 );
write( SciFD, NewScr, 1 );
write (SciFD, aastring, strlen(aastring)); /* Write Demo title */
write (SciFD, bstring, strlen(bstring));
timespec FiveSeconds = {5,0};
aastring[]={"
bstring[]={"
input, inputarray[8];
NewScr[2]= {12,0};
astring[20];
temp;
56805 using its SCI port and a LCD (Crystalfontz
634 Intelligent serial display - March 1, 2001 )
I;
SciFD;
=
=
=
SCI_CNTL_WORD_8BIT | SCI_CNTL_PARITY_NONE \
| SCI_CNTL_TX_INVERTED;
SCI_HIBIT_0;
SCI_BAUD_9600;
LCD 634 Disp Test "};
Interfacing LCDs and Porting Code
DSP56F805-SCI
// Clear Screen on LCD
/* Wipe clean LCD’s Display */
/* Wipe clean LCD’s Display */
/* Set Baud rate to 9600 */
"};

Related parts for AN1924