I would suggest to use I2C at the beginning. When you run into timing problems, you may switch to SPI, but imho this is a bit more complicated than I2C.

At first you will need pullup resistors for the I2C lines in the range of ~2k. Without it will not work!

Byte I2C interface is quite simple: After setting up the component and starting it you use

I2C_MasterSendStart(DeviceAddress,I2C_WRITE_XFER_MODE); // Initialize a transaction for writing I2C_MasterWriteByte(Register); // Indicate which register you want to write to I2C_MasterWriteByte(Value); // Write to register I2C_MasterSendStop(); // End of transaction

When you want to read from a device you use (example for reading two bytes

I2C_MasterSendStart(DeviceAddress,I2C_WRITE_XFER_MODE); // Initialize a transaction for writing I2C_MasterWrite(Register); // Indicate which register you want to write to I2C_MasterSendRestart(DeviceAddress,I2C_READ_XFER_MODE); I2C_MasterReadByte(I2C_ACK_DATA); // Read from register I2C_MasterReadByte(I2C_NAK_DATA); // Read from register, last byte is NAKed I2C_MasterSendStop(); // End of transaction

Not too difficult. Keep in mind that most of the APIs (except those for reading a byte) return a status byte which, when non-zero indicate an error condition.

When you get stuck, consider posting your complete project, so that we all can have a look at all of your settings. To do so, use Creator->File->Create Workspace Bundle (minimal) and attach the resulting file.

I am still having problems. I have attached the project. you will see code from a website who has dont it with a psoc 4 pioneer board. I dont have this so cant test on one. was hoping the code would work on a 5lp but doesn't. I added the direct i2c code to see if I can see the traffic on my logic analyizer. It appeards to lockup during the read.

I am not sure of n+2 I do know they use 64 byte blocks. I just need to get it so there is activity on the i2c bus. I get one small start then it dies. I am going to work on it some more tomorrow. I knoiw it is doable, I have done i2c with lidar devices from scratch. I am going to read the operation of the chip/card in detail maybe i have a timing issue or something.

I feel SOOOOOO stupid!!! First I want to thankyou for your help. The problem was the API from adafruit uses the IRQ from the board. The stupid part is, I used their sample application to try this. They had the irq pin on the schematic but the HW box was NOT check!!! The pin list shows the pin, I had it mapped to a pin but it never actually looked at it. once I enabled the HW connection it all works!!!!

I think that its compatible with the adafruit nfc library, that you used in your project, but i don't know how to build the top design on my project. In your project, you haven't got assign the scl pin, why?

There are a couple of videos showing how to use the Creator IDE. Basically you need to decide which interface of your nfc board you'd like to use (UART is easiest) and place a corresponding interface from the component list on to the topdesign. Complete with IO pins (when required) and assign the pins to real PSoC pins.