AN1924 Motorola / Freescale Semiconductor, AN1924 Datasheet - Page 10

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
Code Example 3. Establishment of Interface
/* Open Serial Port via SPI1 and EVM UART */
Code Example 4. Conversion of Code
/* Open SCI for LCD and keypad devices */
10
Uart = open( BSP_DEVICE_NAME_SERIAL_0, 0 );
NewUartState = MAX3100_FIFO_DISABLE | \
ioctl( Uart, SERIAL_DEVICE_RESET, &NewUartState );
SciConfig.SciCntl = SCI_CNTL_WORD_8BIT | SCI_CNTL_PARITY_NONE \
SciConfig.SciHiBit = SCI_HIBIT_0;
SciConfig.BaudRate = SCI_BAUD_19200;
SciFD = open( BSP_DEVICE_NAME_SCI_1, 0, &SciConfig );
ioctl( SciFD, SCI_DATAFORMAT_EIGHTBITCHARS, NULL );
First, the SDK serial support native to the DSP56824 is not available or needed in the DSP56F805
environment. As shown previously, NetMedia’s LCD+ serial device and its associated keypad work
very well with the DSP56F805’s SCI port. The serial-related DSP56824’s IntFaceBaro.c is shown in
Code Example
SDK serial library.
The IntFaceBaro.c code from
Code Example
support for the DSP56F805’s Serial Communication Interface’s SCI1 port, allowing communication
with NetMedia’s LCD+ serial device and attached keypad.
Once the changes in
to “SciFD” in the code, bi-directional processing between the LCD+ and the keypad becomes possible
using the DSP56F805’s SCI port.
The prototype board, described in AN1921/D with TI’s TLC2543 and Motorola’s MPX4115A
absolute atmospheric pressure sensor, is attached to the DSP56F805’s SPI0 port (J19). The EVM
board’s SPI0 port provides the expected MISO, MOSO, SCLK, and GND signals. The DSP56824
IntFaceBaro.c shown in
to perform the SS signal function for the TLC2543 ADC chip. The necessary changes to adapt to the
DSP56F805’s SPI using the Embedded SDK are shown in
3, which details setup of the interface to the LCD and keypad using the DSP56824’s
4. These lines of code replace the references to the DSP56824’s serial support with
MAX3100_INT_ENABLE_DATA | \
MAX3100_IR_DISABLE | \
MAX3100_STOPBIT_1 | \
MAX3100_PARITY_NONE | \
MAX3100_WORD_8BIT | \
MAX3100_BAUD_9600;
Code Example 4
| SCI_CNTL_TX_INVERTED;
Code Example 5
Interfacing LCDs and Porting Code
Code Example 3
are made and all references to the variable “Uart” are converted
must be modified slightly to enable the GPIO’s Pin 5 (J28)
is converted to the DSP56F805’s SCI interface in
Code Example
6.

Related parts for AN1924