RE: ARG: I2C
From: jessica field jessfield14
hotmail.com
Date: Mon, 30 Aug 2004 06:24:11 -0700
I was working with I2C last year in assembler using the PIC16F877 and it worked really well. On the Microchip website they have the code to program I2C. It works really well, and with a little time you can see where to add your other code. I am familiar with assembler though, so this suggestion of using Microchip's periferial code maybe a nightmare of a choice. I haven't used C much but I do know there is a way of telling C that you are using assembler to add microchips subroutines for handling I2C and then use the C programing you are familiar with for the A to D converter. I have done A to D conversions using the hardware in the PIC16F877, it was pretty easy and takes less programming to make it work. The Microchip website also has application notes telling you how to program this stuff, so if the code doesn't work for you, you can at least read the theory on writing the code.
AN734 - I2C slave communication
AN546 - Using the Analog to Digital converter
I can't remember the number for the master I2C communication application notes. There is also an application note for the internal UART, if you are thinking to go serial. The code for that is really good but the assembler is a bit hard to follow.
Jessica