AN1924 Motorola / Freescale Semiconductor, AN1924 Datasheet - Page 13

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
write ( SciFD, "Adj. for site alt\n", 18);
SciFD = open( BSP_DEVICE_NAME_SCI_1, 0, &SciConfig );
ioctl( SciFD, SCI_DATAFORMAT_EIGHTBITCHARS, NULL );
/* Set bit clock rate */
ioctl( SerialMaster, SPI_BAUDRATE_DIVIDER_32, NULL );
/* SS can be left low between successive SPI bytes */
ioctl( SerialMaster, SPI_CLOCK_PHASE_NOTSET, NULL);
/* TLC2543 is commanded to use analog input 8,
ADcmd = TLC2543_port_8 | \
/* Display demo title on LCD */
write( SciFD, NewScr, 1 );
write( SciFD, TitleString1, strlen(TitleString1));
write( SciFD, TitleString2, strlen(TitleString2));
/* determine if there are any keypad entries */
PosCursor[1] = 42;
write( SciFD, PosCursor, 2);
ii=0;
read ( SciFD, &inputarray[ii], 1);
/* If "A" key on keypad is pressed get input adjustment to barometric
if ( strcmp(inputarray, "A") == 0 )
{
}
for(
{
Output data length = 16 bits,
Output data format = MSB first, unsigned integer
pressure measurement */
sum = 0;
for ( i = 0; i < 64; i++ )
{
BaroAdj( SciFD, &BAdj );
write( SciFD, NewScr, 1 );
write( SciFD, TitleString1, strlen(TitleString1));
write( SciFD, TitleString2, strlen(TitleString2));
;
/* send command word to TLC2543
write(SerialMaster, &ADcmd, sizeof(UWord16));
/* read input from TLC2543
read(SerialMaster, (UWord16 *)&Datain, sizeof(UWord16));
/* 12 bit result is in upper part of 16 bit word */
Datain = Datain >> 4;
TLC2543_data_16 | \
TLC2543_MSB_first | \
TLC2543_Unipolar;
;
)
Interfacing LCDs and Porting Code
/* Set Cursor position in LCD */
/* Call BaroAdj() to get adj. value */
*/
*/
Converting SDK-Based Code
*/
13

Related parts for AN1924