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
That is generally a bad idea.
In general, interrupt handlers should be kept as short and quick as possible - just gathering data and/or setting flags to be used by the "main" code to do the "main" processing work...