Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Sponsor

controlSUITE™ software
Comprehensive.
Intuitive.
Optimized.

Real-world software for real-time control. Details Here!

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | LPC 2144 I2C Slave

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

LPC 2144 I2C Slave - patrickfolci - Nov 13 8:53:31 2009

I have a problem with i2c slave because I not have the correct inizialize procedure.

I have used this procedure:

_BOOL init_i2c_0(void)
{
I2CSlaveState = I2C_IDLE;
I2CS_ReadLength = 0;
I2CS_RdIndex = 0;

//--- set pins ---
MEMMAP = 0x2;

IODIR0 = 0xF0;
IOSET0 = 0xF0;
PINSEL0 = 0x50;

//--- set i2c pll ---
I2C0SCLL = 0xD;
I2C0SCLH = 0xC;

//--- set i2c slave ---
I2C0ADR = 0x20 << 1;

//--- clear flags ---
I2C0CONCLR = I2CONCLR_AAC | I2CONCLR_SIC | I2CONCLR_STAC | I2CONCLR_I2ENC;

//--- set flags ---
//I2C0CONSET = I2CONSET_AA;

//--- Install interrupt handler ---
if ( install_irq( I2C0_INT, (void *)I2C_0_SlaveHandler ) == FALSE )
{
return FALSE;
}

I2C0CONSET = I2CONSET_I2EN | I2CONSET_AA ;
return TRUE;
}

I think this is incorrect because the interrupt is not activated.

Please help me....thaks all.

------------------------------------

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: LPC 2144 I2C Slave - suresh - Nov 13 23:51:36 2009

Go through this book.every thing he mentioned clearly

-------Original Message-------

From: patrickfolci
Date: 11/13/09 19:23:39
To: l...@yahoogroups.com
Subject: [lpc2000] LPC 2144 I2C Slave

I have a problem with i2c slave because I not have the correct inizialize
procedure.

I have used this procedure:

_BOOL init_i2c_0(void)
{
I2CSlaveState = I2C_IDLE;
I2CS_ReadLength = 0;
I2CS_RdIndex = 0;

//--- set pins ---
MEMMAP = 0x2;

IODIR0 = 0xF0;
IOSET0 = 0xF0;
PINSEL0 = 0x50;

//--- set i2c pll ---
I2C0SCLL = 0xD;
I2C0SCLH = 0xC;

//--- set i2c slave ---
I2C0ADR = 0x20 << 1;

//--- clear flags ---
I2C0CONCLR = I2CONCLR_AAC | I2CONCLR_SIC | I2CONCLR_STAC | I2CONCLR_I2ENC;

//--- set flags ---
//I2C0CONSET = I2CONSET_AA;

//--- Install interrupt handler ---
if ( install_irq( I2C0_INT, (void *)I2C_0_SlaveHandler ) == FALSE )
{
return FALSE;
}

I2C0CONSET = I2CONSET_I2EN | I2CONSET_AA ;
return TRUE;
}

I think this is incorrect because the interrupt is not activated.

Please help me....thaks all.

[Non-text portions of this message have been removed]

------------------------------------

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )