Whats wrong with this I2C code???? HELP?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    yourmomOS's Avatar
    yourmomOS Guest


    Did you find this post helpful? Yes | No

    Thumbs down Anyone???

    Dont everyone help at once now!

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


    Did you find this post helpful? Yes | No

    Default Be calm, life is short

    something is wrong in your hardware and/or configuration fuses... it's working here. Be sure you have place 4.7K or lower on the scl and SDA line and it should work... unless you have reverted the SDA and SCL

    If at least you have serial communication, the PIC is working at the great and at the right speed wich reject the config fuses problem

    but i don't have the LC512, as now i didn't have any requirement for those... just the LC128 so it can exist some difference between... wich i doubt after a really fast datasheet reading.
    Steve

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

  3. #3
    yourmomOS's Avatar
    yourmomOS Guest


    Did you find this post helpful? Yes | No

    Question thanks for helping, but I found what appears to be the problem

    The DIDNTWRITE and DIDNTREAD are never jumped to when it does not read or write. I have even removed the cables going to the eeprom but it never goes to the label. I have a 24LC512 and a pic 16f628. Has anyone seen this before?

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


    Did you find this post helpful? Yes | No

    Default

    You have a hardware problem... OR you don't have pull-resistor as shown in the PBP manual and in the datasheet, OR your PIC is defect, OR you have some short circuit somewhere.

    EEprom with Pull up
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=968&stc=1&d=1152732703 ">

    EEPROM no pull-up
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=967&stc=1&d=1152732703 ">

    NoEEPROM With pul-ups
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=969&stc=1&d=1152732703 ">
    Attached Images Attached Images     
    Steve

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

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


    Did you find this post helpful? Yes | No

    Default

    NoEEPROM No Pull ups
    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=970&stc=1&d=1152732703 ">
    Steve

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

  6. #6
    yourmomOS's Avatar
    yourmomOS Guest


    Did you find this post helpful? Yes | No

    Default Problem Solved, Sort Of

    I started playing around and found out that if I disconnect the ground wire, the things start working. I tried different chips, different slots in my breadboard and different connector wires. Its the damndest thing. pin 4 should be connected to ground, but spits out garbage when I connect it, works when I disconnect it.

Similar Threads

  1. PIC18F4620 , what's wrong with my A/D converter code
    By Porcusoru in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd July 2009, 20:35
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  3. PIC16F877 I2C programme
    By cooqo in forum mel PIC BASIC
    Replies: 3
    Last Post: - 21st April 2008, 10:02
  4. Code for I2C Slave
    By Balachandar in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st November 2006, 19:14
  5. Anyone have ADS1100 I2C PicBasic Pro code example
    By ScaleRobotics in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 7th March 2006, 22:13

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