|
Hi,
I'm trying to implement a software TWI slave on at91sam7s256, but i got a problem on pulling down the data line for acknowledge. As far as i understood the specification, the clock/data-line should be open-collector. My TWI master is configured as open-collector but when i try to clear the output the data line still remains high, so that the master doesn't see the slave. I tried to change the IO port to output and clear the IO port and set it back to input after acknowledge. This works, but is very time critical since a have a 100 khz clock to serve.
Another question is: Reading the GPIOs takes a very long time. Is there a mistake in my source or is it the AT91SAM, which needs so much time?
thanks
Anibal
|