HI2CREAD for 18Fs


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default HI2CREAD for 18Fs

    I have seen several examples of hardware I2C slaves on this forum. When I try to implement them, they never work. Most of the code is for 16F devices, which I avoid like the plague. I'm sure the problem is in front of my keyboard, but realizing that doesn't get my project working.

    Is anyone willing to provide me with a block of tested code for 18Fs?
    Charles Linquist

  2. #2
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Smile

    I have an 18F252 as a I2C-Slave in PBP using ASM-code for the I2C-interrupts.
    OK ?
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  3. #3
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I'm happy that you have that code... Would you care to share, or is it in some 'public' place already?
    Charles Linquist

  4. #4
    Join Date
    Feb 2003
    Location
    Sydney, Australia
    Posts
    126


    Did you find this post helpful? Yes | No

    Default

    I'd also love to see that. Getting my hands dirty with HW I2C isn't quite as much fun as I though it might be...

    bill.

  5. #5
    Join Date
    Oct 2004
    Location
    Hangover, Germany
    Posts
    289


    Did you find this post helpful? Yes | No

    Talking

    Hello,

    find attached my code (2 years old and not the best!).
    I have removed the maincode.
    I2C reads in bytes and fills up a buffer I2C_In.
    The maincode generates data in a second buffer I2C_Out.

    The incoming bytes are only single bytes, I don't know if the routine will manage more than 1 data in a message.

    Just read the code and try to understand the statemachine of the I2C-hardware.
    Attached Files Attached Files
    PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Thanks! And fortunately for me - my wife speaks German!
    Charles Linquist

Similar Threads

  1. HI2CREAD and HI2CWRITE
    By garryp4 in forum PBP Wish List
    Replies: 17
    Last Post: - 24th October 2008, 11:46

Members who have read this thread : 0

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