This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2c protocol.

Dear Sir,

i am using pca10001.

Actually i tried to read and write the data from EEPROM having address 0x50 though i2cbus.

i made po.0 and p0.1 as output pin then clk and sda pin respectively.

i done every thing. but once i start NWF_TWI0->STARTTX=1;

i am not geeting ack from slave.

infact ERRORSRC=2 and EVENTS_ERROR=1.

Is it needed to make data pin again as input to get ack from slave.

and is needed to send slave address or just put in ADDRESS register is sufficient. Kindly suggest me.

if you want i will post my code also.

Regards Balaji

Parents
  • I did that one, i am giving 1 sec delay b/w write and read, while debugging, the PSELSCL = 0X00000018, PSELSDA = 0X00000019

    showing the pin numbers as 18 and 19, but my actual pins i am using are -

    #define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (24U) #define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (25U)

    24 and 25, why it is showing like that ?

    even i tried to connect to the 18 and 19 pins but not getting any thing!

Reply
  • I did that one, i am giving 1 sec delay b/w write and read, while debugging, the PSELSCL = 0X00000018, PSELSDA = 0X00000019

    showing the pin numbers as 18 and 19, but my actual pins i am using are -

    #define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (24U) #define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (25U)

    24 and 25, why it is showing like that ?

    even i tried to connect to the 18 and 19 pins but not getting any thing!

Children
Related