93c46 Eeprom Writing/reading Help


Results 1 to 4 of 4

Threaded View

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


    Did you find this post helpful? Yes | No

    Default

    As i remind some PM Darkman solved his problem and much more.
    FIRTS of all add
    Code:
    LOW CS 
    pause 50
    before your main loop.
    those are working. Just change your Shiftin/Shiftout statements
    Code:
    eeread:                                                                                                                                          
            CS = 1                          ' Enable serial EEPROM                                                                                   
            Shiftout DI, CLK, MSBFIRST, [%110\3, addr\6]               
            Shiftin DO, CLK, MSBPOST, [B0]  ' Read data                                                                                           
            CS = 0                          ' Disable                                                                                                
                                               
    
    ' Subroutine to write data at addr in serial EEPROM                                                              
    eewrite:                                                                                                         
             CS = 1                       ' Enable serial EEPROM                                                     
            Shiftout DI, CLK, MSBFIRST, [%10011, 0\4]     ' Send write enable command and dummy clocks               
            pause 10                                                                                                 
            CS = 0                          ' Disable                                                                
                                                                                                                     
            CS = 1                         ' Enable serial EEPROM                                                    
            Shiftout DI, CLK, MSBFIRST, [%101\3 ,addr\6,B0]                                                       
            pause 10                                                                                                 
            CS = 0                          ' Disable
    You don't need any resistor
    Last edited by mister_e; - 13th June 2005 at 04:34.
    Steve

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

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. How to define constants that specify eeprom addresses
    By DwayneR in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th December 2009, 04:07
  3. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 03:17
  4. 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
  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