Pic as an i2c slave


Closed Thread
Results 1 to 2 of 2
  1. #1
    Robert Soubie's Avatar
    Robert Soubie Guest

    Default Pic as an i2c slave

    With help of some people on the Piclist and also on Crownhill's PicBasic Pro list, I have been able to implement i2c slave logics into a PIC using the hardware MSSP and fast interrupts, as proposed by Timothy Box for the 16F series and Darell Taylor for the 18F.

    The problem I had to solve was missing instructions in the -very misleading- Microchip application note AN734 that describes how to do it in assembler.

    I have made available the PBP routines I use, separating as far as possible what is reusable by someone else from the actual processing relevant to my application.

    The corresponding files are available for download at the following URL:

    http://www.astrosurf.com/soubie/microcontroleurs.htm

    Also available on this page are routines to detect and read from a DS1820 temperature sensor and store the date using positive integer arithmetic (even for negative values), along with routines to display temperature in degrees Celsius and Farenheit or on the Kelvin and Rankine scales.

    These last routines demonstrate how PBP allows handling physical parameters using offesting and scaling techniques.

    All this software maybe reused even in a commercial context. Credits to the author will be appreciated.

  2. #2
    Join Date
    Jan 2007
    Posts
    2


    Did you find this post helpful? Yes | No

    Default merci

    those I2C routines were just the thing I was looking for.
    tempis fugit

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 23:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. Another I2C Slave Routine Problem
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th February 2009, 06:50
  4. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 20:33
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 14:55

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts