[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] New example: TWI
From: |
E. Weddington |
Subject: |
Re: [avr-libc-dev] New example: TWI |
Date: |
Thu, 19 Dec 2002 09:47:41 -0700 |
On 18 Dec 2002 at 23:44, Joerg Wunsch wrote:
> Hi *,
>
> after experimenting a bit to learn how to use the TWI interface,
> playing around with a 24C04 EEPROM that happened to lay around in a
> drawer, i decided to publish the result as yet another example. In
> contrast to say, an LM75 temperature sensor, talking to an EEPROM
> seemed to be a better example to me (even though the additional EEPROM
> space is certainly not needed ;-) since it involves both, read and
> write operations including an operation that uses a repeated start
> condition in order to switch the data transfer direction without
> losing bus arbitration.
>
> I'm now also convinced that <avr/twi.h> should stay :), the file
> is useful, the contents is basically a reproduction of an
> assembler definition file that is present in the datasheet of the
> ATmega163, except that Marek prepended TW_ before each symbol. I've
> already added a few other macros that are useful for the newer ATmegas
> since the status register is now also used for clock prescaler option
> bits that must be masked off before extracting the actual TWI status.
> I'll also document that file RSN.
Cool! Thanks!
Eric