Page 1 of 1

ATtinyx5 I2C master (and 2Mbaud)

Posted: Sun Dec 06, 2009 10:11 am
by tz
I had trouble with Atmel's application note so I redid it. I also switched to assembly and made the SCL timing as uniform as possible. This is 400kHz (a bit faster at 10Mhz, a bit slower at 8 but works without a crystal).

And I actually commented it. ... -good.html

Archives and test programs are at some of the other posts.

I also coded a 2Megabaud [edit:]UART output (at 10Mhz) driver so I could use my FTDI breakout to read back things without hogging the CPU. ... roved.html

Posted: Sun Dec 06, 2009 12:16 pm
by stevech
nitpick: "baud" is normally used with asynchronous serial data (UART), with start/stop bits.

SPI, I2C, and other clocked data systems tend to use the term "bps"

Posted: Sun Dec 06, 2009 12:46 pm
by tz
I should clarify, the 2 Megabaud goes to my FTDI serial breakout when it is set to 2000000 baud. Yes, async - 1 start bit, 8 data bits, minimal 1 stop bit (usually somewhat longer since you have to reenter the routine and it takes a few clocks). With a 15Mhz Xtal it would be 3Mb.