Interfacing Philips Bridge IC With Philips Microcontroller: Rev. 01 - 17 May 2006 Application Note
Interfacing Philips Bridge IC With Philips Microcontroller: Rev. 01 - 17 May 2006 Application Note
Document information
Info Content
Keywords SC16IS750 to P89LPC935, Bridge IC to microcontroller, serial interface
Abstract The operation and description of Philips LPC900 Series microcontroller
such as P89LPC935 to Philips Bridge IC such as SC16IS750 for
high-speed serial data communication is discussed in this application
note. In addition, the source code in C language, containing
communication routines between the P89LPC935 microcontroller and the
SC16IS750 Bridge IC is provided. This application note is also applicable
to other Bridge ICs such as SC16IS740, SC16IS760, SC16IS752, and
SC16IS762.
Philips Semiconductors AN10452
Interfacing Philips Bridge IC with Philips microcontroller
Revision history
Rev Date Description
01 20060517 application note; initial version
Contact information
For additional information, please visit: http://www.semiconductors.philips.com
For sales office addresses, please send an email to: [email protected]
AN10452_1 © Koninklijke Philips Electronics N.V. 2006. All rights reserved.
1. Introduction
The Philips Bridge IC is a new generation of interface solutions for managing high-speed
serial data communication among various bus interfaces such as SPI, I2C-bus, and UART
including RS-232 and RS-485. The Bridge IC is commonly used to overcome the
limitation of the host bus interface to peripherals and to provide easy interface with
existing different serial buses.
The description of the block diagram, hardware, firmware, and software are described in
the next paragraphs for users to quickly understand the implementation of the Philips
LPC900 Series microcontroller to Philips Bridge IC serial interface for RS-232 point-point
communication, RS-485 multi-drop application, IrDA wireless links communication, and
GPIO interface. The source code in C language is provided to show how to write a simple
communication program between the microcontroller and the Bridge IC serial interface.
The goal is to help users to design the Bridge IC in their application and also shorten their
product development cycle.
2. Block diagram
The block diagram depicted in Figure 1 shows the circuit connection between a Philips
Bridge IC such as SC16IS750 and Philips LPC900 Series microcontroller such as
P89LPC935. The Bridge IC offers simple, flexible, and minimal connection to the
microcontroller. The Bridge IC embedded SPI and I2C-bus for the host interface so the
microcontroller can easily control the Bridge IC with four-wire connection through SPI or
I2C-bus, which is a widely used serial bus interface. If the SPI-bus interface is selected,
the Bridge IC can interface to the microcontroller with a 4-wire connection. The signals on
the 4 wires are MISO (Master Input Slave Output), MOSI (Master Output Slave Input), CS
(Chip Select), and SPICLK (SPI Clock). If the I2C-bus is selected, the Bridge can interface
to the microcontroller with a 2-wire connection. The signals on the 2 wires are SCL (Serial
Clock) and SDA (Serial Data).
After the microcontroller and Bridge IC are wired properly and their connection is
established, the microcontroller can send data to and receive data from UART devices via
the Bridge IC. The Bridge IC receives the data from the microcontroller via the SPI or
I2C-bus interface and sends the data to the UART devices via RS-232 or RS-485 bus
interface, and when the Bridge IC receives the data from the UART devices the Bridge IC
will notify the microcontroller by generating an interrupt signal; then the microcontroller
can access the data from the Bridge IC via the SPI or I2C-bus interface.
002aac317
3. Hardware description
The hardware consists of the two major parts, which are the microcontroller and the
Bridge IC. The Bridge IC provides a seamless interface convergence between the SPI or
I2C-bus and RS-232 or RS-485 protocols and vice versa. In addition, the Bridge IC checks
the data transmission for errors and maintains very high data throughput.
The transceivers are optional and can be intended for RS-232 or RS-485 communication
interface. The transceivers consist of drivers and receivers. The drivers convert the
UART-logic output levels to RS-232 or RS-485 signals, whereas the receivers convert the
RS-232 or RS-485 signals to UART-logic input levels. If the UART-logic level conversion is
not required, the transceivers are optional.
For hardware connection details, please refer to the schematic shown in Figure 2 and
Figure 3.
Philips Semiconductors
SPI_MISO
A VCC
SPI_CS
B
SPI_SCLK
C C3
SPI_MOSI 0.1 µF
D
U2 26 25
JP1 VCC 28 VCC GND
C1+ 27 C4
C5 V+ 0.33 µF
1
SPI_CS 0.1 µF 24
2 C1− 3 C6
SPI_MISO V−
3
SPI_MOSI 0.33 µF
4 1 22
SPI_SCLK C2+ SHUTDOWN_N VCC
5 C7 23
VCC 0.1 µF ONLINE_N
6 2 21 P1
IRQ_N VCC C2− STATUS_N
7 1
R1 JP2 TXD 14 9 6
SPI-BUS 10 kΩ T1IN T1OUT
C24 RTS_N 13 10 2
T2IN T2OUT
0.1 µF 1 DTR_N 12 11 7
T3IN T3OUT
2 3
U3 3 19 4 8
R2 R1OUT R1IN
1 16 RI_N 18 5 4
VCC A1 VCC I2C/SPI R2OUT R2IN
2 15 CD_N 17 6 9
10 kΩ COM1 B4 R3OUT R3IN
3 14 Y1 CTS_N 16 7 5
B1 COM4 VCC R4OUT R4IN
4 13 14.7465 MHz DSR_N 15 8
R3 A/B_N A4 R5OUT R5IN
5 12 DB9
A2 VL connector
6 11 RS-232 transceiver
Rev. 01 — 17 May 2006
I2C/SPI_N XTAL1
CS/A0_N 6 1
I2C-BUS CS/A0_N RESET_N
SI/A1 7 24
SI/A1 RXD
SPI MISO 8 23
SO TXD
I2C_SCL SCL/SCLK 9 22
F SCL/SCLK CTS_N
I2C SDA 10 21
I2C_SDA SDA RTS_N
G IRQ_N 11 20
IRQ_N GPIO7/RI_N
IO0 12 19
GPIO0 GPIO6/CD_N
IO1 13 18
RESET_N GPIO1 GPIO5/DTR_N
AN10452
H IO2 14 17
GPIO2 GPIO4/DSR_N
IO3 15 16
GPIO3 GND
SC16IS750/760-HVQFN24
002aac318
5 of 10
Philips Semiconductors
SPI_MISO
A
SPI_CS
B
SPI_SCLK
C
SPI_MOSI
D
VCC
C19 C20
10 µF 0.1 µF
VCC
U7 7 21
R13 VSS VDD
10 25
10 kΩ P1.4/INT1_N P0.2
S1 15 2
P2.4/SS_N P0.3
6 1
P1.5/RESET_N P0.4/PDA
24
SW SPST P0.5/PCL
C18 14
0.1 µF P2.3/MISO
13 16
Rev. 01 — 17 May 2006
P2.2/MOSI P2.5/SCLK
11 18
P1.3/SDA P1.0/TXD
12 17
P1.2/SCL P1.1/RXD
9
P3.0/XTAL2
8 28
Philips P89LPC935
IRQ_N
E
I2C_SCL
F
I2C_SDA
G
RESET_N
H
VCC
© Koninklijke Philips Electronics N.V. 2006. All rights reserved.
U9
4 002aac319
BODY
J5 1 3
VIN
2 2
VOUT
3 1
C21 C22 GND
DC power jack C23
10 µF 10 µF 0.1 µF
regulator
AN10452
6 of 10
4. Software description
The programming of the Bridge IC can be done by writing firmware code, which requires
the following software:
• Keil is one of the embedded system vendors that provide the software development
tools for Philips P89LPC935 microcontroller. The software compiles the firmware code
written in C and generates an ‘Intel Hex’ file. The software evaluation development kit
can be downloaded from the Keil website.
• ”Flash Magic” is free Windows application software that allows easy programming of
Philips P89LPC935 microcontroller. The software loads the ‘Intel Hex’ file to the
microcontroller by using its in-system programming mode communicating through
serial port. The software can be downloaded from the Embedded Systems Academy
website under “Flash Magic”.
The microcontroller must be powered up in a special ‘ISP mode’ to perform the ISP
operation. The ISP mode allows the microcontroller to communicate with a host device
such as PC through a serial port. The host sends commands and data to the
microcontroller. The commands can be erase, read, and write. After the completion of the
ISP operation, the microcontroller is reconfigured and has to be reset or power cycled so
the microcontroller will operate normally.
The ISP programming for the device can be done using a Windows application software,
which uses an Intel Hex file as input to program it. For more information about the
software, please refer to Section 4 “Software description”.
6. Firmware description
The firmware code for the P89LPC935 microcontroller is written in C language. It can be
compiled by using an embedded C compiler. For more information about the compiler,
please refer to Section 4 “Software description”.
The firmware code consists of three major blocks: Main Loop, Interrupt Service Routine,
and Bus Interface layer, and are described in
the microcontroller and the bus interrupt bits must be enabled. The other function of the
Main Loop is to keep checking the event flags and pass to the appropriate subroutine for
further processing.
7. Conclusion
Philips Bridge IC provides easy interface to a host controller such as Philips P89LPC935
microcontroller, enables seamless and high-speed SPI or I2C-bus to RS-232 or RS-485
protocols convergence including GPIO for general-purpose input/output and IrDA for
wireless links, and offers low voltage operation, low power consumption, and compact
design which is suitable for battery-operated applications. In addition, the Bridge IC
reduces software overhead, frees up the host controller resources, increases design
flexibility, and improves overall system performance. For more details about the Bridge
ICs, please download the data sheets from the Philips Semiconductors website under
“Interface & Control, UARTs”.
8. Legal information
8.1 Definitions Suitability for use — Philips Semiconductors products are not designed,
authorized or warranted to be suitable for use in medical, military, aircraft,
space or life support equipment, nor in applications where failure or
Draft — The document is a draft version only. The content is still under
malfunction of a Philips Semiconductors product can reasonably be expected
internal review and subject to formal approval, which may result in
to result in personal injury, death or severe property or environmental
modifications or additions. Philips Semiconductors does not give any
damage. Philips Semiconductors accepts no liability for inclusion and/or use
representations or warranties as to the accuracy or completeness of
of Philips Semiconductors products in such equipment or applications and
information included herein and shall have no liability for the consequences of
therefore such inclusion and/or use is for the customer’s own risk.
use of such information.
Applications — Applications that are described herein for any of these
products are for illustrative purposes only. Philips Semiconductors makes no
8.2 Disclaimers representation or warranty that such applications will be suitable for the
specified use without further testing or modification.
General — Information in this document is believed to be accurate and
reliable. However, Philips Semiconductors does not give any representations
or warranties, expressed or implied, as to the accuracy or completeness of 8.3 Trademarks
such information and shall have no liability for the consequences of use of
Notice: All referenced brands, product names, service names and trademarks
such information.
are the property of their respective owners.
Right to make changes — Philips Semiconductors reserves the right to I2C-bus — logo is a trademark of Koninklijke Philips Electronics N.V.
make changes to information published in this document, including without
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
to the publication hereof.
9. Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3 Hardware description . . . . . . . . . . . . . . . . . . . . 4
4 Software description . . . . . . . . . . . . . . . . . . . . . 7
5 In-System Programming mode. . . . . . . . . . . . . 7
6 Firmware description . . . . . . . . . . . . . . . . . . . . 7
6.1 Main Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.2 Interrupt Service Routine . . . . . . . . . . . . . . . . . 8
6.3 Bus interface layer . . . . . . . . . . . . . . . . . . . . . . 8
7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8 Legal information. . . . . . . . . . . . . . . . . . . . . . . . 9
8.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.2 Disclaimers . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
8.3 Trademarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
9 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section ‘Legal information’.