Content originally posted in LPCWare by Rob65 on Sun Apr 24 04:53:09 MST 2011
Quote: cesimkaol
when ı debug it,following errors occurs...I added necessary libraries from CIMSIS ...but ı cant solve...
"../src/i2cslave.c"
../src/i2cslave.c: In function 'I2C_IRQHandler':
../src/i2cslave.c:53: error: 'LPC_I2C' undeclared (first use in this function)
These are compiler errors. You are not even getting within a mile from your target board at this time.
Please make sure you have set up your LPCXpresso project correctly: select the proper MCU settings, directories and other stuff. The quickstart manual delivered with the software, the lpc17xx user manual and the FAQ at the CodeRed website should get you up&running with this.
Even if someone would hand you a complete working project I doubt that, without consulting any of the available documentation, you would be able to create a working project.
Sorry but I don't think we could explain you everything you need to know. A lot of this stuff (like how to assign a slave address) can be found in the manuals already.
Ok, just this once: section 19.6.3 "Slave receiver mode" in the lpx17xx user manual tells you "To initialize
the slave receiver mode, write any of the Slave Address registers (I2ADR0-3)".
Now read the rest of chapter 19 and especially take a look at "19.8.7 I2C Slave Address registers"
Rob