Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Re: Tiny2313 USI code to make I2C master

2009-06-18 by Dennis Clark

Bill,

  Thanks a ton.  You'll save me the hassle of writing it myself. 
Especially if yours works already and I don't have a bus analyzer on
hand!  I'm running at 4MHz, and may move to 1MHz to save power so the
timing can either be changed or I'll just accept the slower clock, a few
hundred milliseconds delay isn't going to bother anything in my case.

Again thanks,
DLC

> --- In AVR-Chat@yahoogroups.com, dlc <dlc@...> wrote:
>
>>    I got the file.  The code looks stupid simple, how well does it
> work
>> and with what devices have you tried it?  The code seems pretty
> obvious,
>> but the demo routines in there don't seem complete, for instance:
>>      if (!I2CPut(atod_reg, 2))
>> atod_reg is never set to anything, it will be two bytes of zeros.
>>
>>    I'll give it a whirl, I've seen some code that uses the USI
> interface
>> to do I2C and it is about 10x more complex and isn't even interrupt
>> driven (based on Atmel app note).  I'm not terribly impressed with the
>> USI interface...
>
> The code was written to talk to a TI ADS1110
> <http://focus.ti.com/docs/prod/folders/print/ads1110.html>   chip.  I
> have run it
> successfully, though the full application is still under development
> (it got pushed aside for nearly a year when work decided that something
> else needed to be done first).
>
> Yes, it is simple.  Once you have the low-level bit drivers written, the
> rest is just stringing them together appropriately.
>
> The USI could not be used for I2C, it was already in use talking SPI to
> the
> rest of the project.
>
> I'll update the source files with some more examples of talking to the
> ADS1110.  Check for a new version of I2C.ZIP in the files section.
>
> Bill
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


-- 
Dennis Clark
TTT Enterprises

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.