hi aim implementing i-button interface to lpc2148 using ds2482 1-wire to i2c bridge. my problem is i am using hardware i2c controller in lpc2148.i am writing 3 routine 1 detect the i button 2 read i-button 3 write i-button each routine using i2c interrupt.i seen some example in that all i2c code are written in side the interrupt routine only. im confused about how can i uses the interrupt routine for 3 main routine. and can i enable the i2c and initiate start and send slave addresses and receive the acknowledgment and come back from interrupt routine and do some work in main routine and again enter to i2c interrupt routine and continue the next i2c operation
What is the value of command in i2c_data_write(command) ? I think if you send an invalid command the ds2482 will nack.
0xF0 is a device reset and clears the state machine of the DS2482, have you tried writing that as your first command?
Now im getting ack