External Serial EEPROM interface


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    6

    Default External Serial EEPROM interface

    Good day..

    I have this smalll problem that I hope u'ld be able to resolve:
    I need to key-in a 9 digits topup code,compare it to a pre-stored code n the external eeprom and if a match is made, add credit accordingly. However, i have been trying a simple code to write to and read from the external memory without success. Here is my trail code,have a look:
    ************************************************** ******************
    define OSC 4
    ADCON1=6
    DEFINE LCD_DREG PORTD
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTD
    DEFINE LCD_RSBIT 3
    DEFINE LCD_EREG PORTD
    DEFINE LCD_EBIT 2
    DEFINE LCD_BITS 4
    DEFINE LCD_LINES 4
    DEFINE LCD_COMMANDUS 2000
    DEFINE LCD_DATAUS 50
    PAUSE 100
    b1 var BYTE
    b2 VAR BYTE
    b1=10

    I2CWRITE PORTC.4,PORTC.3,$A0,1,[b1]
    PAUSE 10
    I2CREAD PORTC.4,PORTC.3,$A0,1,[B2]
    pause 10
    lcdout $fe,1,#b2
    ************************************************** ******************
    The LCD just displays 255

    Can you help on this regard

  2. #2
    Join Date
    Jan 2009
    Location
    Miami, Florida USA
    Posts
    699


    Did you find this post helpful? Yes | No

    Default

    Last edited by rsocor01; - 8th August 2010 at 05:34.
    "No one is completely worthless. They can always serve as a bad example."

    Anonymous

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