Memory 24LC1015


Closed Thread
Results 1 to 4 of 4

Thread: Memory 24LC1015

  1. #1
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48

    Default Memory 24LC1015

    i old post sad
    "You should use control address $A0 for write and $A1 for read (for lower), while (for upper) $A8 for write and $A9 for read"

    If i use $A0 for write and $A1 work block 1 - 0 to $FFFF
    If i use $A8 for write and $A9 not work block 2

    need A2 pin tied high?

    Code:
       INCLUDE "modedefs.bas"
       Include "AllDigital.pbp"
       
    '-------------------------------------------------------------------------------   
    
       #CONFIG
          __CONFIG _CONFIG1, _FOSC_INTOSC & _IESO_OFF & _WDTE_OFF & _PWRTE_OFF & _MCLRE_OFF & _CP_ON
          __CONFIG _CONFIG2, _PLLEN_OFF
       #ENDCONFIG
       
    '-------------------------------------------------------------------------------   
    
       @ errorlevel -202
       @ errorlevel -306
             
    '-------------------------------------------------------------------------------
             
       DEFINE   HSER_RCSTA    90h
       DEFINE   HSER_TXSTA    20h
       DEFINE   HSER_BAUD     9600
       DEFINE   HSER_CLROERR  1
       
    '-------------------------------------------------------------------------------
     
       I2C_Clock         var   PORTA.0
       I2C_Data          var   PORTC.1   
    
    '-------------------------------------------------------------------------------
       
       B0       var   byte
       B1       var   byte
       B2       var   byte
    
       I        var   word
       Letra    var   byte
    
    '---[ Boot ]--------------------------------------------------------------------
    Boot:
    
       DEFINE OSC 16
         
       OSCCON = %01111000
               ' x------- SPLLEN: don't care when _PLLEN_OFF in config fuse
               ' -1111--- Internal clock = 16MHz
               ' -----x-- Unimplemented
               ' ------00 System Clock Source = Determined by Config Word        
       
    '-------------------------------------------------------------------------------
    
       PORTA = 0
       PORTC = 0
       
       LATA = 0
       LATC = 0
       
       TRISA = %00000110
       TRISC = %00100001
      
       PAUSE 100
       hSerout [13, "START", 13]   
       PAUSE 10
    
    '-------------------------------------------------------------------------------
    Main:
    
       Letra = 0
       For i = 0 To 15
          Letra = 65 + I
          I2CWRITE I2C_Data, I2C_Clock, $A8, I, [Letra]
          PAUSE 5
        
          hSerout [Letra]
       Next i
    
    Teste:
       
       hSerout [13, "----------", 13]
          
       For i = 0 To 15
          I2Cread I2C_Data, I2C_Clock, $A9, I, [Letra]      
          pause 5
          
          hSerout [Letra]
       Next i
    
       hSerout [13]
    'Goto Teste
    END
    
    '-------------------------------------------------------------------------------
    Last edited by mpardinho; - 25th May 2014 at 18:29.
    ..: Don't worry, be happy :..

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,599


    Did you find this post helpful? Yes | No

    Default Re: Memory 24LC1015

    I don't see pin A2 used?

    Are you missing DEFINES for USART?

    What PIC are you using?

    Have you tried an I2C sample program first?

    Robert

  3. #3
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Memory 24LC1015

    Yes A2 on the eeprom has to be tied high

  4. #4
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Memory 24LC1015

    I can not find datasheet for 24LC1015 did you mean 24LC1025?
    Last edited by EarlyBird2; - 28th May 2014 at 18:55.

Similar Threads

  1. Replies: 11
    Last Post: - 17th August 2010, 16:45
  2. Memory use - how much do you use?
    By keymuu in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 10th June 2009, 22:39
  3. Out of memory
    By savnik in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 21st April 2007, 07:37
  4. Replies: 4
    Last Post: - 2nd March 2007, 06:12
  5. Use internal program memory like DATA memory
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2006, 18:38

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