I2C, little help please


Closed Thread
Results 1 to 3 of 3
  1. #1
    gluphus's Avatar
    gluphus Guest

    Default I2C, little help please

    Has anyone got the code from

    http://www.warburtech.com/compilers/...ample.code.htm, the standard i2cslave.bas and i2cmaster.bas to work on the 16G6XX?

    My compiling gets stuck in "assembling..."
    I bet it has something to do with the regisiters, ie: around here:

    ' Define used register flags
    SSPIF VAR PIR1.3 ' SSP (I2C) interrupt flag
    BF VAR SSPSTAT.0 ' SSP (I2C) Buffer Full
    R_W VAR SSPSTAT.2 ' SSP (I2C) Read/Write
    D_A VAR SSPSTAT.5 ' SSP (I2C) Data/Address
    CKP VAR SSPCON.4 ' SSP (I2C) SCK Release Control
    SSPEN VAR SSPCON.5 ' SSP (I2C) Enable
    SSPOV VAR SSPCON.6 ' SSP (I2C) Receive Overflow Indicator
    WCOL VAR SSPCON.7 ' SSP (I2C) Write Collision Detect

    but I am still getting used to the i2c.

    If anyone has any thoughts, experiences, etc... about this, I would appreciate them.

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    PIC# please!

    Are you sure the PIC you use have those registers?

    What about your whole code?
    Last edited by mister_e; - 14th March 2006 at 21:36.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    gluphus's Avatar
    gluphus Guest

    Default nail on the head

    Yup. That was it. I was missreading the PIC16 -vs- PIC18...
    apples to apples and all that...

    Now I am on to the fun part of I2C'ing between PBP and Microchip C18 chips...

    Thanks for the crosscheck!

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. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 20:33
  4. I2C slave
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th March 2008, 04:46
  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