[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ARG: I2C

From: jessica field   jessfield14hotmail.com
Date: Mon, 30 Aug 2004 06:24:11 -0700

A! Sent via the Art & Robotics Group mailing list: arg-list@xxxxxxxxxxxxxxx R! Use your "Reply All" to reply to the list, "Reply" for private response G!

 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

>From: Victoria Scott <toria@xxxxxxxxxxxxxx>
>To: arg-list@xxxxxxxxxxxxxxx
>Subject: ARG: I2C
>Date: Sat, 28 Aug 2004 20:09:30 -0500
>
>A! Sent via the Art & Robotics Group mailing list:
>arg-list@xxxxxxxxxxxxxxx
>R! Use your "Reply All" to  reply to the list, "Reply" for private
>response
>G!
>
>Hey ARG,
>
>Nice to see that the list is perking up again, must signify the end
>of summer fuzziness.
>
>I'm trying to control six devices (wee 'robots' each programmed with
>the 16F819 to move a stepper 180 degrees) with synchronous serial
>communication, maybe with I2C.
>
>So I have my slaves lined up, but i need a good Master (I never tire
>of electronics metaphors).
>
>Does anyone have a favorite PIC flavour for such a task. The Master
>will also be receiving a sensor input (most likely a photocell), so
>AtoD is also a necessary requirement.
>
>I'm still in the throes of leaning C and only been working with the
>PIC for a year (self taught at this point) so go easy please.
>
>best.victoria
>
>
>A!
>R!      messages saved at
>http://www.interaccess.org/arg/arg-list.html
>G!      unsubscribe/help requests to
>mailto:Majordomo@xxxxxxxxxxxxxxx


Enjoy 25MB of inbox storage and 10MB per file attachment with MSN Premium. Join now and get the first two months FREE* A! R! messages saved at http://www.interaccess.org/arg/arg-list.html G! unsubscribe/help requests to mailto:Majordomo@xxxxxxxxxxxxxxx