External EEPROM can't read/write


Results 1 to 17 of 17

Threaded View

  1. #8
    Join Date
    Oct 2005
    Location
    Las Vegas, Nevada, USA
    Posts
    27


    Did you find this post helpful? Yes | No

    Default Simple example; still doesn't work

    I wrote a very simple program but with the same output result:

    5, 57
    5, 255

    Code:
    DEFINE	LOADER_USED	1
    DEFINE    OSC 20
    
    edata     var	  BYTE
    
    pause 100
    i2cwrite portc.4,portc.3,160,5,[57]
    pause 10
    serout2 portc.6,32,[dec 5,44,32,dec 57,10,13]
    i2cread portc.4,portc.3,160,5,[edata]
    serout2 portc.6,32,[dec 5,44,32,dec edata,10,13]
    end
    I tried using portc.0 as SDA and portc.1 at SCL with the same result. I used a different 16F877. It just doesn't make any sense to me anymore. I've checked the datasheets and my circuit many, many times.
    Last edited by coyotegd; - 8th May 2008 at 17:56.

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Replies: 1
    Last Post: - 28th January 2010, 22:15
  3. How to write/read strings EEPROM/LCD
    By g-hoot in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 11th February 2007, 06:26
  4. Internal EEPROM Read/write Addressing Errors with 18F PIC's
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 18
    Last Post: - 12th July 2005, 19:42
  5. word variable to 25lc640
    By TONIGALEA in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th July 2004, 19:59

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