Philips Semiconductors
AN10369
Philips ARM LPC microcontroller family
/* Acknowledgement received from slave for slave address */
void ISR_18()
{
/* Port Indicator */
IOCLR=0x20;
/* Data to be transmitted */
I2DAT=0x55;
/* clear SI */
I2CONCLR=0x8;
/* Port Indicator */
IOSET=0x20;
}
/* Acknowledgement received from slave for byte transmitted from master. Stop
condition is transmitted in this state signaling the end of transmission */
void ISR_28()
{
/* Port Indicator */
IOCLR=0x80;
/* Transmit stop condition */
I2CONSET=0x10;
/* clear SI */
I2CONCLR=0x8;
/* Port Indicator */
IOSET=0x80;
}
/********************************************************/
4.4.3 Linking notes for I
2
C code:
Since the interrupt vectors need to be remapped to SRAM hence the interrupt vector
table should be linked to 0x40000000. Remaining files could be linked after the interrupt
vector table. The first instruction to be executed will be the instruction located at
0x40000000, which would be
LDR PC, start
PC gets transferred to the assembly code and from there to the main C code. On an IRQ
interrupt, PC will execute the instruction located at the IRQ interrupt vector in the
interrupt vector table.
LDR PC, [PC, #-0xFF0]
On execution of this instruction, PC will start executing the I
2
C ISR located in the C file.
4.5 Output
waveforms
In the output waveform the following are shown
•
Start condition
•
Stop condition
© Koninklijke Philips Electronics N.V. 2005. All rights reserved.
Application note
Rev. 01 — 06 April 2005
14 of 17