AS1130 First attempt - working

Well like I said...it is C code but unfortunately I'm not familiar with your compiler...if it's ANSI C you shouldn't have too much trouble.

How well do you understand the registers in your processor?

It's fairly easy to write routines to implement I2C in C but I'm sure your compiler will have routines for this. :wink:

EDIT:

I'm going to make a suggestion which you may or may not like....

Why don't you buy yourself an Arduino board, then you'll have 1000's of expert programmers there to help not only with the hardware side but the C programming as well.
I bought a genuine UNO for £16 on eBay but I'm sure there are cheaper versions (not that I'd recommend a Chinese rip off) or it's very easy to build one yourself. You can even buy the chips with the bootloader installed. :wink:

Here we are...free cable and free postage.
http://www.ebay.co.uk/itm/Arduino-UNO-R3-V3-0-ATMEGA328-FREE-USB-CABLE-Dev-Module-Ideal-4-Robotics-Rev-3-/321017689679?pt=UK_Computing_Other_Computing_Networking&hash=item4abe25364f