??? 03/03/04 17:00 Read: times |
#65888 - RE: LPC932 with simple I2C peripherals Responding to: ???'s previous message |
Why should I do bit-banging when a few CLR/SETB operations on STA/STO/AA, and SI polling also do?
No Sir, it takes much more than that. DO NOT code IIC without taking everything into consideration, it WILL be a (intermittent) disaster. Polling IIC has the disadvantage that you have to disable all interrupts while polling. Why? I don't see this from the manual. Of course not, "the manual" expect you to use the hardware. Try using codearchitect and see how little it really takes. One thing I do not like about codearchitect is that it makes code that can be both master and slave, but it is a matter of an hour or less to remove the code you do not need. There is a Philips appnote for IIC on the 932 that is basically codearchitect output with the slave parts removed. I did a IIC design using codearchitect and changed a few things (do not require structs to call etc.) but with the codearchitect code you can verify your hardware before fooling around with the software. Erik |