This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help :one wire master bridge ds2482 interface with lpc2148

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

Parents
  • It is trivial to bit-bang the one-wire protocol. The only real problem is if the processor is constantly busy, not having any time slots available where it may busy-wait for the bit delays and with multiple (or slow) high-priority interrupt routines that makes it hard to figure out a worst-case scenario.

    Since everything in the one-wire interface is handled with varying pulse lengths, delays may only deviate with a few us.

Reply
  • It is trivial to bit-bang the one-wire protocol. The only real problem is if the processor is constantly busy, not having any time slots available where it may busy-wait for the bit delays and with multiple (or slow) high-priority interrupt routines that makes it hard to figure out a worst-case scenario.

    Since everything in the one-wire interface is handled with varying pulse lengths, delays may only deviate with a few us.

Children